Change Crate.Lifetime from 'seconds' to ticks

As far as I could tell, this was the last place that still
used 'seconds' instead of ticks, apart from
some sound notification intervals (which are better
converted to real [milli]seconds).

Also renamed ScaredyCat.PanicLength to PanicDuration for
consistency and easier finding.
This commit is contained in:
reaperrr
2021-03-21 00:51:43 +01:00
committed by teinarss
parent e3fd54e147
commit 53e6d974f0
9 changed files with 57 additions and 11 deletions

View File

@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly int PanicChance = 100;
[Desc("How long (in ticks) the actor should panic for.")]
public readonly int PanicLength = 250;
public readonly int PanicDuration = 250;
[Desc("Panic movement speed as a percentage of the normal speed.")]
public readonly int PanicSpeedModifier = 200;
@@ -76,7 +76,7 @@ namespace OpenRA.Mods.Common.Traits
if (!Panicking)
return;
if (self.World.WorldTick >= panicStartedTick + info.PanicLength)
if (self.World.WorldTick >= panicStartedTick + info.PanicDuration)
{
self.CancelActivity();
panicStartedTick = 0;