Turns out the error was in fact with the line
PHP Code:
temp.player = findPlayer(pl);
In doing this, you are setting temp.player to the
client pl.
If I had zokemon in all players twice, one for my client and one for my RC, using findplayer() for both of those would give my client.