NSTrigger: Add 'Trigger' input, this will make interacting between GoldSrc and Source triggers easier.

This commit is contained in:
Marco Cawthorne 2022-03-26 23:26:28 -07:00
parent 1ca716d4fe
commit 9252682c53
Signed by: eukara
GPG Key ID: C196CD8BA993248A
2 changed files with 12 additions and 0 deletions

View File

@ -52,6 +52,7 @@ class NSTrigger:NSIO
/* overrides */
virtual void(float) Save;
virtual void(string,string) Restore;
virtual void(entity, string, string) Input;
#endif
virtual void(string, string) SpawnKey;
};

View File

@ -152,6 +152,17 @@ NSTrigger::Restore(string strKey, string strValue)
super::Restore(strKey, strValue);
}
}
void
NSTrigger::Input(entity eAct, string strInput, string strData)
{
switch (strInput) {
case "Trigger":
Trigger(eAct, TRIG_TOGGLE);
break;
default:
super:: Input(eAct, strInput, strData);
}
}
#endif
void