mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-06 20:30:36 +08:00
Merge 4097
This commit is contained in:
@@ -72,8 +72,11 @@ void SV_BroadcastPrintf( sv_client_t *ignore, char *fmt, ... )
|
||||
}
|
||||
}
|
||||
|
||||
// echo to console
|
||||
Con_DPrintf( "%s", string );
|
||||
if( Host_IsDedicated() )
|
||||
{
|
||||
// echo to console
|
||||
Con_DPrintf( string );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -60,8 +60,8 @@ static void SV_AddEntitiesToPacket( edict_t *pViewEnt, edict_t *pClient, client_
|
||||
byte *clientpvs;
|
||||
byte *clientphs;
|
||||
qboolean fullvis = false;
|
||||
sv_client_t *netclient;
|
||||
sv_client_t *cl = NULL;
|
||||
qboolean player;
|
||||
entity_state_t *state;
|
||||
int e;
|
||||
|
||||
@@ -101,15 +101,29 @@ static void SV_AddEntitiesToPacket( edict_t *pViewEnt, edict_t *pClient, client_
|
||||
if( CHECKVISBIT( ents->sended, e ))
|
||||
continue;
|
||||
|
||||
if( e >= 1 && e <= svs.maxclients )
|
||||
player = 1;
|
||||
else player = 0;
|
||||
|
||||
if( player )
|
||||
{
|
||||
sv_client_t *cl = &svs.clients[e - 1];
|
||||
|
||||
if( cl->state != cs_spawned )
|
||||
continue;
|
||||
|
||||
if( FBitSet( cl->flags, FCL_HLTV_PROXY ))
|
||||
continue;
|
||||
}
|
||||
|
||||
if( FBitSet( ent->v.effects, EF_REQUEST_PHS ))
|
||||
pset = clientphs;
|
||||
else pset = clientpvs;
|
||||
|
||||
state = &ents->entities[ents->num_entities];
|
||||
netclient = SV_ClientFromEdict( ent, true );
|
||||
|
||||
// add entity to the net packet
|
||||
if( svgame.dllFuncs.pfnAddToFullPack( state, e, ent, pClient, sv.hostflags, ( netclient != NULL ), pset ))
|
||||
if( svgame.dllFuncs.pfnAddToFullPack( state, e, ent, pClient, sv.hostflags, player, pset ))
|
||||
{
|
||||
// to prevent adds it twice through portals
|
||||
SETVISBIT( ents->sended, e );
|
||||
@@ -807,7 +821,7 @@ void SV_SendClientMessages( void )
|
||||
{
|
||||
cl = sv.current_client;
|
||||
|
||||
if( !cl->state || FBitSet( cl->flags, FCL_FAKECLIENT ))
|
||||
if( cl->state <= cs_zombie || FBitSet( cl->flags, FCL_FAKECLIENT ))
|
||||
continue;
|
||||
|
||||
if( FBitSet( cl->flags, FCL_SKIP_NET_MESSAGE ))
|
||||
|
||||
@@ -876,6 +876,10 @@ void SV_InitEdict( edict_t *pEdict )
|
||||
SV_FreePrivateData( pEdict );
|
||||
memset( &pEdict->v, 0, sizeof( entvars_t ));
|
||||
pEdict->v.pContainingEntity = pEdict;
|
||||
pEdict->v.controller[0] = 0x7F;
|
||||
pEdict->v.controller[1] = 0x7F;
|
||||
pEdict->v.controller[2] = 0x7F;
|
||||
pEdict->v.controller[3] = 0x7F;
|
||||
pEdict->free = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user