diff --git a/engine/server/sv_game.c b/engine/server/sv_game.c index d1a64ea0..2904f971 100644 --- a/engine/server/sv_game.c +++ b/engine/server/sv_game.c @@ -3309,6 +3309,7 @@ pfnSetView void pfnSetView( const edict_t *pClient, const edict_t *pViewent ) { sv_client_t *client; + int viewEnt; if( !SV_IsValidEdict( pClient )) return; @@ -3327,8 +3328,12 @@ void pfnSetView( const edict_t *pClient, const edict_t *pViewent ) if( FBitSet( client->flags, FCL_FAKECLIENT )) return; + if( client->pViewEntity ) + viewEnt = NUM_FOR_EDICT( client->pViewEntity ); + else viewEnt = NUM_FOR_EDICT( client->edict ); + MSG_BeginServerCmd( &client->netchan.message, svc_setview ); - MSG_WriteWord( &client->netchan.message, NUM_FOR_EDICT( pViewent )); + MSG_WriteWord( &client->netchan.message, viewEnt ); } /* diff --git a/engine/server/sv_init.c b/engine/server/sv_init.c index 04fe3034..53e06f2a 100644 --- a/engine/server/sv_init.c +++ b/engine/server/sv_init.c @@ -782,6 +782,9 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean ba MSG_Init( &sv.reliable_datagram, "Reliable Datagram", sv.reliable_datagram_buf, sizeof( sv.reliable_datagram_buf )); MSG_Init( &sv.spec_datagram, "Spectator Datagram", sv.spectator_buf, sizeof( sv.spectator_buf )); + // clearing all the baselines + memset( svs.baselines, 0, sizeof( entity_state_t ) * GI->max_edicts ); + // make cvars consistant if( coop.value ) Cvar_SetValue( "deathmatch", 0 ); current_skill = Q_rint( skill.value );