- Fix spectator client being switched from follow to free after map_restart if following a client with a higher client number.

- Fix client unlinking issue caused by ent->s.number being set to followed client's ps->clientNum after map_restart. Reported by Ensiform.
This commit is contained in:
Zack Middleton 2012-12-29 01:45:11 +00:00
parent 1c8fa31c0d
commit b791040f42

View file

@ -1248,8 +1248,11 @@ void ClientSpawn(gentity_t *ent) {
client->ps.commandTime = level.time - 100;
ent->client->pers.cmd.serverTime = level.time;
ClientThink( ent-g_entities );
// run the presend to set anything else
ClientEndFrame( ent );
// run the presend to set anything else, follow spectators wait
// until all clients have been reconnected after map_restart
if ( ent->client->sess.spectatorState != SPECTATOR_FOLLOW ) {
ClientEndFrame( ent );
}
// clear entity state values
BG_PlayerStateToEntityState( &client->ps, &ent->s, qtrue );