- use TArrays instead of TMaps to store damage factors and pain chances.

For these fields maps have no advantage. Linearly searching a small array with up to 10 entries is nearly always faster than generating a hash for finding the entry in the map.
This commit is contained in:
Christoph Oelckers 2017-04-11 23:29:37 +02:00
commit 854053a14f
12 changed files with 89 additions and 101 deletions

View file

@ -2889,7 +2889,7 @@ void ZCCCompiler::CompileStates()
}
else
{
flags = static_cast<PClassActor *>(c->Type())->DefaultStateUsage;
flags = static_cast<PClassActor *>(c->Type())->ActorInfo()->DefaultStateUsage;
}
auto st = s->Body;
if (st != nullptr) do