equal
deleted
inserted
replaced
104 gtSMine, |
104 gtSMine, |
105 gtCase, |
105 gtCase, |
106 gtTarget, |
106 gtTarget, |
107 gtFlame, |
107 gtFlame, |
108 gtKnife, |
108 gtKnife, |
109 gtExplosives, |
109 gtExplosives: begin //, |
110 gtStructure: begin |
110 //gtStructure: begin |
111 // Run the calcs only once we know we have a type that will need damage |
111 // Run the calcs only once we know we have a type that will need damage |
112 tdX:= Gear^.X-fX; |
112 tdX:= Gear^.X-fX; |
113 tdY:= Gear^.Y-fY; |
113 tdY:= Gear^.Y-fY; |
114 if LongInt(tdX.Round + tdY.Round + 2) < dmgBase then |
114 if LongInt(tdX.Round + tdY.Round + 2) < dmgBase then |
115 dmg:= dmgBase - hwRound(Distance(tdX, tdY)); |
115 dmg:= dmgBase - hwRound(Distance(tdX, tdY)); |
241 CurrentHedgehog^.Gear^.LastDamage := CurrentHedgehog; |
241 CurrentHedgehog^.Gear^.LastDamage := CurrentHedgehog; |
242 spawnHealthTagForHH(CurrentHedgehog^.Gear, tmpDmg); |
242 spawnHealthTagForHH(CurrentHedgehog^.Gear, tmpDmg); |
243 end; |
243 end; |
244 uStats.HedgehogDamaged(Gear, AttackerHog, Damage, false); |
244 uStats.HedgehogDamaged(Gear, AttackerHog, Damage, false); |
245 end; |
245 end; |
246 end |
246 end; |
247 else if Gear^.Kind <> gtStructure then // not gtHedgehog nor gtStructure |
247 //else if Gear^.Kind <> gtStructure then // not gtHedgehog nor gtStructure |
248 Gear^.Hedgehog:= AttackerHog; |
248 Gear^.Hedgehog:= AttackerHog; |
249 inc(Gear^.Damage, Damage); |
249 inc(Gear^.Damage, Damage); |
250 |
250 |
251 ScriptCall('onGearDamage', Gear^.UID, Damage); |
251 ScriptCall('onGearDamage', Gear^.UID, Damage); |
252 end; |
252 end; |