Reference ID
d88789cb-476e-2d50-e689-9fabcc61354b
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Summary
FortPlayerUtilities.GetPlayersSpectating does not behave correctly. It DOES provide the correct count of players, but it returns duplicate player objects.
Steps to Reproduce
- Have 2 players enter spectate mode and 1 player remain alive
- Iterate through all players in GetPlayspace().GetPlayers()
- Call Player.GetPlayersSpectating on each player
- You will see the correct count of players spectating, but the API will give you the same player object twice (instead of two different spectating players)
Expected Result
That you get all the appropriate spectating players
Observed Result
You get duplicate player objects
Platform(s)
windows
Example:
In the case below, we have 2 players spectating in the game with one player alive.
for (Player : PotentialPlayers):
Spectators := Player.GetPlayersSpectating()
Print("Spectators: {Spectators.Length}")
for (SP : Spectators):
Print(DebugText(SP, "Spectating"), ?Duration := 5.0)
And here are the incorrect results (the same player being delivered twice, even though two separate players are spectating):
LogVerse: : Spectators: 1
LogVerse: : Anonymous[258] Spectating
LogVerse: : Spectators: 1
LogVerse: : Anonymous[258] Spectating
LogVerse: : Spectators: 0
1 post - 1 participant