22 Mar 2018

This commit is contained in:
g-cont 2018-03-22 00:00:00 +03:00 committed by Alibek Omarov
parent 3064013da0
commit a102a22a55
2 changed files with 9 additions and 1 deletions

View File

@ -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 );
}
/*

View File

@ -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 );