Fix use delay (#6031)
This commit is contained in:
@@ -46,12 +46,9 @@ namespace Content.Shared.Timing
|
||||
|
||||
_lastUseTime = IoCManager.Resolve<IGameTiming>().CurTime;
|
||||
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(Owner, out ItemCooldownComponent? cooldown))
|
||||
{
|
||||
cooldown.CooldownStart = _lastUseTime;
|
||||
cooldown.CooldownEnd = _lastUseTime + TimeSpan.FromSeconds(Delay);
|
||||
}
|
||||
|
||||
var cooldown = IoCManager.Resolve<IEntityManager>().EnsureComponent<ItemCooldownComponent>(Owner);
|
||||
cooldown.CooldownStart = _lastUseTime;
|
||||
cooldown.CooldownEnd = _lastUseTime + TimeSpan.FromSeconds(Delay);
|
||||
}
|
||||
|
||||
public void Cancel()
|
||||
|
||||
Reference in New Issue
Block a user