Added "Always transmit to client" flag for info_target

This commit is contained in:
Blixibon 2021-04-23 00:25:02 -05:00
parent 591572cfda
commit ee8bee588a

View File

@ -42,6 +42,9 @@ public:
DECLARE_CLASS( CInfoTarget, CPointEntity );
void Spawn( void );
#ifdef MAPBASE
virtual int UpdateTransmitState();
#endif
};
//info targets are like point entities except you can force them to spawn on the client
@ -55,6 +58,19 @@ void CInfoTarget::Spawn( void )
}
}
#ifdef MAPBASE
//-----------------------------------------------------------------------------
// Purpose: Always transmitted to clients
//-----------------------------------------------------------------------------
int CInfoTarget::UpdateTransmitState()
{
// Spawn flags 2 means we always transmit
if ( HasSpawnFlags(0x02) )
return SetTransmitState( FL_EDICT_ALWAYS );
return BaseClass::UpdateTransmitState();
}
#endif
LINK_ENTITY_TO_CLASS( info_target, CInfoTarget );
#endif