equal
deleted
inserted
replaced
106 gtExplosives, |
106 gtExplosives, |
107 gtStructure: begin |
107 gtStructure: begin |
108 // Run the calcs only once we know we have a type that will need damage |
108 // Run the calcs only once we know we have a type that will need damage |
109 tdX:= Gear^.X-fX; |
109 tdX:= Gear^.X-fX; |
110 tdY:= Gear^.Y-fY; |
110 tdY:= Gear^.Y-fY; |
111 if hwRound(hwAbs(tdX)+hwAbs(tdY)) < dmgBase then |
111 if (tdX.Round + tdY.Round + 2) < dmgBase then |
112 dmg:= dmgBase - hwRound(Distance(tdX, tdY)); |
112 dmg:= dmgBase - hwRound(Distance(tdX, tdY)); |
113 if dmg > 1 then |
113 if dmg > 1 then |
114 begin |
114 begin |
115 dmg:= ModifyDamage(min(dmg div 2, Radius), Gear); |
115 dmg:= ModifyDamage(min(dmg div 2, Radius), Gear); |
116 //AddFileLog('Damage: ' + inttostr(dmg)); |
116 //AddFileLog('Damage: ' + inttostr(dmg)); |