fix: implement enemy clear threat script (#1678)

* brother

* use some better logic
This commit is contained in:
David Markowitz
2024-12-15 21:44:57 -08:00
committed by GitHub
parent 53242ad5d5
commit 0f8c5b436d
20 changed files with 197 additions and 64 deletions

View File

@@ -224,6 +224,16 @@ public:
*/
void Wake();
// Force this entity to tether and ignore all other actions
void ForceTether();
// heals the entity to full health and armor
// and tethers them to their spawn point
void TetherLogic();
// Ignore a threat for a certain amount of time
void IgnoreThreat(const LWOOBJID target, const float time);
private:
/**
* Returns the current target or the target that currently is the largest threat to this entity
@@ -382,6 +392,12 @@ private:
*/
bool m_DirtyStateOrTarget = false;
// The amount of time the entity will be forced to tether for
float m_ForcedTetherTime = 0.0f;
// The amount of time a removed threat will be ignored for.
std::map<LWOOBJID, float> m_RemovedThreatList;
/**
* Whether the current entity is a mech enemy, needed as mechs tether radius works differently
* @return whether this entity is a mech