Quantcast
Channel: General - Epic Developer Community Forums
Viewing all articles
Browse latest Browse all 11321

FortPlayerUtilities.GetPlayersSpectating Gives Incorrect Data

$
0
0

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

  1. Have 2 players enter spectate mode and 1 player remain alive
  2. Iterate through all players in GetPlayspace().GetPlayers()
  3. Call Player.GetPlayersSpectating on each player
  4. 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

Read full topic


Viewing all articles
Browse latest Browse all 11321

Trending Articles