changing accumulators to timespan targets (#12407)
* changing accumulators to timespan targets * Update Content.Server/Abilities/Mime/MimePowersSystem.cs Co-authored-by: 0x6273 <0x40@keemail.me> * Update MimePowersSystem.cs * serializing timespans and adding pausetime where applicable * remove nullable Co-authored-by: CommieFlowers <rasmus.cedergren@hotmail.com> Co-authored-by: 0x6273 <0x40@keemail.me>
This commit is contained in:
@@ -46,10 +46,11 @@ public sealed class JetpackSystem : SharedJetpackSystem
|
||||
|
||||
foreach (var comp in EntityQuery<ActiveJetpackComponent>())
|
||||
{
|
||||
comp.Accumulator += frameTime;
|
||||
if (_timing.CurTime < comp.TargetTime)
|
||||
continue;
|
||||
|
||||
comp.TargetTime = _timing.CurTime + TimeSpan.FromSeconds(comp.EffectCooldown);
|
||||
|
||||
if (comp.Accumulator < comp.EffectCooldown) continue;
|
||||
comp.Accumulator -= comp.EffectCooldown;
|
||||
CreateParticles(comp.Owner);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user