- 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:
parent
1eb106e2c5
commit
af427b80bd
19 changed files with 104 additions and 112 deletions
|
|
@ -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"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue