Spectator problems
Posted: 14 Jul 2006, 22:31
I'm running a zone extension.
When a user enters a room as spectator, the userJoin event is fired and he is added to a user array.
But when he leaves he dosn't get removed from the user array, because the userExit event isn't fired for spectators, which I think it should be.
If the user now creates a game of his own, he will still recieve the game moves from the room he was previously watching as spectator, which made my testers think there was a ghost player in the game.
When a user enters a room as spectator, the userJoin event is fired and he is added to a user array.
Code: Select all
var u = evt["user"]
var rId = r.getId()
var rm = rl[rId] //array with the rooms
rm.users[u.getUserId()] = uIf the user now creates a game of his own, he will still recieve the game moves from the room he was previously watching as spectator, which made my testers think there was a ghost player in the game.