equal
deleted
inserted
replaced
1240 gtFlame, |
1240 gtFlame, |
1241 gtExplosives, |
1241 gtExplosives, |
1242 gtStructure: begin |
1242 gtStructure: begin |
1243 // Run the calcs only once we know we have a type that will need damage |
1243 // Run the calcs only once we know we have a type that will need damage |
1244 if hwRound(hwAbs(Gear^.X-fX)+hwAbs(Gear^.Y-fY)) < dmgBase then |
1244 if hwRound(hwAbs(Gear^.X-fX)+hwAbs(Gear^.Y-fY)) < dmgBase then |
1245 dmg:= dmgBase - hwRound(Distance(Gear^.X - fX, Gear^.Y - fY)); |
1245 dmg:= dmgBase - max(hwRound(Distance(Gear^.X - fX, Gear^.Y - fY)),Gear^.Radius); |
1246 if dmg > 1 then |
1246 if dmg > 1 then |
1247 begin |
1247 begin |
1248 dmg:= ModifyDamage(min(dmg div 2, Radius), Gear); |
1248 dmg:= ModifyDamage(min(dmg div 2, Radius), Gear); |
1249 //AddFileLog('Damage: ' + inttostr(dmg)); |
1249 //AddFileLog('Damage: ' + inttostr(dmg)); |
1250 if (Mask and EXPLNoDamage) = 0 then |
1250 if (Mask and EXPLNoDamage) = 0 then |