trigger_once: Implement the spawnflags that check for whether a monster/client is allowed to trigger.
This commit is contained in:
parent
287f88ecbd
commit
774eb4cf14
1 changed files with 6 additions and 1 deletions
|
@ -45,14 +45,19 @@ class trigger_once:CBaseTrigger
|
||||||
void
|
void
|
||||||
trigger_once::touch(void)
|
trigger_once::touch(void)
|
||||||
{
|
{
|
||||||
|
if (!(spawnflags & TO_MONSTERS) && other.spawnflags & FL_MONSTER)
|
||||||
|
return;
|
||||||
|
if (spawnflags & TO_NOCLIENTS && other.spawnflags & FL_CLIENT)
|
||||||
|
return;
|
||||||
|
|
||||||
eActivator = other;
|
eActivator = other;
|
||||||
|
solid = SOLID_NOT; /* make inactive */
|
||||||
|
|
||||||
if (m_flDelay > 0) {
|
if (m_flDelay > 0) {
|
||||||
CBaseTrigger::UseTargets_Delay(m_flDelay);
|
CBaseTrigger::UseTargets_Delay(m_flDelay);
|
||||||
} else {
|
} else {
|
||||||
CBaseTrigger::UseTargets();
|
CBaseTrigger::UseTargets();
|
||||||
}
|
}
|
||||||
solid = SOLID_NOT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue