Fix borg mobstates (#21307)

* Add dead states to borgs

* this?

* ack
This commit is contained in:
Nemanja
2023-11-09 18:14:06 -05:00
committed by GitHub
parent 4de0cf66d7
commit ac5e9cd70b
17 changed files with 107 additions and 36 deletions

View File

@@ -36,7 +36,8 @@ public partial class MobStateSystem
}
/// <summary>
/// Change the MobState and trigger MobState update events
/// Change the MobState without triggering UpdateMobState events.
/// WARNING: use this sparingly when you need to override other systems (MobThresholds)
/// </summary>
/// <param name="entity">Target Entity we want to change the MobState of</param>
/// <param name="mobState">The new MobState we want to set</param>
@@ -48,9 +49,7 @@ public partial class MobStateSystem
if (!Resolve(entity, ref component))
return;
var ev = new UpdateMobStateEvent {Target = entity, Component = component, Origin = origin, State = mobState};
RaiseLocalEvent(entity, ref ev);
ChangeState(entity, component, ev.State);
ChangeState(entity, component, mobState, origin: origin);
}
#endregion