equal
deleted
inserted
replaced
108 gtExplosives, |
108 gtExplosives, |
109 gtStructure: begin |
109 gtStructure: begin |
110 // Run the calcs only once we know we have a type that will need damage |
110 // Run the calcs only once we know we have a type that will need damage |
111 tdX:= Gear^.X-fX; |
111 tdX:= Gear^.X-fX; |
112 tdY:= Gear^.Y-fY; |
112 tdY:= Gear^.Y-fY; |
113 if (tdX.Round + tdY.Round + 2) < dmgBase then |
113 if LongInt(tdX.Round + tdY.Round + 2) < dmgBase then |
114 dmg:= dmgBase - hwRound(Distance(tdX, tdY)); |
114 dmg:= dmgBase - hwRound(Distance(tdX, tdY)); |
115 if dmg > 1 then |
115 if dmg > 1 then |
116 begin |
116 begin |
117 dmg:= ModifyDamage(min(dmg div 2, Radius), Gear); |
117 dmg:= ModifyDamage(min(dmg div 2, Radius), Gear); |
118 //AddFileLog('Damage: ' + inttostr(dmg)); |
118 //AddFileLog('Damage: ' + inttostr(dmg)); |
142 end; |
142 end; |
143 gtGrave: begin |
143 gtGrave: begin |
144 // Run the calcs only once we know we have a type that will need damage |
144 // Run the calcs only once we know we have a type that will need damage |
145 tdX:= Gear^.X-fX; |
145 tdX:= Gear^.X-fX; |
146 tdY:= Gear^.Y-fY; |
146 tdY:= Gear^.Y-fY; |
147 if (tdX.Round + tdY.Round + 2) < dmgBase then |
147 if LongInt(tdX.Round + tdY.Round + 2) < dmgBase then |
148 dmg:= dmgBase - hwRound(Distance(tdX, tdY)); |
148 dmg:= dmgBase - hwRound(Distance(tdX, tdY)); |
149 if dmg > 1 then |
149 if dmg > 1 then |
150 begin |
150 begin |
151 dmg:= ModifyDamage(min(dmg div 2, Radius), Gear); |
151 dmg:= ModifyDamage(min(dmg div 2, Radius), Gear); |
152 Gear^.dY:= - _0_004 * dmg; |
152 Gear^.dY:= - _0_004 * dmg; |