- Fix desert eagle
authorunc0rr
Thu, 24 May 2007 18:48:35 +0000
changeset 519 981df6f6e2a9
parent 518 d48d8c0a546d
child 520 e83dfb7ffead
- Fix desert eagle - Fix problem with binds when restoring game from save
hedgewars/GSHandlers.inc
hedgewars/HHHandlers.inc
hedgewars/uGame.pas
--- a/hedgewars/GSHandlers.inc	Tue May 22 16:31:59 2007 +0000
+++ b/hedgewars/GSHandlers.inc	Thu May 24 18:48:35 2007 +0000
@@ -321,7 +321,7 @@
   y:= hwRound(Gear^.Y);
   if ((y and $FFFFFC00) = 0) and ((x and $FFFFF800) = 0)
      and (Land[y, x] <> 0) then inc(Gear^.Damage);
-  AmmoShove(Gear, 7, 20);
+  if Gear^.Damage > 5 then AmmoShove(Gear, 7, 20);
   dec(i)
 until (i = 0) or (Gear^.Damage > Gear^.Health);
 if Gear^.Damage > 0 then
--- a/hedgewars/HHHandlers.inc	Tue May 22 16:31:59 2007 +0000
+++ b/hedgewars/HHHandlers.inc	Thu May 24 18:48:35 2007 +0000
@@ -48,8 +48,7 @@
            StopSound(sndThrowPowerUp);
            PlaySound(sndThrowRelease, false);
            end;
-        xx:= AngleSin(Angle);
-        xx.isNegative:= dX.isNegative;
+        xx:= SignAs(AngleSin(Angle), dX);
         yy:= -AngleCos(Angle);
              case Ammo^[CurSlot, CurAmmo].AmmoType of
                       amGrenade: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtAmmo_Bomb,    0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, Ammo^[CurSlot, CurAmmo].Timer);
--- a/hedgewars/uGame.pas	Tue May 22 16:31:59 2007 +0000
+++ b/hedgewars/uGame.pas	Thu May 24 18:48:35 2007 +0000
@@ -67,6 +67,7 @@
                         end;
                gmtSave: begin
                         RestoreTeamsFromSave;
+                        SetBinds(CurrentTeam^.Binds);
                         isSoundEnabled:= isSEBackup;
                         GameType:= gmtLocal
                         end;