TheM wrote:w1lla wrote:Bugreport:
onPlayerInfoChanged; When changing from player -> spec -> player the currenttargetid is always 255.
If i come in a server as spec it shows the correct currenttargetid.
This happens on Elite servers.
Not sure how to fix, or perfection it.
If more is needed i will post my code which i use to test.
I seem to have kinda like the same problems (also in Elite), it gives me values like:
int(2551110)
int(2551010)
int(2551101)
for isSpectator in the Player object, causing handling the PlayerInfoChanged function into a hell, because I can't check if the player's spectator status changed.
After a little bit more investigating i came to the conclusion that:
- When a player joins the server during a match and goes to spectator and back he can only view his teammates and still the server gives back 255 as target id.
- When a spectator joins he can spectate everyone.
It seems to me that when a player is forced to spectate this also happens in the gamemode in this case: Elite as well as the dedicated doesnt seem to see the targetId.
There are 3 cases:
Code: Select all
foreach (Player in Players) {
declare UI <=> UIManager.GetUI(Player);
if (UI == Null) continue;
// Can select defender to spec
if (Player.CurrentClan != 0) {
UI.SpectatorForceCameraType = 1;
UI.SpectatorForcedClan = Player.CurrentClan;
} else if (Player.RequestedClan != 0) {
UI.SpectatorForceCameraType = 1;
UI.SpectatorForcedClan = Player.RequestedClan;
} else {
UI.SpectatorForceCameraType = -1;
UI.SpectatorForcedClan = -1;
}
}
The dedicated only recognises the first if and last if.
But it doesnt recognize the switch between players after being a player.
Its a small investigation as its done on both sides.