@@ -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
|
||||
|
||||
Reference in New Issue
Block a user