trigger_once: spawnflag TO_PUSHABLES should also affect other func_ entities, it appears.
This commit is contained in:
parent
b50b803b55
commit
e1fd04de05
1 changed files with 5 additions and 1 deletions
|
@ -124,13 +124,16 @@ trigger_once::SpawnKey(string strKey, string strValue)
|
||||||
void
|
void
|
||||||
trigger_once::Touch(entity eToucher)
|
trigger_once::Touch(entity eToucher)
|
||||||
{
|
{
|
||||||
|
bool isPushable = (substring(eToucher.classname, 0, 5) == "func_") ? true : false;
|
||||||
|
|
||||||
if (GetMaster() == FALSE)
|
if (GetMaster() == FALSE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (HasSpawnFlags(TO_NOCLIENTS) && eToucher.flags & FL_CLIENT)
|
if (HasSpawnFlags(TO_NOCLIENTS) && eToucher.flags & FL_CLIENT)
|
||||||
return;
|
return;
|
||||||
if (!HasSpawnFlags(TO_MONSTERS) && eToucher.flags & FL_MONSTER)
|
if (!HasSpawnFlags(TO_MONSTERS) && eToucher.flags & FL_MONSTER)
|
||||||
return;
|
return;
|
||||||
if (!HasSpawnFlags(TO_PUSHABLES) && eToucher.classname == "func_pushable")
|
if (!HasSpawnFlags(TO_PUSHABLES) && isPushable == true)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SetSolid(SOLID_NOT); /* make inactive */
|
SetSolid(SOLID_NOT); /* make inactive */
|
||||||
|
@ -141,5 +144,6 @@ trigger_once::Touch(entity eToucher)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print(sprintf("%s is triggering %s in trigger_once\n", eToucher.classname, target));
|
||||||
UseTargets(eToucher, TRIG_TOGGLE, m_flDelay);
|
UseTargets(eToucher, TRIG_TOGGLE, m_flDelay);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue