- did some cleanup and consolidation on damage factor code while converting it all to floating point.

- made armor properties floating point.
This commit is contained in:
Christoph Oelckers 2016-03-22 16:35:41 +01:00
commit af427b80bd
19 changed files with 104 additions and 112 deletions

View file

@ -1283,8 +1283,8 @@ static void ParseDamageDefinition(FScanner &sc)
if (sc.Compare("FACTOR"))
{
sc.MustGetFloat();
dtd.DefaultFactor = FLOAT2FIXED(sc.Float);
if (!dtd.DefaultFactor) dtd.ReplaceFactor = true; // Multiply by 0 yields 0: FixedMul(damage, FixedMul(factor, 0)) is more wasteful than FixedMul(factor, 0)
dtd.DefaultFactor = sc.Float;
if (dtd.DefaultFactor == 0) dtd.ReplaceFactor = true; // Multiply by 0 yields 0: FixedMul(damage, FixedMul(factor, 0)) is more wasteful than FixedMul(factor, 0)
}
else if (sc.Compare("REPLACEFACTOR"))
{