summary |
shortlog |
changelog |
graph |
tags |
bookmarks |
branches |
files |
changeset |
raw |
help

author | nemo |

Thu, 15 Dec 2011 11:06:36 -0500 | |

changeset 6530 | dc6ce7eb556b |

parent 6529 | 40f9ef7d824d |

child 6531 | c938a35588af |

Experiment. Applying density to both ammoshove and explosion, w/ distance of a hedgehog knock being standard value (/3 since hedgehog "density" is 3)

--- a/hedgewars/uGears.pas Mon Dec 12 19:23:05 2011 +0100 +++ b/hedgewars/uGears.pas Thu Dec 15 11:06:36 2011 -0500 @@ -729,16 +729,8 @@ if ((Mask and EXPLDoNotTouchAny) = 0) and (((Mask and EXPLDoNotTouchHH) = 0) or (Gear^.Kind <> gtHedgehog)) then begin DeleteCI(Gear); - if Gear^.Kind <> gtHedgehog then - begin - Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, Gear^.X - fX)/Gear^.Density; - Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, Gear^.Y - fY)/Gear^.Density; - end - else - begin - Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, Gear^.X - fX); - Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, Gear^.Y - fY); - end; + Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, Gear^.X - fX)/(Gear^.Density/_3); + Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, Gear^.Y - fY)/(Gear^.Density/_3); Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser); if not Gear^.Invulnerable then @@ -909,8 +901,8 @@ end else begin - Gear^.dX:= Ammo^.dX * Power * _0_01; - Gear^.dY:= Ammo^.dY * Power * _0_01 + Gear^.dX:= (Ammo^.dX * Power * _0_01)/(Gear^.Density/_3); + Gear^.dY:= (Ammo^.dY * Power * _0_01)/(Gear^.Density/_3); end; Gear^.Active:= true;