CONFUSION. My thought is this: the player might open the scoreboard before the server has had a chance to replicate the Level.Game.ScoreboardType class to the client (see PlayerPawn->PostBeginPlay where the ScoringType variable - which is replicated from the server - is assigned to the clientside PlayerPawn). So if that class is of a non-standard type (like SmartCTF), the wrong scoreboard will be spawned (see 1/3 of the way down-ish into the body of the PostRender function in the PostRender function for ChallengeHUD.uc).
If the player waits until replication is complete all should be well...
OK so far. But now the confusion. When processing reaches the line below in the scenario above, SB [a variable of type ScoreBoard] should be the Level.Game.ScoreboardType default scoreboard class - but even when this scenario IS true, a comparison against 'SmartCTFScoreBoard' returns true! With the standard scoreboard on screen! I could sort of understand it if the game-type standard scoreboard HAD been onscreen previously, but wasn't now, and that the SmartCTF class had since been assigned to the playerPawn ScoringType variable and that... er, somehow, a SmartCTF object had been spawned into the Scoring variable. But I don't get it at all how the test against 'SmartCTFScoreBoard' can return true while the game-type standard scoreboard is ON SCREEN! So I've no idea what to test reliably against here. And since I've lost patience with this, I'm just going to nuke whatever Scoring object is currently assigned and spawn a SmartCTF one. This seems to work, though can cause a brief flash as the screen repaints if the user is viewing the scoreboard when this re-assignment takes place.
Users browsing this forum: makemeunreal and 2 guests