mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-26 13:47:56 +03:00
Added "Always transmit to client" flag for info_target
This commit is contained in:
parent
591572cfda
commit
ee8bee588a
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user