Engine:
authorsmaxx
Sat, 21 Aug 2010 22:36:59 +0200
changeset 3749 d0920e92008e
parent 3748 daea2650a5aa
child 3750 3aa85b5f3318
Engine: * Keep sudden death from starting while using a multi shot weapon (will start after the last shot now) - This fixes issue #1 * Keep the engine from crashing when trying to place a girder at the bottom map border (right above the water line) - This fixes issue #16
hedgewars/uGears.pas
hedgewars/uLandGraphics.pas
--- a/hedgewars/uGears.pas	Sat Aug 21 17:19:52 2010 +0200
+++ b/hedgewars/uGears.pas	Sat Aug 21 22:36:59 2010 +0200
@@ -779,7 +779,7 @@
             inc(step)
             end;
     stHealth: begin
-            if (TotalRounds = cSuddenDTurns - 1) and (cHealthDecrease = 0) then
+            if (TotalRounds = cSuddenDTurns - 1) and (cHealthDecrease = 0) and not isInMultiShoot then
                 begin
                 cHealthDecrease:= 5;
                 AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState);
--- a/hedgewars/uLandGraphics.pas	Sat Aug 21 17:19:52 2010 +0200
+++ b/hedgewars/uLandGraphics.pas	Sat Aug 21 22:36:59 2010 +0200
@@ -618,10 +618,10 @@
             begin
             for x:= 0 to Pred(w) do
                 if PLongword(@(p^[x * 4]))^ <> 0 then
-                   if ((cpY + y) < Longint(topY)) or
-                      ((cpY + y) > LAND_HEIGHT) or
-                      ((cpX + x) < Longint(leftX)) or
-                      ((cpX + x) > Longint(rightX)) or
+                   if ((cpY + y) <= Longint(topY)) or
+                      ((cpY + y) >= LAND_HEIGHT) or
+                      ((cpX + x) <= Longint(leftX)) or
+                      ((cpX + x) >= Longint(rightX)) or
                       (Land[cpY + y, cpX + x] <> 0) then
                       begin
                       if SDL_MustLock(Image) then