Prevent non-inital infected from getting the succumb to zombie action (#27820)
* b * Update ZombieRuleSystem.cs * hi
This commit is contained in:
@@ -64,9 +64,16 @@ namespace Content.Server.Zombies
|
||||
|
||||
SubscribeLocalEvent<PendingZombieComponent, MapInitEvent>(OnPendingMapInit);
|
||||
|
||||
SubscribeLocalEvent<IncurableZombieComponent, MapInitEvent>(OnPendingMapInit);
|
||||
|
||||
SubscribeLocalEvent<ZombifyOnDeathComponent, MobStateChangedEvent>(OnDamageChanged);
|
||||
}
|
||||
|
||||
private void OnPendingMapInit(EntityUid uid, IncurableZombieComponent component, MapInitEvent args)
|
||||
{
|
||||
_actions.AddAction(uid, ref component.Action, component.ZombifySelfActionPrototype);
|
||||
}
|
||||
|
||||
private void OnPendingMapInit(EntityUid uid, PendingZombieComponent component, MapInitEvent args)
|
||||
{
|
||||
if (_mobState.IsDead(uid))
|
||||
@@ -77,7 +84,6 @@ namespace Content.Server.Zombies
|
||||
|
||||
component.NextTick = _timing.CurTime + TimeSpan.FromSeconds(1f);
|
||||
component.GracePeriod = _random.Next(component.MinInitialInfectedGrace, component.MaxInitialInfectedGrace);
|
||||
_actions.AddAction(uid, ref component.Action, component.ZombifySelfActionPrototype);
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
|
||||
Reference in New Issue
Block a user