mirror of https://github.com/FWGS/hlsdk-xash3d
Add info_flaghelper implementation.
This commit is contained in:
parent
cba7cd4c2f
commit
70557016ba
|
@ -86,6 +86,24 @@ BOOL CBaseDMStart::IsTriggered( CBaseEntity *pEntity )
|
||||||
return master;
|
return master;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class CFlagHelper : public CPointEntity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
|
||||||
|
};
|
||||||
|
|
||||||
|
LINK_ENTITY_TO_CLASS( info_flaghelper, CFlagHelper )
|
||||||
|
|
||||||
|
void CFlagHelper::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
|
||||||
|
{
|
||||||
|
if( pev->target )
|
||||||
|
{
|
||||||
|
CBaseEntity *pTarget = UTIL_FindEntityByTargetname( 0, STRING( pev->target ) );
|
||||||
|
if( pTarget )
|
||||||
|
pTarget->pev->flags = pev->flags;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// This updates global tables that need to know about entities being removed
|
// This updates global tables that need to know about entities being removed
|
||||||
void CBaseEntity::UpdateOnRemove( void )
|
void CBaseEntity::UpdateOnRemove( void )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue