mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-11 06:32:10 +08:00
engine: client: only check active tempentities when detaching player following tents
This commit is contained in:
+4
-14
@@ -777,25 +777,15 @@ Detach entity from player
|
||||
*/
|
||||
void GAME_EXPORT R_KillAttachedTents( int client )
|
||||
{
|
||||
int i;
|
||||
TEMPENTITY *tent;
|
||||
|
||||
if( client <= 0 || client > cl.maxclients )
|
||||
return;
|
||||
|
||||
for( i = 0; i < GI->max_tents; i++ )
|
||||
for( tent = cl_active_tents; tent; tent = tent->next )
|
||||
{
|
||||
TEMPENTITY *pTemp = &cl_tempents[i];
|
||||
|
||||
if( !FBitSet( pTemp->flags, FTENT_PLYRATTACHMENT ))
|
||||
continue;
|
||||
|
||||
// this TEMPENTITY is player attached.
|
||||
// if it is attached to this client, set it to die instantly.
|
||||
if( pTemp->clientIndex == client )
|
||||
{
|
||||
// good enough, it will die on next tent update.
|
||||
pTemp->die = cl.time;
|
||||
}
|
||||
if( FBitSet( tent->flags, FTENT_PLYRATTACHMENT ) && tent->clientIndex == client )
|
||||
tent->die = cl.time;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user