Make ghost boo action start with a cooldown. (#12936)

This commit is contained in:
Leon Friedrich
2022-12-14 14:07:36 +13:00
committed by GitHub
parent 0982ef3cea
commit fadf9476de

View File

@@ -116,8 +116,12 @@ namespace Content.Server.Ghost
eye.VisibilityMask |= (uint) VisibilityFlags.Ghost;
}
component.TimeOfDeath = _gameTiming.RealTime;
var time = _gameTiming.CurTime;
component.TimeOfDeath = time;
// TODO ghost: remove once ghosts are persistent and aren't deleted when returning to body
if (component.Action.UseDelay != null)
component.Action.Cooldown = (time, time + component.Action.UseDelay.Value);
_actions.AddAction(uid, component.Action, null);
}