Restart trigger_multiple (#935)

This commit is contained in:
肯定龙 2024-05-08 15:18:24 +00:00 committed by GitHub
parent 75f142e18a
commit d7f22ae3ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 0 deletions

View File

@ -652,6 +652,7 @@ void EXT_FUNC CHalfLifeMultiplay::__API_HOOK(CleanUpMap)()
UTIL_RestartOther("env_beam");
UTIL_RestartOther("env_laser");
UTIL_RestartOther("trigger_auto");
UTIL_RestartOther("trigger_multiple");
#endif
// Remove grenades and C4

View File

@ -996,6 +996,14 @@ void CTriggerMultiple::Spawn()
}
}
#ifdef REGAMEDLL_FIXES
void CTriggerMultiple::Restart()
{
pev->nextthink = -1;
Spawn();
}
#endif
LINK_ENTITY_TO_CLASS(trigger_once, CTriggerOnce, CCSTriggerOnce)
void CTriggerOnce::Spawn()

View File

@ -283,6 +283,10 @@ class CTriggerMultiple: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef REGAMEDLL_FIXES
virtual void Restart();
#endif
};
// Variable sized trigger. Triggers once, then removes itself. You must set the key "target" to the name of another object in the level that has a matching