mirror of https://github.com/FWGS/hlsdk-xash3d
Fix short loop on func_train
This commit is contained in:
parent
ba1729708b
commit
b747a52f79
|
@ -1234,7 +1234,7 @@ we could also use the pas/ pvs that we set in SetupVisibility, if we wanted to.
|
|||
int AddToFullPack( struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet )
|
||||
{
|
||||
int i;
|
||||
static int counter; // XASH3DMAX_VISIBLE_PACKET == 512
|
||||
static int counter; // XASH3D MAX_VISIBLE_PACKET == 512
|
||||
bool hide = false;
|
||||
|
||||
if( ( ent == host || player ) && counter > gpGlobals->maxClients + 1 )
|
||||
|
|
|
@ -736,6 +736,12 @@ void CFuncTrain::Next( void )
|
|||
return;
|
||||
}
|
||||
|
||||
if( pTarg->GetNextTarget() == pTarg )
|
||||
{
|
||||
ALERT(at_error, "train short loop!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Save last target in case we need to find it again
|
||||
pev->message = pev->target;
|
||||
|
||||
|
|
Loading…
Reference in New Issue