Fix the health status effect not showing after spawn (#2013)
This commit is contained in:
@@ -54,7 +54,7 @@ namespace Content.Client.GameObjects.Components.Mobs.State
|
|||||||
}
|
}
|
||||||
|
|
||||||
_currentDamageState = state.DamageState;
|
_currentDamageState = state.DamageState;
|
||||||
CurrentMobState.ExitState(Owner);
|
CurrentMobState?.ExitState(Owner);
|
||||||
CurrentMobState = Behavior[CurrentDamageState];
|
CurrentMobState = Behavior[CurrentDamageState];
|
||||||
CurrentMobState.EnterState(Owner);
|
CurrentMobState.EnterState(Owner);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,17 +25,11 @@ namespace Content.Shared.GameObjects.Components.Mobs.State
|
|||||||
|
|
||||||
public virtual DamageState CurrentDamageState { get; protected set; }
|
public virtual DamageState CurrentDamageState { get; protected set; }
|
||||||
|
|
||||||
public override void OnAdd()
|
|
||||||
{
|
|
||||||
base.OnAdd();
|
|
||||||
|
|
||||||
CurrentDamageState = DamageState.Alive;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
|
CurrentDamageState = DamageState.Alive;
|
||||||
CurrentMobState = Behavior[CurrentDamageState];
|
CurrentMobState = Behavior[CurrentDamageState];
|
||||||
CurrentMobState.EnterState(Owner);
|
CurrentMobState.EnterState(Owner);
|
||||||
CurrentMobState.UpdateState(Owner);
|
CurrentMobState.UpdateState(Owner);
|
||||||
|
|||||||
Reference in New Issue
Block a user