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