mirror of
https://github.com/wega-team/ss14-wega.git
synced 2026-02-15 03:31:44 +01:00
Fixes Opporozidone Instarot issues (#42472)
Removes a vestigial shutdown handler When opporozidone removes the RottingComponent, the PerishableComponent's RotNextUpdate is set to 0 - and then it undergoes a period of catch-up to the current time. If the entity is susceptible to rot in that interval, it'll accumulate 2 minutes 30 seconds worth of rot, per second. This gets worse the longer the server has been running, as there's a greater value in _timing.CurTime to catch up to. This handler seems to be vestigial from the MiasmaSystem and does not seem to be necessary for anything anymore.
This commit is contained in:
@@ -25,7 +25,6 @@ public abstract class SharedRottingSystem : EntitySystem
|
||||
SubscribeLocalEvent<PerishableComponent, MobStateChangedEvent>(OnMobStateChanged);
|
||||
SubscribeLocalEvent<PerishableComponent, ExaminedEvent>(OnPerishableExamined);
|
||||
|
||||
SubscribeLocalEvent<RottingComponent, ComponentShutdown>(OnShutdown);
|
||||
SubscribeLocalEvent<RottingComponent, MobStateChangedEvent>(OnRottingMobStateChanged);
|
||||
SubscribeLocalEvent<RottingComponent, RejuvenateEvent>(OnRejuvenate);
|
||||
SubscribeLocalEvent<RottingComponent, ExaminedEvent>(OnExamined);
|
||||
@@ -63,14 +62,6 @@ public abstract class SharedRottingSystem : EntitySystem
|
||||
args.PushMarkup(Loc.GetString(description, ("target", Identity.Entity(perishable, EntityManager))));
|
||||
}
|
||||
|
||||
private void OnShutdown(Entity<RottingComponent> ent, ref ComponentShutdown args)
|
||||
{
|
||||
if (TryComp<PerishableComponent>(ent, out var perishable))
|
||||
{
|
||||
perishable.RotNextUpdate = TimeSpan.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnRottingMobStateChanged(EntityUid uid, RottingComponent component, MobStateChangedEvent args)
|
||||
{
|
||||
if (args.NewMobState == MobState.Dead)
|
||||
|
||||
Reference in New Issue
Block a user