merge default qmlfrontend
authorunc0rr
Mon, 04 May 2015 17:49:15 +0300
branchqmlfrontend
changeset 10922 999d95494fe7
parent 10908 1bd7a3a28b18 (current diff)
parent 10921 05e6f3b02612 (diff)
child 10925 be9ce3dc3739
merge default
share/hedgewars/Data/Scripts/Multiplayer/TechRacer.hwp
--- a/cmake_modules/paths.cmake	Mon May 04 17:48:57 2015 +0300
+++ b/cmake_modules/paths.cmake	Mon May 04 17:49:15 2015 +0300
@@ -60,11 +60,12 @@
     set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks")
     #install_name_tool for libraries
     set(CMAKE_INSTALL_NAME_DIR "@executable_path/../Frameworks")
-else(APPLE)
+else(APPLE AND NOT (${CMAKE_INSTALL_PREFIX} MATCHES "/usr"))
     #paths where to find libraries (final slash not optional):
     # - the first is relative to the executable
     # - the second is the same directory of the executable (so it runs in bin/)
     # - the third one is the full path of the system dir
     #source http://www.cmake.org/pipermail/cmake/2008-January/019290.html
+    #skip this if the install prefix is the standard one
     set(CMAKE_INSTALL_RPATH "$ORIGIN/../${target_library_install_dir}/:$ORIGIN/:${CMAKE_INSTALL_PREFIX}/${target_library_install_dir}/")
 endif(APPLE)
--- a/gameServer/NetRoutines.hs	Mon May 04 17:48:57 2015 +0300
+++ b/gameServer/NetRoutines.hs	Mon May 04 17:49:15 2015 +0300
@@ -29,18 +29,18 @@
 import qualified Data.ByteString.Char8 as B
 import qualified Control.Exception as E
 import System.Entropy
+import Data.Either
 -----------------------------
 import CoreTypes
 import Utils
 
 
 acceptLoop :: Socket -> Chan CoreMessage -> IO ()
-acceptLoop servSock chan = E.bracket openHandle closeHandle f
+acceptLoop servSock chan = E.bracket openHandle closeHandle (forever . f)
     where
-    f ch = forever $
-        do
-        (sock, sockAddr) <- Network.Socket.accept servSock
-
+    f ch = E.try (Network.Socket.accept servSock) >>= \v -> case v of
+      Left (e :: E.IOException) -> return ()
+      Right (sock, sockAddr) -> do
         clientHost <- sockAddr2String sockAddr
 
         currentTime <- getCurrentTime
--- a/gameServer/OfficialServer/extdbinterface.hs	Mon May 04 17:48:57 2015 +0300
+++ b/gameServer/OfficialServer/extdbinterface.hs	Mon May 04 17:49:15 2015 +0300
@@ -25,8 +25,9 @@
 import Control.Exception
 import System.IO
 import Data.Maybe
-import Database.HDBC
-import Database.HDBC.MySQL
+import Database.MySQL.Simple
+import Database.MySQL.Simple.QueryResults
+import Database.MySQL.Simple.Result
 import Data.List (lookup)
 import qualified Data.ByteString.Char8 as B
 import Data.Word
@@ -58,45 +59,44 @@
 
     case q of
         CheckAccount clId clUid clNick _ -> do
-                statement <- prepare dbConn dbQueryAccount
-                execute statement [SqlByteString clNick]
-                result <- fetchRow statement
-                finish statement
-                let response =
-                        if isJust result then let [pass, adm, contr] = fromJust result in
-                        (
-                            clId,
-                            clUid,
-                            HasAccount
-                                (fromSql pass)
-                                (fromSql adm == Just (1 :: Int))
-                                (fromSql contr == Just (1 :: Int))
-                        )
-                        else
-                        (clId, clUid, Guest)
+                results <- query dbConn dbQueryAccount $ Only clNick
+                let response = case results of
+                        [(pass, adm, contr)] ->
+                            (
+                                clId,
+                                clUid,
+                                HasAccount
+                                    (pass)
+                                    (adm == Just (1 :: Int))
+                                    (contr == Just (1 :: Int))
+                            )
+                        _ ->
+                            (clId, clUid, Guest)
                 print response
                 hFlush stdout
 
         GetReplayName clId clUid fileId -> do
-                statement <- prepare dbConn dbQueryReplayFilename
-                execute statement [SqlByteString fileId]
-                result <- fetchRow statement
-                finish statement
-                let fn = if (isJust result) then fromJust . fromSql . head . fromJust $ result else ""
+                results <- query dbConn dbQueryReplayFilename $ Only fileId
+                let fn = if null results then "" else fromOnly $ head results
                 print (clId, clUid, ReplayName fn)
                 hFlush stdout
 
         SendStats clients rooms ->
-                run dbConn dbQueryStats [SqlInt32 $ fromIntegral clients, SqlInt32 $ fromIntegral rooms] >> return ()
+                void $ execute dbConn dbQueryStats (clients, rooms)
 --StoreAchievements (B.pack fileName) (map toPair teams) info
         StoreAchievements p fileName teams info ->
-            mapM_ (run dbConn dbQueryAchievement) $ (parseStats p fileName teams) info
+            void $ executeMany dbConn dbQueryAchievement $ (parseStats p fileName teams) info
 
 
 readTime = read . B.unpack . B.take 19 . B.drop 8
 
 
-parseStats :: Word16 -> B.ByteString -> [(B.ByteString, B.ByteString)] -> [B.ByteString] -> [[SqlValue]]
+parseStats :: 
+    Word16 
+    -> B.ByteString 
+    -> [(B.ByteString, B.ByteString)] 
+    -> [B.ByteString] 
+    -> [(B.ByteString, B.ByteString, B.ByteString, Int, B.ByteString, B.ByteString, Int)]
 parseStats p fileName teams = ps
     where
     time = readTime fileName
@@ -104,22 +104,22 @@
     ps ("DRAW" : bs) = ps bs
     ps ("WINNERS" : n : bs) = ps $ drop (readInt_ n) bs
     ps ("ACHIEVEMENT" : typ : teamname : location : value : bs) =
-        [ SqlUTCTime time
-        , SqlByteString typ
-        , SqlByteString $ fromMaybe "" (lookup teamname teams)
-        , SqlInt32 (readInt_ value)
-        , SqlByteString fileName
-        , SqlByteString location
-        , SqlInt32 $ fromIntegral p
-        ] : ps bs
+        ( time
+        , typ
+        , fromMaybe "" (lookup teamname teams)
+        , readInt_ value
+        , fileName
+        , location
+        , fromIntegral p
+        ) : ps bs
     ps (b:bs) = ps bs
 
 
 dbConnectionLoop mySQLConnectionInfo =
-    Control.Exception.handle (\(e :: IOException) -> hPutStrLn stderr $ show e) $ handleSqlError $
+    Control.Exception.handle (\(e :: SomeException) -> hPutStrLn stderr $ show e) $
         bracket
-            (connectMySQL mySQLConnectionInfo)
-            disconnect
+            (connect mySQLConnectionInfo)
+            close
             dbInteractionLoop
 
 
@@ -132,6 +132,11 @@
         dbLogin <- getLine
         dbPassword <- getLine
 
-        let mySQLConnectInfo = defaultMySQLConnectInfo {mysqlHost = dbHost, mysqlDatabase = dbName, mysqlUser = dbLogin, mysqlPassword = dbPassword}
+        let mySQLConnectInfo = defaultConnectInfo {
+            connectHost = dbHost
+            , connectDatabase = dbName
+            , connectUser = dbLogin
+            , connectPassword = dbPassword
+            }
 
         dbConnectionLoop mySQLConnectInfo
--- a/hedgewars/pas2cRedo.pas	Mon May 04 17:48:57 2015 +0300
+++ b/hedgewars/pas2cRedo.pas	Mon May 04 17:49:15 2015 +0300
@@ -68,7 +68,7 @@
 
     new, dispose, FillChar, Insert, Delete, Move : procedure;
 
-    trunc, round : function : integer;
+    trunc, round, ceil : function : integer;
     abs, sqr : function : integer;
 
     StrPas, FormatDateTime, copy, str, PosS, trim, LowerCase : function : shortstring;
--- a/hedgewars/uChat.pas	Mon May 04 17:48:57 2015 +0300
+++ b/hedgewars/uChat.pas	Mon May 04 17:49:15 2015 +0300
@@ -36,7 +36,7 @@
 uses SDLh, uInputHandler, uTypes, uVariables, uCommands, uUtils, uTextures, uRender, uIO, uScript, uRenderUtils;
 
 const MaxStrIndex = 27;
-      MaxInputStrLen = 240;
+      MaxInputStrLen = 200;
 
 type TChatLine = record
     Tex: PTexture;
@@ -47,19 +47,15 @@
     end;
     TChatCmd = (ccQuit, ccPause, ccFinish, ccShowHistory, ccFullScreen);
 
-type TInputStrL = array[0..260] of byte;
-
 var Strs: array[0 .. MaxStrIndex] of TChatLine;
     MStrs: array[0 .. MaxStrIndex] of shortstring;
     LocalStrs: array[0 .. MaxStrIndex] of shortstring;
-    LocalStrsL: array[0 .. MaxStrIndex] of TInputStrL;
     missedCount: LongWord;
     lastStr: LongWord;
     localLastStr: LongInt;
     history: LongInt;
     visibleCount: LongWord;
     InputStr: TChatLine;
-    InputStrL: TInputStrL; // for full str + 4-byte utf-8 char
     ChatReady: boolean;
     showAll: boolean;
     liveLua: boolean;
@@ -72,8 +68,6 @@
 
 
 const
-    InputStrLNoPred: byte = 255;
-
     colors: array[#0..#6] of TSDL_Color = (
             (r:$FF; g:$FF; b:$FF; a:$FF), // unused, feel free to take it for anything
             (r:$FF; g:$FF; b:$FF; a:$FF), // chat message [White]
@@ -98,6 +92,13 @@
 const Padding  = 2;
       ClHeight = 2 * Padding + 16; // font height
 
+// relevant for UTF-8 handling
+function IsFirstCharByte(c: char): boolean; inline;
+begin
+    // based on https://en.wikipedia.org/wiki/UTF-8#Description
+    IsFirstCharByte:= (byte(c) and $C0) <> $80;
+end;
+
 function charIsForHogSpeech(c: char): boolean;
 begin
 exit((c = '"') or (c = '''') or (c = '-'));
@@ -427,7 +428,6 @@
     // put in input history
     localLastStr:= (localLastStr + 1) mod MaxStrIndex;
     LocalStrs[localLastStr]:= s;
-    LocalStrsL[localLastStr]:= InputStrL;
     end;
 
 t:= LocalTeam;
@@ -576,7 +576,7 @@
 end;
 
 procedure DelBytesFromInputStrBack(endIdx: integer; count: byte);
-var i, startIdx: integer;
+var startIdx: integer;
 begin
     // nothing to do if count is 0
     if count = 0 then
@@ -588,45 +588,48 @@
     // delete bytes from string
     Delete(InputStr.s, startIdx, count);
 
-    // wipe utf8 info for deleted char
-    InputStrL[endIdx]:= InputStrLNoPred;
-
-    // shift utf8 char info to reflect new string
-    for i:= endIdx + 1 to Length(InputStr.s) + count do
-        begin
-        if InputStrL[i] <> InputStrLNoPred then
-            begin
-            InputStrL[i-count]:= InputStrL[i] - count;
-            InputStrL[i]:= InputStrLNoPred;
-            end;
-        end;
-
     SetLine(InputStr, InputStr.s, true);
 end;
 
-// returns count of removed bytes
-function DelCharFromInputStr(idx: integer): integer;
-var btw: byte;
+procedure MoveCursorToPreviousChar();
 begin
-    // note: idx is always at last byte of utf8 chars. cuz relevant for InputStrL
-
-    if (Length(InputStr.s) < 1) or (idx < 1) or (idx > Length(InputStr.s)) then
-        exit(0);
-
-    btw:= byte(idx) - InputStrL[idx];
-
-    DelCharFromInputStr:= btw;
-
-    DelBytesFromInputStrBack(idx, btw);
+    if cursorPos > 0 then
+        begin
+        while (not IsFirstCharByte(InputStr.s[cursorPos])) do
+            begin
+            dec(cursorPos);
+            end;
+        dec(cursorPos);
+        end;
 end;
 
-// unchecked
-procedure DoCursorStepForward();
+procedure MoveCursorToNextChar();
 begin
-    // go to end of next utf8-char
-    repeat
-        inc(cursorPos);
-    until InputStrL[cursorPos] <> InputStrLNoPred;
+    if cursorPos <  Length(InputStr.s) then
+        begin
+        inc(cursorPos, 2);
+        while (cursorPos <  Length(InputStr.s)) and (not IsFirstCharByte(InputStr.s[cursorPos])) do
+            begin
+            inc(cursorPos);
+            end;
+        dec(cursorPos);
+        end;
+end;
+
+procedure DeleteLastUTF8CharFromStr(var s: shortstring);
+var l: byte;
+begin
+    l:= Length(s);
+
+    while (l > 1) and (not IsFirstCharByte(s[l])) do
+        begin
+        dec(l);
+        end;
+
+    if l > 0 then
+        dec(l);
+
+    s[0]:= char(l);
 end;
 
 procedure DeleteSelected();
@@ -635,8 +638,8 @@
         begin
         DelBytesFromInputStrBack(max(cursorPos, selectedPos), abs(selectedPos-cursorPos));
         cursorPos:= min(cursorPos, selectedPos);
-        ResetSelection();
         end;
+    ResetSelection();
     UpdateCursorCoords();
 end;
 
@@ -656,10 +659,6 @@
 function GetInputCharSkipClass(index: LongInt): TCharSkip;
 var  c: char;
 begin
-    // multi-byte chars counts as letter
-    if (index > 1) and (InputStrL[index] <> index - 1) then
-        exit(numalpha);
-
     c:= InputStr.s[index];
 
     // non-ascii counts as letter
@@ -700,33 +699,31 @@
         begin
         skip:= GetInputCharSkipClass(cursorPos);
         if skip = wspace then
-            cursorPos:= InputStrL[cursorPos];
+            MoveCursorToPreviousChar();
         end;
     // skip same-type chars
     while (cursorPos > 0) and (GetInputCharSkipClass(cursorPos) = skip) do
-        cursorPos:= InputStrL[cursorPos];
+        MoveCursorToPreviousChar();
     end
 else
     begin
     // skip same-type chars
     while cursorPos < Length(InputStr.s) do
         begin
-        DoCursorStepForward();
+        MoveCursorToNextChar();
         if (GetInputCharSkipClass(cursorPos) <> skip) then
             begin
-            // go back 1 char
-            cursorPos:= InputStrL[cursorPos];
+            MoveCursorToPreviousChar();
             break;
             end;
         end;
     // skip trailing whitespace, similar to Qt
     while cursorPos < Length(InputStr.s) do
         begin
-        DoCursorStepForward();
+        MoveCursorToNextChar();
         if (GetInputCharSkipClass(cursorPos) <> wspace) then
             begin
-            // go back 1 char
-            cursorPos:= InputStrL[cursorPos];
+            MoveCursorToPreviousChar();
             break;
             end;
         end;
@@ -748,42 +745,44 @@
         end;
 end;
 
-// TODO: honor utf8, don't break utf8 chars when shifting chars beyond limit
 procedure InsertIntoInputStr(s: shortstring);
-var i, l, il, lastc: integer;
+var limit: integer;
 begin
-    // safe length for string
-    l:= min(MaxInputStrLen-cursorPos, Length(s));
-    s:= copy(s,1,l);
+    // we check limit for trailing stuff before insertion limit for a reason
+    // (possible remaining space after too long UTF8-insertion has been shortened)
 
-    // if we insert rather than append, shift info in InputStrL accordingly
-    if cursorPos < Length(InputStr.s) then
+    // length limit for stuff to that will trail the insertion
+    limit:= max(cursorPos, MaxInputStrLen-Length(s));
+
+    while Length(InputStr.s) > limit do
         begin
-        for i:= Length(InputStr.s) downto cursorPos + 1 do
-            begin
-            if InputStrL[i] <> InputStrLNoPred then
-                begin
-                il:= i + l;
-                // only shift if not overflowing
-                if il <= MaxInputStrLen then
-                    InputStrL[il]:= InputStrL[i] + l;
-                InputStrL[i]:= InputStrLNoPred;
-                end;
-            end;
+        DeleteLastUTF8CharFromStr(InputStr.s);
         end;
 
-    InputStrL[cursorPos + l]:= cursorPos;
-    // insert string truncated to safe length
-    Insert(s, InputStr.s, cursorPos + 1);
-    if Length(InputStr.s) > MaxInputStrLen then
-        InputStr.s[0]:= char(MaxInputStrLen);
+    // length limit for stuff to insert
+    limit:= max(0, MaxInputStrLen-cursorPos);
+
+    if limit = 0 then
+        s:= ''
+    else while Length(s) > limit do
+        begin
+        DeleteLastUTF8CharFromStr(s);
+        end;
 
-    SetLine(InputStr, InputStr.s, true);
+    if Length(s) > 0 then
+        begin
+        // insert string truncated to safe length
+        Insert(s, InputStr.s, cursorPos + 1);
 
-    // move cursor to end of inserted string
-    lastc:= MaxInputStrLen;
-    cursorPos:= min(lastc, cursorPos + l);
-    UpdateCursorCoords();
+        if Length(InputStr.s) > MaxInputStrLen then
+            InputStr.s[0]:= char(MaxInputStrLen);
+
+        SetLine(InputStr, InputStr.s, true);
+
+        // move cursor to end of inserted string
+        inc(cursorPos, Length(s));
+        UpdateCursorCoords();
+        end;
 end;
 
 procedure PasteFromClipboard();
@@ -821,60 +820,41 @@
             begin
             if selectedPos < 0 then
                 begin
-                if ctrl then
-                    skip:= GetInputCharSkipClass(cursorPos);
-
-                // remove char before cursor
-                dec(cursorPos, DelCharFromInputStr(cursorPos));
+                HandleSelection(true);
 
                 // delete more if ctrl is held
-                if ctrl and (selectedPos < 0) then
-                    begin
-                    HandleSelection(true);
-                    SkipInputChars(skip, true);
-                    DeleteSelected();
-                    end
+                if ctrl then
+                    SkipInputChars(GetInputCharSkipClass(cursorPos), true)
                 else
-                    UpdateCursorCoords();
+                    MoveCursorToPreviousChar();
 
-                end
-            else
-                DeleteSelected();
+                end;
+
+            DeleteSelected();
+            UpdateCursorCoords();
             end;
         SDLK_DELETE:
             begin
             if selectedPos < 0 then
                 begin
-                // remove char after cursor
-                if cursorPos < Length(InputStr.s) then
-                    begin
-                    DoCursorStepForward();
-                    if ctrl then
-                        skip:= GetInputCharSkipClass(cursorPos);
-
-                    // delete char
-                    dec(cursorPos, DelCharFromInputStr(cursorPos));
+                HandleSelection(true);
 
-                    // delete more if ctrl is held
-                    if ctrl and (cursorPos < Length(InputStr.s)) then
-                        begin
-                        HandleSelection(true);
-                        SkipInputChars(skip, false);
-                        DeleteSelected();
-                        end;
-                    end
+                // delete more if ctrl is held
+                if ctrl then
+                    SkipInputChars(GetInputCharSkipClass(cursorPos), false)
                 else
-                    UpdateCursorCoords();
-                end
-            else
-                DeleteSelected();
+                    MoveCursorToNextChar();
+
+                end;
+
+            DeleteSelected();
+            UpdateCursorCoords();
             end;
         SDLK_ESCAPE:
             begin
             if Length(InputStr.s) > 0 then
                 begin
                 SetLine(InputStr, '', true);
-                FillChar(InputStrL, sizeof(InputStrL), InputStrLNoPred);
                 ResetCursor();
                 end
             else CleanupInput
@@ -885,7 +865,6 @@
                 begin
                 AcceptChatString(InputStr.s);
                 SetLine(InputStr, '', false);
-                FillChar(InputStrL, sizeof(InputStrL), InputStrLNoPred);
                 ResetCursor();
                 end;
             CleanupInput
@@ -898,12 +877,10 @@
             if (index > localLastStr) then
                 begin
                 SetLine(InputStr, '', true);
-                FillChar(InputStrL, sizeof(InputStrL), InputStrLNoPred);
                 end
             else
                 begin
                 SetLine(InputStr, LocalStrs[index], true);
-                InputStrL:= LocalStrsL[index];
                 end;
             cursorPos:= Length(InputStr.s);
             ResetSelection();
@@ -946,7 +923,7 @@
                     begin
                     HandleSelection(selMode);
                     // go to end of previous utf8-char
-                    cursorPos:= InputStrL[cursorPos];
+                    MoveCursorToPreviousChar();
                     end
                 else // if we're leaving selection mode, jump to its left end
                     begin
@@ -971,7 +948,7 @@
                 if selMode or (selectedPos < 0) then
                     begin
                     HandleSelection(selMode);
-                    DoCursorStepForward();
+                    MoveCursorToNextChar();
                     end
                 else // if we're leaving selection mode, jump to its right end
                     begin
@@ -1018,7 +995,10 @@
             begin
             // paste
             if ctrl then
-                PasteFromClipboard()
+                begin
+                DeleteSelected();
+                PasteFromClipboard();
+                end
             else
                 action:= false;
             end;
@@ -1062,6 +1042,7 @@
         if Length(InputStr.s) + btw > MaxInputStrLen then
             exit;
 
+        // if speech bubble quotes are used as first input, add the closing quote and place cursor inbetween
         if (Length(InputStr.s) = 0) and (Length(utf8) = 1) and (charIsForHogSpeech(utf8[1])) then
             begin
             InsertIntoInputStr(utf8);
@@ -1127,9 +1108,6 @@
     else
         begin
         SetLine(InputStr, '/team ', true);
-        // update InputStrL and cursor accordingly
-        // this allows cursor-jumping over '/team ' as if it was a single char
-        InputStrL[6]:= 0;
         cursorPos:= 6;
         UpdateCursorCoords();
         end;
@@ -1162,8 +1140,6 @@
     for i:= 0 to MaxStrIndex do
         Strs[i].Tex := nil;
 
-    FillChar(InputStrL, sizeof(InputStrL), InputStrLNoPred);
-
     LastKeyPressTick:= 0;
     ResetCursor();
 end;
--- a/hedgewars/uGearsHandlersMess.pas	Mon May 04 17:48:57 2015 +0300
+++ b/hedgewars/uGearsHandlersMess.pas	Mon May 04 17:49:15 2015 +0300
@@ -437,7 +437,26 @@
             Gear^.dY := tdX*cElastic
             end;
 
-        Gear^.dY.isNegative := not tdY.isNegative;
+        Gear^.dX.isNegative:= tdX.isNegative;
+        Gear^.dY.isNegative:= tdY.isNegative;
+        if (collV > 0) and (collH > 0) and (not tdX.isNegative) and (not tdY.isNegative) then
+            begin
+            Gear^.dX.isNegative := true;
+            Gear^.dY.isNegative := true
+            end
+        else if (collV > 0) and (collH < 0) and (tdX.isNegative or tdY.isNegative) then
+            begin
+            Gear^.dY.isNegative := not tdY.isNegative;
+            if not tdY.isNegative then Gear^.dX.isNegative := false
+            end
+        else if (collV < 0) and (collH > 0) and (not tdX.isNegative) then
+            begin
+            Gear^.dX.isNegative := true;
+            Gear^.dY.isNegative := false
+            end
+        else if (collV < 0) and (collH < 0) and tdX.isNegative and tdY.isNegative then
+            Gear^.dX.isNegative := false;
+       
         isFalling := false;
         Gear^.AdvBounce := 10;
         end;
@@ -463,7 +482,10 @@
         Gear^.State := Gear^.State or gstMoving;
 
     if ((xland or land) and lfBouncy <> 0) and (Gear^.dX.QWordValue < _0_15.QWordValue) and (Gear^.dY.QWordValue < _0_15.QWordValue) then
+        begin
         Gear^.State := Gear^.State or gstCollision;
+        AddFileLog('no more bounce for you!');
+        end;
 
     if ((xland or land) and lfBouncy <> 0) and (Gear^.Radius >= 3) and
        ((Gear^.dX.QWordValue > _0_15.QWordValue) or (Gear^.dY.QWordValue > _0_15.QWordValue)) then
@@ -2516,7 +2538,7 @@
     if hwRound(HHGear^.Y) <= Gear^.Tag - 2 then
         begin
         Gear^.Tag := hwRound(HHGear^.Y);
-        DrawTunnel(HHGear^.X - int2hwFloat(cHHRadius), HHGear^.Y - _1, _0_5, _0, cHHRadius * 4, 2);
+        DrawTunnel(HHGear^.X - int2hwFloat(cHHRadius), HHGear^.Y - _1, _0_5, _0, cHHRadius * 4+2, 2);
         HHGear^.State := HHGear^.State or gstNoDamage;
         Gear^.Y := HHGear^.Y;
         AmmoShove(Gear, 30, 40);
@@ -2829,7 +2851,7 @@
 
     for y:= ty downto ty - ytol do
         begin
-        if TryPlaceOnLand(lx, y, sprHHTelepMask, 0, false, not hasBorder, false, 0) then
+        if TryPlaceOnLand(lx, y, sprHHTelepMask, 0, false, not hasBorder, false, false, false, false, 0, $FFFFFFFF) then
             begin
             valid:= true;
             break;
@@ -3484,6 +3506,7 @@
         begin
         StopSoundChan(Gear^.SoundChannel);
         Gear^.Tag := 1;
+        Gear^.AdvBounce:= 50;
         Gear^.doStep := @doStepDrill
         end;
 
@@ -4190,6 +4213,7 @@
 
     // destroy portal if ground it was attached too is gone
     if (Land[hwRound(Gear^.Y), hwRound(Gear^.X)] <= lfAllObjMask)
+    or (Land[hwRound(Gear^.Y), hwRound(Gear^.X)] and lfBouncy <> 0)
     or (Gear^.Timer < 1)
     or (Gear^.Hedgehog^.Team <> CurrentHedgehog^.Team)
     or CheckCoordInWater(hwRound(Gear^.X), hwRound(Gear^.Y)) then
--- a/hedgewars/uGearsHedgehog.pas	Mon May 04 17:48:57 2015 +0300
+++ b/hedgewars/uGearsHedgehog.pas	Mon May 04 17:49:15 2015 +0300
@@ -895,6 +895,7 @@
         if land and lfBouncy <> 0 then
             begin
             doStepFallingGear(Gear);
+            Gear^.AdvBounce:= 1;
             Gear^.dX:= Gear^.dX * _0_8
             end;
         if (land and lfBouncy = 0) or (Gear^.State and gstCollision <> 0) then
@@ -935,6 +936,7 @@
         if land and lfBouncy <> 0 then
             begin
             doStepFallingGear(Gear);
+            Gear^.AdvBounce:= 1;
             // hogs for some reason have very low friction. slippery little buggers
             Gear^.dX:= Gear^.dX * _0_8
             end;
@@ -1072,6 +1074,7 @@
         land:= TestCollisionYwithXYShift(Gear, 0, 1, 1);
         if land and lfBouncy <> 0 then
             doStepFallingGear(Gear);
+            Gear^.AdvBounce:= 1;
 
         if (land <> 0) and ((land and lfBouncy = 0) or (Gear^.State and gstCollision <> 0)) then
             begin
--- a/hedgewars/uGearsList.pas	Mon May 04 17:48:57 2015 +0300
+++ b/hedgewars/uGearsList.pas	Mon May 04 17:49:15 2015 +0300
@@ -237,7 +237,8 @@
                 end;
   gtMelonPiece: begin
                 gear^.AdvBounce:= 1;
-                gear^.Density:= _2
+                gear^.Density:= _2;
+                gear^.Radius:= 4
                 end;
     gtHedgehog: begin
                 gear^.AdvBounce:= 1;
@@ -467,8 +468,11 @@
                 gear^.Tint:= gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF
                 end;
      gtAirBomb: begin
+                gear^.AdvBounce:= 1;
                 gear^.Radius:= 5;
                 gear^.Density:= _2;
+                gear^.Elasticity:= _0_55;
+                gear^.Friction:= _0_995
                 end;
    gtBlowTorch: begin
                 gear^.Radius:= cHHRadius + cBlowTorchC;
--- a/hedgewars/uLandGraphics.pas	Mon May 04 17:48:57 2015 +0300
+++ b/hedgewars/uLandGraphics.pas	Mon May 04 17:49:15 2015 +0300
@@ -20,7 +20,7 @@
 
 unit uLandGraphics;
 interface
-uses uFloat, uConsts, uTypes;
+uses uFloat, uConsts, uTypes, Math, uRenderUtils;
 
 type
     fillType = (nullPixel, backgroundPixel, ebcPixel, icePixel, setNotCurrentMask, changePixelSetNotCurrent, setCurrentHog, changePixelNotSetNotCurrent);
@@ -49,8 +49,9 @@
 procedure DrawIceBreak(x, y, iceRadius, iceHeight: Longint);
 function TryPlaceOnLandSimple(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, indestructible: boolean): boolean; inline;
 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace: boolean; LandFlags: Word): boolean; inline;
-function ForcePlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; LandFlags: Word): boolean; inline;
-function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, outOfMap, force: boolean; LandFlags: Word): boolean;
+function ForcePlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; LandFlags: Word; Tint: LongWord; Behind, flipHoriz, flipVert: boolean): boolean; inline;
+function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, outOfMap, force, behind, flipHoriz, flipVert: boolean; LandFlags: Word; Tint: LongWord): boolean;
+procedure EraseLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; LandFlags: Word; eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert: boolean);
 function GetPlaceCollisionTex(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt): PTexture;
 
 implementation
@@ -679,37 +680,37 @@
     lf:= lfIndestructible
 else
     lf:= 0;
-TryPlaceOnLandSimple:= TryPlaceOnLand(cpX, cpY, Obj, Frame, doPlace, false, false, lf);
+TryPlaceOnLandSimple:= TryPlaceOnLand(cpX, cpY, Obj, Frame, doPlace, false, false, false, false, false, lf, $FFFFFFFF);
 end;
 
 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace: boolean; LandFlags: Word): boolean; inline;
 begin
-TryPlaceOnLand:= TryPlaceOnLand(cpX, cpY, Obj, Frame, doPlace, false, false, LandFlags);
+TryPlaceOnLand:= TryPlaceOnLand(cpX, cpY, Obj, Frame, doPlace, false, false, false, false, false, LandFlags, $FFFFFFFF);
 end;
 
-function ForcePlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; LandFlags: Word): boolean; inline;
+function ForcePlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; LandFlags: Word; Tint: LongWord; Behind, flipHoriz, flipVert: boolean): boolean; inline;
 begin
-    ForcePlaceOnLand:= TryPlaceOnLand(cpX, cpY, Obj, Frame, true, false, true, LandFlags)
+    ForcePlaceOnLand:= TryPlaceOnLand(cpX, cpY, Obj, Frame, true, false, true, behind, flipHoriz, flipVert, LandFlags, Tint)
 end;
 
-function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, outOfMap, force: boolean; LandFlags: Word): boolean;
+function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, outOfMap, force, behind, flipHoriz, flipVert: boolean; LandFlags: Word; Tint: LongWord): boolean;
 var X, Y, bpp, h, w, row, col, gx, gy, numFramesFirstCol: LongInt;
     p: PByteArray;
     Image: PSDL_Surface;
-    indestructible: boolean;
+    pixel: LongWord;
 begin
 TryPlaceOnLand:= false;
 numFramesFirstCol:= SpritesData[Obj].imageHeight div SpritesData[Obj].Height;
 
-// make land indestructible if lfIndestructible is passed
-indestructible:= (LandFlags and lfIndestructible <> 0);
-
 if outOfMap then doPlace:= false; // just using for a check
 
 TryDo(SpritesData[Obj].Surface <> nil, 'Assert SpritesData[Obj].Surface failed', true);
+
 Image:= SpritesData[Obj].Surface;
 w:= SpritesData[Obj].Width;
 h:= SpritesData[Obj].Height;
+if flipVert then flipSurface(Image, true);
+if flipHoriz then flipSurface(Image, false);
 row:= Frame mod numFramesFirstCol;
 col:= Frame div numFramesFirstCol;
 
@@ -739,8 +740,8 @@
                        SDL_UnlockSurface(Image);
                    exit
                    end;
-        p:= PByteArray(@(p^[Image^.pitch]));
-        end;
+        p:= PByteArray(@(p^[Image^.pitch]))
+        end
     end;
 
 TryPlaceOnLand:= true;
@@ -765,17 +766,32 @@
                     gY:= cpY + y;
                     end
                 else
-                     begin
-                     gX:= (cpX + x) div 2;
-                     gY:= (cpY + y) div 2;
+                    begin
+                    gX:= (cpX + x) div 2;
+                    gY:= (cpY + y) div 2;
+                    end;
+		if not behind or (Land[cpY + y, cpX + x] and lfLandMask = 0) then
+                    begin
+                    if (LandFlags and lfBasic <> 0) or 
+                       (((LandPixels[gY, gX] and AMask) shr AShift = 255) and  // This test assumes lfBasic and lfObject differ only graphically
+                         (LandFlags or lfObject = 0)) then
+                         Land[cpY + y, cpX + x]:= lfBasic or LandFlags
+                    else Land[cpY + y, cpX + x]:= lfObject or LandFlags
                     end;
-                if indestructible then
-                    Land[cpY + y, cpX + x]:= {lfIndestructible or }LandFlags
-                else if (LandPixels[gY, gX] and AMask) shr AShift = 255 then  // This test assumes lfBasic and lfObject differ only graphically
-                    Land[cpY + y, cpX + x]:= lfBasic or LandFlags
-                else
-                    Land[cpY + y, cpX + x]:= lfObject or LandFlags;
-                LandPixels[gY, gX]:= PLongword(@(p^[x * 4]))^
+		if not behind or (LandPixels[gY, gX] = 0) then
+                    begin
+                    if tint = $FFFFFFFF then
+                        LandPixels[gY, gX]:= PLongword(@(p^[x * 4]))^
+                    else 
+                        begin
+                        pixel:= PLongword(@(p^[x * 4]))^;
+                        LandPixels[gY, gX]:= 
+                           ceil((pixel shr RShift and $FF) * ((tint shr 24) / 255)) shl RShift or
+                           ceil((pixel shr GShift and $FF) * ((tint shr 16 and $ff) / 255)) shl GShift or
+                           ceil((pixel shr BShift and $FF) * ((tint shr  8 and $ff) / 255)) shl BShift or
+                           ceil((pixel shr AShift and $FF) * ((tint and $ff) / 255)) shl AShift;
+                        end
+                    end
                 end;
         p:= PByteArray(@(p^[Image^.pitch]));
         end;
@@ -783,6 +799,9 @@
 if SDL_MustLock(Image) then
     SDL_UnlockSurface(Image);
 
+if flipVert then flipSurface(Image, true);
+if flipHoriz then flipSurface(Image, false);
+
 x:= Max(cpX, leftX);
 w:= Min(cpX + Image^.w, LAND_WIDTH) - x;
 y:= Max(cpY, topY);
@@ -797,6 +816,91 @@
 
 end;
 
+procedure EraseLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; LandFlags: Word; eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert: boolean);
+var X, Y, bpp, h, w, row, col, gx, gy, numFramesFirstCol: LongInt;
+    p: PByteArray;
+    Image: PSDL_Surface;
+begin
+numFramesFirstCol:= SpritesData[Obj].imageHeight div SpritesData[Obj].Height;
+
+TryDo(SpritesData[Obj].Surface <> nil, 'Assert SpritesData[Obj].Surface failed', true);
+
+Image:= SpritesData[Obj].Surface;
+w:= SpritesData[Obj].Width;
+h:= SpritesData[Obj].Height;
+if flipVert then flipSurface(Image, true);
+if flipHoriz then flipSurface(Image, false);
+row:= Frame mod numFramesFirstCol;
+col:= Frame div numFramesFirstCol;
+
+if SDL_MustLock(Image) then
+    SDLTry(SDL_LockSurface(Image) >= 0, true);
+
+bpp:= Image^.format^.BytesPerPixel;
+TryDo(bpp = 4, 'It should be 32 bpp sprite', true);
+// Check that sprite fits free space
+p:= PByteArray(@(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ]));
+case bpp of
+    4: for y:= 0 to Pred(h) do
+        begin
+        for x:= 0 to Pred(w) do
+            if ((PLongword(@(p^[x * 4]))^) and AMask) <> 0 then
+                if ((cpY + y) <= Longint(topY)) or ((cpY + y) >= LAND_HEIGHT) or
+                   ((cpX + x) <= Longint(leftX)) or ((cpX + x) >= Longint(rightX)) then
+                   begin
+                   if SDL_MustLock(Image) then
+                       SDL_UnlockSurface(Image);
+                   exit
+                   end;
+        p:= PByteArray(@(p^[Image^.pitch]))
+        end
+    end;
+
+// Checked, now place
+p:= PByteArray(@(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ]));
+case bpp of
+    4: for y:= 0 to Pred(h) do
+        begin
+        for x:= 0 to Pred(w) do
+            if ((PLongword(@(p^[x * 4]))^) and AMask) <> 0 then
+                   begin
+                if (cReducedQuality and rqBlurryLand) = 0 then
+                    begin
+                    gX:= cpX + x;
+                    gY:= cpY + y;
+                    end
+                else
+                    begin
+                    gX:= (cpX + x) div 2;
+                    gY:= (cpY + y) div 2;
+                    end;
+		        if (not eraseOnLFMatch or (Land[cpY + y, cpX + x] and LandFlags <> 0)) and
+                    ((PLongword(@(p^[x * 4]))^) and AMask <> 0) then
+                    begin
+                    if not onlyEraseLF then
+                        begin
+                        LandPixels[gY, gX]:= 0;
+                        Land[cpY + y, cpX + x]:= 0
+                        end
+                    else Land[cpY + y, cpX + x]:= Land[cpY + y, cpX + x] and (not LandFlags)
+                    end
+                end;
+        p:= PByteArray(@(p^[Image^.pitch]));
+        end;
+    end;
+if SDL_MustLock(Image) then
+    SDL_UnlockSurface(Image);
+
+if flipVert then flipSurface(Image, true);
+if flipHoriz then flipSurface(Image, false);
+
+x:= Max(cpX, leftX);
+w:= Min(cpX + Image^.w, LAND_WIDTH) - x;
+y:= Max(cpY, topY);
+h:= Min(cpY + Image^.h, LAND_HEIGHT) - y;
+UpdateLandTexture(x, w, y, h, true)
+end;
+
 function GetPlaceCollisionTex(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt): PTexture;
 var X, Y, bpp, h, w, row, col, numFramesFirstCol: LongInt;
     p, pt: PLongWordArray;
--- a/hedgewars/uScript.pas	Mon May 04 17:48:57 2015 +0300
+++ b/hedgewars/uScript.pas	Mon May 04 17:49:15 2015 +0300
@@ -2202,19 +2202,32 @@
 function lc_placesprite(L : Plua_State) : LongInt; Cdecl;
 var spr   : TSprite;
     lf    : Word;
+    tint  : LongWord;
     i, n : LongInt;
-    placed: boolean;
+    placed, behind, flipHoriz, flipVert : boolean;
 const
     call = 'PlaceSprite';
-    params = 'x, y, sprite, frameIdx [, landFlag, ... ]';
+    params = 'x, y, sprite, frameIdx, tint, behind, flipHoriz, flipVert, [, landFlag, ... ]';
 begin
     placed:= false;
     if CheckAndFetchLuaParamMinCount(L, 4, call, params, n) then
         begin
+        if not lua_isnoneornil(L, 5) then
+	        tint := lua_tointeger(L, 5)
+        else tint := $FFFFFFFF;
+        if not lua_isnoneornil(L, 6) then
+	        behind := lua_toboolean(L, 6)
+        else behind := false;
+        if not lua_isnoneornil(L, 7) then
+	        flipHoriz := lua_toboolean(L, 7)
+        else flipHoriz := false;
+        if not lua_isnoneornil(L, 8) then
+	        flipVert := lua_toboolean(L, 8)
+        else flipVert := false;
         lf:= 0;
 
-        // accept any amount of landflags, loop is never executed if n>5
-        for i:= 5 to n do
+        // accept any amount of landflags, loop is never executed if n>6
+        for i:= 9 to n do
             lf:= lf or lua_tointeger(L, i);
 
         n:= LuaToSpriteOrd(L, 3, call, params);
@@ -2227,7 +2240,7 @@
                 placed:= ForcePlaceOnLand(
                     lua_tointeger(L, 1) - SpritesData[spr].Width div 2,
                     lua_tointeger(L, 2) - SpritesData[spr].Height div 2,
-                    spr, lua_tointeger(L, 4), lf);
+                    spr, lua_tointeger(L, 4), lf, tint, behind, flipHoriz, flipVert);
             end;
         end;
 
@@ -2235,6 +2248,51 @@
     lc_placesprite:= 1
 end;
 
+function lc_erasesprite(L : Plua_State) : LongInt; Cdecl;
+var spr   : TSprite;
+    lf    : Word;
+    i, n : LongInt;
+    eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert : boolean;
+const
+    call = 'EraseSprite';
+    params = 'x, y, sprite, frameIdx, eraseOnLFMatch, flipHoriz, flipVert, [, landFlag, ... ]';
+begin
+    if CheckAndFetchLuaParamMinCount(L, 4, call, params, n) then
+        begin
+        if not lua_isnoneornil(L, 5) then
+	        eraseOnLFMatch := lua_toboolean(L, 5)
+        else eraseOnLFMatch := false;
+        if not lua_isnoneornil(L, 6) then
+	        onlyEraseLF := lua_toboolean(L, 6)
+        else onlyEraseLF := false;
+        if not lua_isnoneornil(L, 7) then
+	        flipHoriz := lua_toboolean(L, 7)
+        else flipHoriz := false;
+        if not lua_isnoneornil(L, 8) then
+	        flipVert := lua_toboolean(L, 8)
+        else flipVert := false;
+        lf:= 0;
+
+        // accept any amount of landflags, loop is never executed if n>6
+        for i:= 9 to n do
+            lf:= lf or lua_tointeger(L, i);
+
+        n:= LuaToSpriteOrd(L, 3, call, params);
+        if n >= 0 then
+            begin
+            spr:= TSprite(n);
+            if SpritesData[spr].Surface = nil then
+                LuaError(call + ': ' + EnumToStr(spr) + ' cannot be placed! (required information not loaded)' )
+            else
+                EraseLand(
+                    lua_tointeger(L, 1) - SpritesData[spr].Width div 2,
+                    lua_tointeger(L, 2) - SpritesData[spr].Height div 2,
+                    spr, lua_tointeger(L, 4), lf, eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert);
+            end;
+        end;
+    lc_erasesprite:= 0
+end;
+
 function lc_placegirder(L : Plua_State) : LongInt; Cdecl;
 var placed: boolean;
 begin
@@ -3156,6 +3214,7 @@
 lua_register(luaState, _P'MapHasBorder', @lc_maphasborder);
 lua_register(luaState, _P'GetHogHat', @lc_gethoghat);
 lua_register(luaState, _P'SetHogHat', @lc_sethoghat);
+lua_register(luaState, _P'EraseSprite', @lc_erasesprite);
 lua_register(luaState, _P'PlaceSprite', @lc_placesprite);
 lua_register(luaState, _P'PlaceGirder', @lc_placegirder);
 lua_register(luaState, _P'GetCurAmmoType', @lc_getcurammotype);
--- a/hedgewars/uWorld.pas	Mon May 04 17:48:57 2015 +0300
+++ b/hedgewars/uWorld.pas	Mon May 04 17:49:15 2015 +0300
@@ -1706,7 +1706,7 @@
 var PrevSentPointTime: LongWord = 0;
 
 procedure MoveCamera;
-var EdgesDist, wdy, shs,z, amNumOffsetX, amNumOffsetY, cameraJump: LongInt;
+var EdgesDist, wdy, shs,z, amNumOffsetX, amNumOffsetY, cameraJump, dstX: LongInt;
     inbtwnTrgtAttks: Boolean;
 begin
 {$IFNDEF MOBILE}
@@ -1724,28 +1724,36 @@
         end
     else
         begin
-        if (WorldEdge = weWrap) then
-            cameraJump:= LongInt(playWidth) div 2 + 50
-        else
-            cameraJump:= LongInt(rightX) - leftX - 100;
+            dstX:= hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * z + WorldDx;
 
-        if abs(prevPoint.X - WorldDx - hwRound(FollowGear^.X)) > cameraJump then
-            begin
-            if prevPoint.X - WorldDx < LongInt(playWidth div 2) then
-                cameraJump:= LongInt(playWidth)
-            else
-                cameraJump:= -LongInt(playWidth);
-            WorldDx:= WorldDx - cameraJump;
-            end;
+            if (WorldEdge = weWrap) then
+                begin
+                    if dstX - prevPoint.X < (LongInt(leftX) - rightX) div 2 then
+                        CursorPoint.X:= (prevPoint.X * 7 + dstX - (leftX - rightX)) div 8
+                    else if dstX - prevPoint.X > (LongInt(rightX) - leftX) div 2 then
+                        CursorPoint.X:= (prevPoint.X * 7 + dstX - (rightX - leftX)) div 8
+                    else
+                        CursorPoint.X:= (prevPoint.X * 7 + dstX) div 8;
+                end
+            else // usual camera movement routine
+                begin
+                    CursorPoint.X:= (prevPoint.X * 7 + dstX) div 8;
+                end;
 
-        CursorPoint.X:= (prevPoint.X * 7 + hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * z + WorldDx) div 8;
-
-        if isPhone() or (cScreenHeight < 600) or ((hwSign(FollowGear^.dY) * z) < 10)  then
+        if isPhone() or (cScreenHeight < 600) or ((FollowGear^.dY * z).Round < 10) then
             CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + WorldDy)) div 8
         else
             CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + hwSign(FollowGear^.dY) * z + WorldDy)) div 8;
         end;
 
+if (WorldEdge = weWrap) then
+    begin
+        if -WorldDx < leftX then
+            WorldDx:= WorldDx - LongInt(rightX) + leftX
+        else if -WorldDx > rightX then
+            WorldDx:= WorldDx + LongInt(rightX) - leftX;
+    end;
+
 wdy:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine - cVisibleWater;
 if WorldDy < wdy then
     WorldDy:= wdy;
--- a/project_files/hwc/rtl/system.c	Mon May 04 17:48:57 2015 +0300
+++ b/project_files/hwc/rtl/system.c	Mon May 04 17:49:15 2015 +0300
@@ -300,6 +300,10 @@
     return (int) n;
 }
 
+Integer fpcrtl_ceil(extended n) {
+    return (int) (ceil(n));
+}
+
 LongInt str_to_int(char *src)
 {
     int i;
--- a/project_files/hwc/rtl/system.h	Mon May 04 17:48:57 2015 +0300
+++ b/project_files/hwc/rtl/system.h	Mon May 04 17:49:15 2015 +0300
@@ -93,6 +93,7 @@
 #define     fpcrtl_Assigned                                 fpcrtl_assigned
 
 Integer     fpcrtl_trunc(extended n);
+Integer     fpcrtl_ceil(extended n);
 
 #define     fpcrtl_val(s, a)                                fpcrtl_val__vars(s, &(a))
 void        __attribute__((overloadable))                   fpcrtl_val__vars(string255 s, LongInt *a);
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Nobody_Laugh.lua	Mon May 04 17:48:57 2015 +0300
+++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_Nobody_Laugh.lua	Mon May 04 17:49:15 2015 +0300
@@ -96,7 +96,7 @@
 	AddAmmo(hhs[2],amWhip,1)
 
 	for i = 3, 10 do
-		AddAmmo(hhs[i], amDeagle, 100)
+		AddAmmo(hhs[i], amDEagle, 100)
 		AddAmmo(hhs[i], amShotgun, 100)
 		AddAmmo(hhs[i], amGrenade, 100)
 		AddAmmo(hhs[i], amBazooka, 100)
--- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua	Mon May 04 17:48:57 2015 +0300
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua	Mon May 04 17:49:15 2015 +0300
@@ -1217,7 +1217,7 @@
 			PlaceGirder(x, y, CGR)
 			placedSpec[placedCount] = CGR
 		elseif cat[cIndex] == "Rubber Placement Mode" then
-			PlaceSprite(x,y, sprAmRubber, CGR, lfBouncy)
+			PlaceSprite(x,y, sprAmRubber, CGR, nil, nil, nil, nil, lfBouncy)
 			--PlaceGirder(x, y, CGR)
 			placedSpec[placedCount] = CGR
 		elseif cat[cIndex] == "Target Placement Mode" then
@@ -1320,7 +1320,7 @@
 
 		elseif cat[cIndex] == "Sprite Placement Mode" then
 
-			PlaceSprite(x,y, reducedSpriteIDArray[pIndex], 1, landType)
+			PlaceSprite(x,y, reducedSpriteIDArray[pIndex], 1, nil, nil, nil, nil, landType)
 			--PlaceGirder(x, y, CGR)
 			placedSpec[placedCount] = reducedSpriteTextArray[pIndex]
 			placedSuperSpec[placedCount] = landType
Binary file share/hedgewars/Data/Scripts/Multiplayer/TechRacer.hwp has changed
--- a/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Mon May 04 17:48:57 2015 +0300
+++ b/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Mon May 04 17:49:15 2015 +0300
@@ -1,5 +1,5 @@
 ------------------------------------------
--- TECH RACER v0.2
+-- TECH RACER v0.3
 -----------------------------------------
 
 --------------
@@ -14,6 +14,13 @@
 -- changed theme
 -- minor cleanups?
 
+--------------
+--0.3
+--------------
+-- ehh, scrap everything? those old maps probably still desync so they can die for now
+-- hopefully fix map 3
+-- add two new crappy map to test an idea.
+
 -----------------------------
 -- SCRIPT BEGINS
 -----------------------------
@@ -479,100 +486,100 @@
 		-- these are from onParameters()
 		if mapID == "0" then
 			--AddCaption("don't load any map")
-		elseif mapID == "1" then
+		--[[elseif mapID == "1" then
 
 			--simple testmap
 			------ GIRDER LIST ------
-			PlaceSprite(306, 530, sprAmGirder, 7, lfNormal)
-			PlaceSprite(451, 474, sprAmGirder, 4, lfNormal)
-			PlaceSprite(595, 531, sprAmGirder, 5, lfNormal)
-			PlaceSprite(245, 679, sprAmGirder, 6, lfNormal)
-			PlaceSprite(305, 822, sprAmGirder, 5, lfNormal)
-			PlaceSprite(449, 887, sprAmGirder, 4, lfNormal)
-			PlaceSprite(593, 825, sprAmGirder, 7, lfNormal)
-			PlaceSprite(657, 681, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1063, 682, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1121, 532, sprAmGirder, 7, lfNormal)
-			PlaceSprite(1266, 476, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1411, 535, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1472, 684, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1415, 828, sprAmGirder, 7, lfNormal)
-			PlaceSprite(1271, 892, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1126, 827, sprAmGirder, 5, lfNormal)
-			PlaceSprite(841, 1079, sprAmGirder, 4, lfNormal)
-			PlaceSprite(709, 1153, sprAmGirder, 7, lfNormal)
-			PlaceSprite(975, 1154, sprAmGirder, 5, lfNormal)
-			PlaceSprite(653, 1265, sprAmGirder, 2, lfNormal)
-			PlaceSprite(1021, 1266, sprAmGirder, 2, lfNormal)
-			PlaceSprite(713, 1369, sprAmGirder, 5, lfNormal)
-			PlaceSprite(960, 1371, sprAmGirder, 7, lfNormal)
-			PlaceSprite(835, 1454, sprAmGirder, 4, lfNormal)
-			PlaceSprite(185, 1617, sprAmGirder, 2, lfNormal)
-			PlaceSprite(1317, 1399, sprAmGirder, 2, lfNormal)
-			PlaceSprite(1711, 1811, sprAmGirder, 2, lfNormal)
-			PlaceSprite(2087, 1424, sprAmGirder, 2, lfNormal)
-			PlaceSprite(2373, 1804, sprAmGirder, 2, lfNormal)
-			PlaceSprite(2646, 1434, sprAmGirder, 2, lfNormal)
-			PlaceSprite(1876, 667, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1934, 517, sprAmGirder, 7, lfNormal)
-			PlaceSprite(2079, 461, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2224, 519, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1935, 810, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2080, 875, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2224, 811, sprAmGirder, 7, lfNormal)
-			PlaceSprite(2370, 582, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2370, 759, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2530, 582, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2690, 582, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2530, 759, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2690, 759, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2836, 634, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2835, 822, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2951, 751, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2950, 939, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2964, 1054, sprAmGirder, 7, lfNormal)
-			PlaceSprite(2978, 1172, sprAmGirder, 5, lfNormal)
-			PlaceSprite(3095, 1185, sprAmGirder, 7, lfNormal)
-			PlaceSprite(3211, 1069, sprAmGirder, 7, lfNormal)
-			PlaceSprite(3038, 843, sprAmGirder, 1, lfNormal)
-			PlaceSprite(3126, 825, sprAmGirder, 7, lfNormal)
-			PlaceSprite(3271, 768, sprAmGirder, 4, lfNormal)
-			PlaceSprite(3357, 1014, sprAmGirder, 4, lfNormal)
-			PlaceSprite(3416, 826, sprAmGirder, 5, lfNormal)
-			PlaceSprite(3454, 969, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3439, 369, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3500, 220, sprAmGirder, 7, lfNormal)
-			PlaceSprite(3502, 513, sprAmGirder, 5, lfNormal)
-			PlaceSprite(3646, 162, sprAmGirder, 4, lfNormal)
-			PlaceSprite(3791, 224, sprAmGirder, 5, lfNormal)
-			PlaceSprite(3851, 374, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3792, 518, sprAmGirder, 7, lfNormal)
-			PlaceSprite(3994, 1731, sprAmGirder, 7, lfNormal)
-			PlaceSprite(3877, 1848, sprAmGirder, 7, lfNormal)
-			PlaceSprite(3789, 1942, sprAmGirder, 3, lfNormal)
-			PlaceSprite(3986, 1929, sprAmGirder, 2, lfNormal)
-			PlaceSprite(2837, 1937, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2997, 1938, sprAmGirder, 4, lfNormal)
-			PlaceSprite(3157, 1938, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1152, 1844, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1299, 1898, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1005, 1900, sprAmGirder, 7, lfNormal)
-			PlaceSprite(3578, 575, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3714, 576, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3579, 740, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3714, 741, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3580, 903, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3715, 904, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3552, 452, sprAmGirder, 1, lfNormal)
-			PlaceSprite(3528, 370, sprAmGirder, 2, lfNormal)
-			PlaceSprite(3568, 297, sprAmGirder, 3, lfNormal)
-			PlaceSprite(3736, 455, sprAmGirder, 3, lfNormal)
-			PlaceSprite(3757, 378, sprAmGirder, 2, lfNormal)
-			PlaceSprite(3725, 299, sprAmGirder, 1, lfNormal)
-			PlaceSprite(3646, 261, sprAmGirder, 0, lfNormal)
-			PlaceSprite(3648, 997, sprAmGirder, 4, lfNormal)
-			PlaceSprite(3649, 1275, sprAmGirder, 2, lfNormal)
-			PlaceSprite(3514, 1750, sprAmGirder, 0, lfNormal)
+			PlaceSprite(306, 530, sprAmGirder, 7)
+			PlaceSprite(451, 474, sprAmGirder, 4)
+			PlaceSprite(595, 531, sprAmGirder, 5)
+			PlaceSprite(245, 679, sprAmGirder, 6)
+			PlaceSprite(305, 822, sprAmGirder, 5)
+			PlaceSprite(449, 887, sprAmGirder, 4)
+			PlaceSprite(593, 825, sprAmGirder, 7)
+			PlaceSprite(657, 681, sprAmGirder, 6)
+			PlaceSprite(1063, 682, sprAmGirder, 6)
+			PlaceSprite(1121, 532, sprAmGirder, 7)
+			PlaceSprite(1266, 476, sprAmGirder, 4)
+			PlaceSprite(1411, 535, sprAmGirder, 5)
+			PlaceSprite(1472, 684, sprAmGirder, 6)
+			PlaceSprite(1415, 828, sprAmGirder, 7)
+			PlaceSprite(1271, 892, sprAmGirder, 4)
+			PlaceSprite(1126, 827, sprAmGirder, 5)
+			PlaceSprite(841, 1079, sprAmGirder, 4)
+			PlaceSprite(709, 1153, sprAmGirder, 7)
+			PlaceSprite(975, 1154, sprAmGirder, 5)
+			PlaceSprite(653, 1265, sprAmGirder, 2)
+			PlaceSprite(1021, 1266, sprAmGirder, 2)
+			PlaceSprite(713, 1369, sprAmGirder, 5)
+			PlaceSprite(960, 1371, sprAmGirder, 7)
+			PlaceSprite(835, 1454, sprAmGirder, 4)
+			PlaceSprite(185, 1617, sprAmGirder, 2)
+			PlaceSprite(1317, 1399, sprAmGirder, 2)
+			PlaceSprite(1711, 1811, sprAmGirder, 2)
+			PlaceSprite(2087, 1424, sprAmGirder, 2)
+			PlaceSprite(2373, 1804, sprAmGirder, 2)
+			PlaceSprite(2646, 1434, sprAmGirder, 2)
+			PlaceSprite(1876, 667, sprAmGirder, 6)
+			PlaceSprite(1934, 517, sprAmGirder, 7)
+			PlaceSprite(2079, 461, sprAmGirder, 4)
+			PlaceSprite(2224, 519, sprAmGirder, 5)
+			PlaceSprite(1935, 810, sprAmGirder, 5)
+			PlaceSprite(2080, 875, sprAmGirder, 4)
+			PlaceSprite(2224, 811, sprAmGirder, 7)
+			PlaceSprite(2370, 582, sprAmGirder, 4)
+			PlaceSprite(2370, 759, sprAmGirder, 4)
+			PlaceSprite(2530, 582, sprAmGirder, 4)
+			PlaceSprite(2690, 582, sprAmGirder, 4)
+			PlaceSprite(2530, 759, sprAmGirder, 4)
+			PlaceSprite(2690, 759, sprAmGirder, 4)
+			PlaceSprite(2836, 634, sprAmGirder, 5)
+			PlaceSprite(2835, 822, sprAmGirder, 5)
+			PlaceSprite(2951, 751, sprAmGirder, 5)
+			PlaceSprite(2950, 939, sprAmGirder, 5)
+			PlaceSprite(2964, 1054, sprAmGirder, 7)
+			PlaceSprite(2978, 1172, sprAmGirder, 5)
+			PlaceSprite(3095, 1185, sprAmGirder, 7)
+			PlaceSprite(3211, 1069, sprAmGirder, 7)
+			PlaceSprite(3038, 843, sprAmGirder, 1)
+			PlaceSprite(3126, 825, sprAmGirder, 7)
+			PlaceSprite(3271, 768, sprAmGirder, 4)
+			PlaceSprite(3357, 1014, sprAmGirder, 4)
+			PlaceSprite(3416, 826, sprAmGirder, 5)
+			PlaceSprite(3454, 969, sprAmGirder, 6)
+			PlaceSprite(3439, 369, sprAmGirder, 6)
+			PlaceSprite(3500, 220, sprAmGirder, 7)
+			PlaceSprite(3502, 513, sprAmGirder, 5)
+			PlaceSprite(3646, 162, sprAmGirder, 4)
+			PlaceSprite(3791, 224, sprAmGirder, 5)
+			PlaceSprite(3851, 374, sprAmGirder, 6)
+			PlaceSprite(3792, 518, sprAmGirder, 7)
+			PlaceSprite(3994, 1731, sprAmGirder, 7)
+			PlaceSprite(3877, 1848, sprAmGirder, 7)
+			PlaceSprite(3789, 1942, sprAmGirder, 3)
+			PlaceSprite(3986, 1929, sprAmGirder, 2)
+			PlaceSprite(2837, 1937, sprAmGirder, 4)
+			PlaceSprite(2997, 1938, sprAmGirder, 4)
+			PlaceSprite(3157, 1938, sprAmGirder, 4)
+			PlaceSprite(1152, 1844, sprAmGirder, 4)
+			PlaceSprite(1299, 1898, sprAmGirder, 5)
+			PlaceSprite(1005, 1900, sprAmGirder, 7)
+			PlaceSprite(3578, 575, sprAmGirder, 6)
+			PlaceSprite(3714, 576, sprAmGirder, 6)
+			PlaceSprite(3579, 740, sprAmGirder, 6)
+			PlaceSprite(3714, 741, sprAmGirder, 6)
+			PlaceSprite(3580, 903, sprAmGirder, 6)
+			PlaceSprite(3715, 904, sprAmGirder, 6)
+			PlaceSprite(3552, 452, sprAmGirder, 1)
+			PlaceSprite(3528, 370, sprAmGirder, 2)
+			PlaceSprite(3568, 297, sprAmGirder, 3)
+			PlaceSprite(3736, 455, sprAmGirder, 3)
+			PlaceSprite(3757, 378, sprAmGirder, 2)
+			PlaceSprite(3725, 299, sprAmGirder, 1)
+			PlaceSprite(3646, 261, sprAmGirder, 0)
+			PlaceSprite(3648, 997, sprAmGirder, 4)
+			PlaceSprite(3649, 1275, sprAmGirder, 2)
+			PlaceSprite(3514, 1750, sprAmGirder, 0)
 
 			------ AMMO CRATE LIST ------
 			tempG = SpawnAmmoCrate(1707, 1755, amBazooka)
@@ -603,36 +610,36 @@
 
 		elseif mapID == "2" then
 
-			-- simple land flags test map
+			-- simple land flags test map, really shit, can delete
 			------ GIRDER LIST ------
-			PlaceSprite(335, 622, sprAmGirder, 16,16384)
-			PlaceSprite(474, 569, sprAmGirder, 13,16384)
-			PlaceSprite(343, 748, sprAmGirder, 14,16384)
-			PlaceSprite(466, 756, sprAmGirder, 16,16384)
-			PlaceSprite(609, 702, sprAmGirder, 13,16384)
-			PlaceSprite(635, 570, sprAmGirder, 13,16384)
-			PlaceSprite(770, 702, sprAmGirder, 13,16384)
-			PlaceSprite(960, 730, sprAmGirder, 18,2048)
-			PlaceSprite(1061, 608, sprAmGirder, 16,16384)
-			PlaceSprite(1207, 552, sprAmGirder, 13,16384)
-			PlaceSprite(1205, 409, sprAmGirder, 13,16384)
-			PlaceSprite(2312, 637, sprAmGirder, 6,0)
-			PlaceSprite(2312, 472, sprAmGirder, 6,0)
-			PlaceSprite(2311, 308, sprAmGirder, 6,0)
-			PlaceSprite(2292, 155, sprAmGirder, 6,0)
-			PlaceSprite(727, 611, sprAmGirder, 6,0)
-			PlaceSprite(1298, 480, sprAmGirder, 6,0)
+			PlaceSprite(335, 622, sprAmGirder, 16, nil, nil, nil, nil, 16384)
+			PlaceSprite(474, 569, sprAmGirder, 13, nil, nil, nil, nil, 16384)
+			PlaceSprite(343, 748, sprAmGirder, 14, nil, nil, nil, nil, 16384)
+			PlaceSprite(466, 756, sprAmGirder, 16, nil, nil, nil, nil, 16384)
+			PlaceSprite(609, 702, sprAmGirder, 13, nil, nil, nil, nil, 16384)
+			PlaceSprite(635, 570, sprAmGirder, 13, nil, nil, nil, nil, 16384)
+			PlaceSprite(770, 702, sprAmGirder, 13, nil, nil, nil, nil, 16384)
+			PlaceSprite(960, 730, sprAmGirder, 18, nil, nil, nil, nil, 2048)
+			PlaceSprite(1061, 608, sprAmGirder, 16, nil, nil, nil, nil, 16384)
+			PlaceSprite(1207, 552, sprAmGirder, 13, nil, nil, nil, nil, 16384)
+			PlaceSprite(1205, 409, sprAmGirder, 13, nil, nil, nil, nil, 16384)
+			PlaceSprite(2312, 637, sprAmGirder, 6)
+			PlaceSprite(2312, 472, sprAmGirder, 6)
+			PlaceSprite(2311, 308, sprAmGirder, 6)
+			PlaceSprite(2292, 155, sprAmGirder, 6)
+			PlaceSprite(727, 611, sprAmGirder, 6)
+			PlaceSprite(1298, 480, sprAmGirder, 6)
 
 			------ RUBBER BAND LIST ------
-			PlaceSprite(1411, 625, sprAmRubber, 1, lfBouncy)
-			PlaceSprite(1525, 739, sprAmRubber, 1, lfBouncy)
-			PlaceSprite(1638, 852, sprAmRubber, 1, lfBouncy)
-			PlaceSprite(1754, 963, sprAmRubber, 1, lfBouncy)
-			PlaceSprite(1870, 1076, sprAmRubber, 1, lfBouncy)
-			PlaceSprite(2013, 1131, sprAmRubber, 0, lfBouncy)
-			PlaceSprite(2159, 1070, sprAmRubber, 3, lfBouncy)
-			PlaceSprite(2268, 952, sprAmRubber, 3, lfBouncy)
-			PlaceSprite(2315, 802, sprAmRubber, 2, lfBouncy)
+			PlaceSprite(1411, 625, sprAmRubber, 1, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(1525, 739, sprAmRubber, 1, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(1638, 852, sprAmRubber, 1, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(1754, 963, sprAmRubber, 1, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(1870, 1076, sprAmRubber, 1, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(2013, 1131, sprAmRubber, 0, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(2159, 1070, sprAmRubber, 3, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(2268, 952, sprAmRubber, 3, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(2315, 802, sprAmRubber, 2, nil, nil, nil, nil, lfBouncy)
 
 			------ AMMO CRATE LIST ------
 			tempG = SpawnAmmoCrate(472, 711, amBazooka)
@@ -640,130 +647,137 @@
 			tempG = SpawnAmmoCrate(1155, 528, amBazooka)
 
 			------ UTILITY CRATE LIST ------
-			tempG = SpawnUtilityCrate(2006, 1102, amRope)
+			tempG = SpawnUtilityCrate(2006, 1102, amRope)]]
 
 		elseif mapID == "3" then
 
-			-- more detailed landflag test map
-			------ GIRDER LIST ------
-			PlaceSprite(396, 665, sprAmGirder, 1,0)
-			PlaceSprite(619, 665, sprAmGirder, 3,0)
-			PlaceSprite(696, 635, sprAmGirder, 0,0)
-			PlaceSprite(319, 637, sprAmGirder, 0,0)
-			PlaceSprite(268, 604, sprAmGirder, 2,0)
-			PlaceSprite(746, 603, sprAmGirder, 2,0)
-			PlaceSprite(325, 495, sprAmGirder, 7,0)
-			PlaceSprite(689, 493, sprAmGirder, 5,0)
-			PlaceSprite(504, 422, sprAmGirder, 6,0)
-			PlaceSprite(595, 422, sprAmGirder, 4,0)
-			PlaceSprite(412, 422, sprAmGirder, 4,0)
-			PlaceSprite(320, 696, sprAmGirder, 4,0)
-			PlaceSprite(249, 786, sprAmGirder, 6,0)
-			PlaceSprite(249, 948, sprAmGirder, 6,0)
-			PlaceSprite(191, 785, sprAmGirder, 6,0)
-			PlaceSprite(191, 946, sprAmGirder, 6,0)
-			PlaceSprite(191, 1107, sprAmGirder, 6,0)
-			PlaceSprite(249, 1109, sprAmGirder, 6,0)
-			PlaceSprite(130, 1251, sprAmGirder, 7,0)
-			PlaceSprite(306, 1251, sprAmGirder, 5,0)
-			PlaceSprite(72, 1360, sprAmGirder, 2,0)
-			PlaceSprite(364, 1360, sprAmGirder, 2,0)
-			PlaceSprite(132, 1462, sprAmGirder, 5,0)
-			PlaceSprite(304, 1463, sprAmGirder, 7,0)
-			PlaceSprite(182, 1616, sprAmGirder, 6,0)
-			PlaceSprite(255, 1613, sprAmGirder, 6,0)
-			PlaceSprite(217, 1796, sprAmGirder, 4,0)
-			PlaceSprite(221, 1381, sprAmGirder, 0,0)--
-			PlaceSprite(154, 669, sprAmGirder, 1,0)
-			PlaceSprite(124, 553, sprAmGirder, 6,0)
-			PlaceSprite(326, 467, sprAmGirder, 3,0)
-			PlaceSprite(223, 592, sprAmGirder, 3,0)
+			-- more detailed landflag test map, should hopefully work now
+			PlaceSprite(402, 1863, sprAmGirder, 0, 16448250, nil, nil, nil, lfIce)
+			PlaceSprite(442, 1863, sprAmGirder, 4, 16448250, nil, nil, nil, lfIce)
+
+			PlaceSprite(2067, 1945, sprAmGirder, 6, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(1943, 1653, sprAmGirder, 6, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(1999, 1504, sprAmGirder, 7, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2143, 1445, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2432, 1565, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2593, 1565, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2752, 1565, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2206, 1949, sprAmGirder, 6, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2262, 1800, sprAmGirder, 7, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2407, 1745, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2569, 1745, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2005, 1797, sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2288, 1503, sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2715, 1802, sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2898, 1624, sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3014, 1740, sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2830, 1919, sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3131, 1856, sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3191, 1968, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3264, 2021, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2840, 2006, sprAmGirder, 3, 2516582650, nil, nil, nil, lfIndestructible)
+
 
-			PlaceSprite(638, 791, sprAmGirder, 5,0)
-			PlaceSprite(752, 907, sprAmGirder, 5,0)
-			PlaceSprite(866, 1022, sprAmGirder, 5,0)
-			PlaceSprite(402, 1863, sprAmGirder, 18,2048)
-			PlaceSprite(442, 1863, sprAmGirder, 22,2048)
-			PlaceSprite(2067, 1945, sprAmGirder, 15,16384)
-			PlaceSprite(2005, 1797, sprAmGirder, 14,16384)
-			PlaceSprite(1943, 1653, sprAmGirder, 15,16384)
-			PlaceSprite(1999, 1504, sprAmGirder, 16,16384)
-			PlaceSprite(2143, 1445, sprAmGirder, 13,16384)
-			PlaceSprite(2288, 1503, sprAmGirder, 14,16384)
-			PlaceSprite(2432, 1565, sprAmGirder, 13,16384)
-			PlaceSprite(2593, 1565, sprAmGirder, 13,16384)
-			PlaceSprite(2752, 1565, sprAmGirder, 13,16384)
-			PlaceSprite(2206, 1949, sprAmGirder, 15,16384)
-			PlaceSprite(2262, 1800, sprAmGirder, 16,16384)
-			PlaceSprite(2407, 1745, sprAmGirder, 13,16384)
-			PlaceSprite(2569, 1745, sprAmGirder, 13,16384)
-			PlaceSprite(2715, 1802, sprAmGirder, 14,16384)
-			PlaceSprite(2898, 1624, sprAmGirder, 14,16384)
-			PlaceSprite(3014, 1740, sprAmGirder, 14,16384)
-			PlaceSprite(2830, 1919, sprAmGirder, 14,16384)
-			PlaceSprite(3131, 1856, sprAmGirder, 14,16384)
-			PlaceSprite(3191, 1968, sprAmGirder, 11,16384)
-			PlaceSprite(3264, 2021, sprAmGirder, 13,16384)
-			PlaceSprite(2840, 2006, sprAmGirder, 12,16384)
-			PlaceSprite(1505, 395, sprAmGirder, 7,0)
-			PlaceSprite(1445, 544, sprAmGirder, 6,0)
-			PlaceSprite(1506, 686, sprAmGirder, 5,0)
-			PlaceSprite(1650, 339, sprAmGirder, 4,0)
-			PlaceSprite(1797, 397, sprAmGirder, 5,0)
-			PlaceSprite(1857, 547, sprAmGirder, 6,0)
-			PlaceSprite(1797, 688, sprAmGirder, 7,0)
-			PlaceSprite(1652, 754, sprAmGirder, 4,0)
-			PlaceSprite(3326, 863, sprAmGirder, 4,0)
-			PlaceSprite(3474, 921, sprAmGirder, 5,0)
-			PlaceSprite(3180, 921, sprAmGirder, 7,0)
-			PlaceSprite(3120, 1071, sprAmGirder, 6,0)
-			PlaceSprite(3183, 1214, sprAmGirder, 5,0)
-			PlaceSprite(3536, 1071, sprAmGirder, 6,0)
-			PlaceSprite(3480, 1214, sprAmGirder, 7,0)
-			PlaceSprite(3330, 1279, sprAmGirder, 4,0)
-			PlaceSprite(2502, 556, sprAmGirder, 16,16384)
-			PlaceSprite(2601, 634, sprAmGirder, 16,16384)
-			PlaceSprite(2616, 441, sprAmGirder, 16,16384)
-			PlaceSprite(2716, 519, sprAmGirder, 16,16384)
-			PlaceSprite(2756, 379, sprAmGirder, 13,16384)
-			PlaceSprite(2862, 466, sprAmGirder, 13,16384)
-			PlaceSprite(2918, 379, sprAmGirder, 13,16384)
-			PlaceSprite(3023, 467, sprAmGirder, 13,16384)
-			PlaceSprite(3080, 378, sprAmGirder, 13,16384)
-			PlaceSprite(3172, 527, sprAmGirder, 14,16384)
-			PlaceSprite(3232, 428, sprAmGirder, 14,16384)
-			PlaceSprite(3289, 647, sprAmGirder, 14,16384)
-			PlaceSprite(3350, 545, sprAmGirder, 14,16384)
-			PlaceSprite(3406, 764, sprAmGirder, 14,16384)
-			PlaceSprite(3469, 556, sprAmGirder, 16,16384)
-			PlaceSprite(3616, 503, sprAmGirder, 13,16384)
-			PlaceSprite(3552, 828, sprAmGirder, 13,16384)
-			PlaceSprite(3696, 763, sprAmGirder, 16,16384)
-			PlaceSprite(3708, 575, sprAmGirder, 15,16384)
-			PlaceSprite(3705, 680, sprAmGirder, 10,16384)
+			PlaceSprite(396, 665, sprAmGirder, 1, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(619, 665, sprAmGirder, 3, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(696, 635, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(319, 637, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(268, 604, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(746, 603, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(325, 495, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(689, 493, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(504, 422, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(595, 422, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(412, 422, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(320, 696, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(249, 786, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(249, 948, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(191, 785, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(191, 946, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(191, 1107, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(249, 1109, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(130, 1251, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(306, 1251, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(72, 1360, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(364, 1360, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(132, 1462, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(304, 1463, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(182, 1616, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(255, 1613, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(217, 1796, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(221, 1381, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)--
+			PlaceSprite(154, 669, sprAmGirder, 1, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(124, 553, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(326, 467, sprAmGirder, 3, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(223, 592, sprAmGirder, 3, 4294967295, nil, nil, nil, lfNormal)
+
+			PlaceSprite(638, 791, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(752, 907, sprAmGirder,  5, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(866, 1022, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
 
-			PlaceSprite(1481, 1133, sprAmGirder, 7,0)
-			PlaceSprite(1626, 1078, sprAmGirder, 4,0)
-			PlaceSprite(1772, 1135, sprAmGirder, 5,0)
-			PlaceSprite(1422, 1280, sprAmGirder, 6,0)
-			PlaceSprite(1831, 1286, sprAmGirder, 6,0)
-			PlaceSprite(1773, 1429, sprAmGirder, 7,0)
-			PlaceSprite(1627, 1492, sprAmGirder, 4,0)
-			PlaceSprite(1482, 1427, sprAmGirder, 5,0)
-			PlaceSprite(587, 855, sprAmGirder, 4,0)
-			PlaceSprite(425, 855, sprAmGirder, 4,0)
-			PlaceSprite(302, 822, sprAmGirder, 1,0)
+			PlaceSprite(1505, 395, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1445, 544, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1506, 686, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1650, 339, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1797, 397, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1857, 547, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1797, 688, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1652, 754, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(3326, 863, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(3474, 921, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(3180, 921, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(3120, 1071, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(3183, 1214, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(3536, 1071, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(3480, 1214, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(3330, 1279, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1481, 1133, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1626, 1078, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1772, 1135, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1422, 1280, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1831, 1286, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1773, 1429, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1627, 1492, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(1482, 1427, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(587, 855, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(425, 855, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+			PlaceSprite(302, 822, sprAmGirder, 1, 4294967295, nil, nil, nil, lfNormal)
+
+			PlaceSprite(2502, 556, sprAmGirder, 7, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2601, 634, sprAmGirder, 7, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2616, 441, sprAmGirder, 7, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2716, 519, sprAmGirder, 7, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3469, 556, sprAmGirder, 7, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3696, 763, sprAmGirder, 7, 2516582650, nil, nil, nil, lfIndestructible)
+
+
+			PlaceSprite(2756, 379, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2862, 466, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(2918, 379, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3023, 467, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3080, 378, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3616, 503, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3552, 828, sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
+
+			PlaceSprite(3172, 527, sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3232, 428, sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3289, 647, sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3350, 545, sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3406, 764, sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
+
+			PlaceSprite(3708, 575, sprAmGirder, 6, 2516582650, nil, nil, nil, lfIndestructible)
+			PlaceSprite(3705, 680, sprAmGirder, 1, 2516582650, nil, nil, nil, lfIndestructible)
 
 			------ RUBBER BAND LIST ------
-			PlaceSprite(505, 708, sprAmRubber, 0, lfBouncy)
-			PlaceSprite(175, 451, sprAmRubber, 0, lfBouncy)
-			PlaceSprite(822, 1693, sprAmRubber, 0, lfBouncy)
-			PlaceSprite(982, 1691, sprAmRubber, 0, lfBouncy)
-			PlaceSprite(1142, 1688, sprAmRubber, 0, lfBouncy)
-			PlaceSprite(1302, 1684, sprAmRubber, 0, lfBouncy)
-			PlaceSprite(1450, 1750, sprAmRubber, 1, lfBouncy)
-			PlaceSprite(1566, 1860, sprAmRubber, 1, lfBouncy)
-			PlaceSprite(1680, 1973, sprAmRubber, 1, lfBouncy)
+			PlaceSprite(505, 708, sprAmRubber, 0, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(175, 451, sprAmRubber, 0, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(822, 1693, sprAmRubber, 0, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(982, 1691, sprAmRubber, 0, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(1142, 1688, sprAmRubber, 0, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(1302, 1684, sprAmRubber, 0, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(1450, 1750, sprAmRubber, 1, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(1566, 1860, sprAmRubber, 1, nil, nil, nil, nil, lfBouncy)
+			PlaceSprite(1680, 1973, sprAmRubber, 1, nil, nil, nil, nil, lfBouncy)
 
 			------ AMMO CRATE LIST ------
 			tempG = SpawnAmmoCrate(324, 613, amFirePunch)
@@ -838,257 +852,582 @@
 			tempG = AddGear(686, 829, gtSMine, 0, 0, 0, 0)
 			tempG = AddGear(649, 792, gtSMine, 0, 0, 0, 0)
 
+		elseif mapID == "4" then
+
+			------ GIRDER LIST ------
+	PlaceSprite(3942, 116, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3999, 270, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3925, 407, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3777, 470, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3791, 65, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3644, 121, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3629, 413, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+
+	------ AMMO CRATE LIST ------
+	tempG = SpawnAmmoCrate(3772, 446, amWatermelon)
+	tempG = SpawnAmmoCrate(3769, 415, amWatermelon)
+	tempG = SpawnAmmoCrate(3773, 384, amWatermelon)
+	tempG = SpawnAmmoCrate(3771, 353, amWatermelon)
+	tempG = SpawnAmmoCrate(3770, 322, amWatermelon)
+	tempG = SpawnAmmoCrate(3775, 291, amWatermelon)
+	tempG = SpawnAmmoCrate(3776, 260, amWatermelon)
+	tempG = SpawnAmmoCrate(3775, 229, amWatermelon)
+	tempG = SpawnAmmoCrate(3772, 198, amWatermelon)
+	tempG = SpawnAmmoCrate(3776, 167, amWatermelon)
+
+	------ UTILITY CRATE LIST ------
+	tempG = SpawnUtilityCrate(3723, 446, amJetpack)
+	tempG = SpawnUtilityCrate(3725, 415, amJetpack)
+	tempG = SpawnUtilityCrate(3814, 446, amJetpack)
+	tempG = SpawnUtilityCrate(3814, 415, amJetpack)
+	tempG = SpawnUtilityCrate(3815, 384, amJetpack)
+	tempG = SpawnUtilityCrate(3728, 384, amJetpack)
+
+	------ AIR MINE LIST ------
+	SetTimer(AddGear(3489, 110, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3509, 366, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3399, 114, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3438, 383, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3322, 113, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3369, 384, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3290, 379, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3253, 112, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3178, 111, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3228, 375, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3173, 384, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3115, 118, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3039, 126, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2954, 139, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3121, 404, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2918, 414, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2880, 144, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2815, 146, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2731, 140, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2867, 408, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2802, 394, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2733, 392, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2661, 392, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2672, 147, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2608, 144, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2558, 117, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2495, 86, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2425, 49, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2373, 79, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2313, 104, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2256, 156, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2218, 226, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2205, 318, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2218, 419, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2255, 479, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2290, 522, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2343, 557, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2413, 540, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2500, 514, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2572, 471, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2618, 436, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2926, 478, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2926, 548, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2924, 615, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3126, 472, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3128, 553, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3136, 623, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3139, 683, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2927, 657, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2919, 720, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3132, 746, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2920, 771, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3137, 798, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2926, 820, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3140, 848, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(945, 441, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(900, 477, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(899, 540, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(915, 631, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1013, 616, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(970, 533, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1062, 458, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1060, 537, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1094, 640, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1029, 692, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(928, 718, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(831, 592, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(860, 666, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(823, 493, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1032, 427, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(953, 351, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(845, 375, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1101, 326, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1128, 565, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1126, 446, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1208, 703, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1139, 726, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1024, 777, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(918, 775, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(812, 758, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3171, 887, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3222, 939, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3273, 977, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3330, 1011, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3401, 1051, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2928, 899, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2935, 966, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2959, 1021, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2999, 1077, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3050, 1136, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3108, 1184, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3159, 1221, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3214, 1243, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3289, 1279, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3453, 1087, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3515, 1136, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3566, 1202, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3604, 1275, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3618, 1345, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3608, 1436, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3582, 1505, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3528, 1565, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3456, 1610, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3368, 1651, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3289, 1666, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3205, 1668, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3132, 1672, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3270, 1325, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3192, 1346, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3140, 1346, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3067, 1359, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2997, 1373, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2918, 1391, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2839, 1406, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3078, 1672, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3019, 1659, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2936, 1667, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2859, 1675, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(975, 722, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(967, 636, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1078, 687, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(868, 740, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(863, 453, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1010, 494, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1080, 590, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(869, 589, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1013, 569, gtAirMine, 0, 0, 0, 0), 1)
+
+
+	elseif mapID == "5" then
+
+	------ GIRDER LIST ------
+	PlaceSprite(3703, 157, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3846, 100, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3991, 162, sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(4049, 311, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3648, 308, sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3988, 454, sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3843, 515, sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3616, 429, sprAmGirder, 3, 4294967295, nil, nil, nil, lfNormal)
+	PlaceSprite(3725, 548, sprAmGirder, 3, 4294967295, nil, nil, nil, lfNormal)
+
+	------ RUBBER BAND LIST ------
+
+	------ LAND SPRITE LIST ------
+
+	------ HEALTH CRATE LIST ------
+
+	------ AMMO CRATE LIST ------
+
+	------ UTILITY CRATE LIST ------
+	tempG = SpawnUtilityCrate(3846, 491, amJetpack)
+	tempG = SpawnUtilityCrate(3847, 460, amJetpack)
+	tempG = SpawnUtilityCrate(3844, 429, amJetpack)
+	tempG = SpawnUtilityCrate(3845, 398, amJetpack)
+	tempG = SpawnUtilityCrate(3848, 367, amJetpack)
+
+	------ BARREL LIST ------
+
+	------ MINE LIST ------
+
+	------ STICKY MINE LIST ------
+
+	------ AIR MINE LIST ------
+	SetTimer(AddGear(3684, 595, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3648, 641, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3613, 695, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3575, 733, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3537, 781, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3505, 829, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3476, 881, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3447, 930, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3418, 979, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3388, 1021, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3356, 1072, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3561, 469, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3528, 500, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3496, 545, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3467, 584, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3444, 619, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3404, 656, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3373, 693, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3351, 726, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3329, 756, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3306, 798, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3339, 1115, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3321, 1163, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3298, 1206, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3281, 1250, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3259, 1302, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3238, 1343, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3220, 1397, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3269, 810, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3225, 788, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3188, 762, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3149, 735, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3106, 709, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3064, 682, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3023, 652, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2983, 619, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3164, 983, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3143, 1029, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3130, 1077, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3122, 1127, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3100, 1174, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3069, 1226, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3042, 1287, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3178, 1440, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3125, 1480, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3088, 1521, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2988, 1326, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2944, 1357, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2884, 1356, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2813, 1356, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2755, 1356, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2677, 1347, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2591, 1354, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2532, 1354, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3045, 1553, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2974, 1588, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2901, 1584, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2850, 1569, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2782, 1570, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2708, 1577, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2648, 1579, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2585, 1576, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2525, 1581, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2490, 1338, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2435, 1306, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2386, 1283, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2344, 1242, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3126, 942, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3070, 919, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(3005, 897, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2962, 865, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2907, 838, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2858, 803, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2807, 769, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2764, 741, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2714, 703, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2665, 671, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2613, 629, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2557, 591, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2513, 545, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2450, 537, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2390, 569, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2341, 603, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2299, 649, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2271, 700, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2243, 754, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2185, 783, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2125, 801, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2084, 864, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2113, 933, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2154, 974, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2191, 1016, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2223, 1061, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2257, 1113, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2283, 1153, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2316, 1202, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2479, 1553, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2422, 1513, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2363, 1477, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2302, 1446, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2243, 1388, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2188, 1335, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2136, 1273, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2086, 1204, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2033, 1132, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1992, 1085, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1967, 1022, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2943, 560, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2890, 511, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2834, 477, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2774, 451, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2710, 428, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2652, 410, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2578, 375, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2482, 342, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2380, 335, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2302, 359, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2256, 409, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2183, 469, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2111, 513, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(2049, 558, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1986, 586, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1949, 651, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1925, 704, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1923, 769, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1925, 841, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1946, 930, gtAirMine, 0, 0, 0, 0), 1)
+	SetTimer(AddGear(1953, 975, gtAirMine, 0, 0, 0, 0), 1)
+
 		else
 
 
 
 			-- first test epic multi map
 			------ GIRDER LIST ------
-			PlaceSprite(430, 1871, sprAmGirder, 2, lfNormal)
-			PlaceSprite(1249, 1914, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1394, 1849, sprAmGirder, 7, lfNormal)
-			PlaceSprite(1522, 1848, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1578, 1959, sprAmGirder, 2, lfNormal)
-			PlaceSprite(1545, 2011, sprAmGirder, 0, lfNormal)
-			PlaceSprite(430, 1749, sprAmGirder, 6, lfNormal)
-			PlaceSprite(430, 1589, sprAmGirder, 6, lfNormal)
-			PlaceSprite(358, 1499, sprAmGirder, 4, lfNormal)
-			PlaceSprite(198, 1499, sprAmGirder, 4, lfNormal)
-			PlaceSprite(72, 1571, sprAmGirder, 7, lfNormal)
-			PlaceSprite(339, 1618, sprAmGirder, 4, lfNormal)
-			PlaceSprite(520, 1499, sprAmGirder, 4, lfNormal)
-			PlaceSprite(680, 1499, sprAmGirder, 4, lfNormal)
-			PlaceSprite(839, 1499, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1000, 1499, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1404, 1730, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1288, 1613, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1200, 1529, sprAmGirder, 1, lfNormal)
-			PlaceSprite(1125, 1495, sprAmGirder, 0, lfNormal)
-			PlaceSprite(1667, 2011, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1812, 1951, sprAmGirder, 7, lfNormal)
-			PlaceSprite(1964, 2024, sprAmGirder, 0, lfNormal)
-			PlaceSprite(1957, 1892, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2103, 1949, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2242, 2017, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2404, 2017, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2548, 1955, sprAmGirder, 7, lfNormal)
-			PlaceSprite(2635, 1871, sprAmGirder, 3, lfNormal)
-			PlaceSprite(2749, 1836, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2751, 1999, sprAmGirder, 2, lfNormal)
-			PlaceSprite(2749, 1947, sprAmGirder, 0, lfNormal)
-			PlaceSprite(2865, 1870, sprAmGirder, 1, lfNormal)
-			PlaceSprite(2954, 1954, sprAmGirder, 5, lfNormal)
-			PlaceSprite(3061, 2017, sprAmGirder, 0, lfNormal)
-			PlaceSprite(3137, 1984, sprAmGirder, 3, lfNormal)
-			PlaceSprite(3169, 1864, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3169, 1702, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3170, 1540, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3170, 1418, sprAmGirder, 2, lfNormal)
-			PlaceSprite(3138, 1339, sprAmGirder, 1, lfNormal)
-			PlaceSprite(3107, 1260, sprAmGirder, 2, lfNormal)
-			PlaceSprite(3153, 1194, sprAmGirder, 3, lfNormal)
-			PlaceSprite(3230, 1163, sprAmGirder, 0, lfNormal)
-			PlaceSprite(3305, 1201, sprAmGirder, 1, lfNormal)
-			PlaceSprite(3334, 1277, sprAmGirder, 2, lfNormal)
-			PlaceSprite(3227, 1540, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3228, 1419, sprAmGirder, 2, lfNormal)
-			PlaceSprite(3334, 1358, sprAmGirder, 2, lfNormal)
-			PlaceSprite(3280, 1387, sprAmGirder, 0, lfNormal)
-			PlaceSprite(3227, 1702, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3227, 1864, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3253, 1981, sprAmGirder, 1, lfNormal)
-			PlaceSprite(3366, 2017, sprAmGirder, 4, lfNormal)
-			PlaceSprite(3528, 2018, sprAmGirder, 4, lfNormal)
-			PlaceSprite(3689, 2018, sprAmGirder, 4, lfNormal)
-			PlaceSprite(246, 1262, sprAmGirder, 4, lfNormal)
-			PlaceSprite(407, 1262, sprAmGirder, 4, lfNormal)
-			PlaceSprite(568, 1262, sprAmGirder, 4, lfNormal)
-			PlaceSprite(731, 1262, sprAmGirder, 4, lfNormal)
-			PlaceSprite(894, 1261, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1056, 1261, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1179, 1262, sprAmGirder, 0, lfNormal)
-			PlaceSprite(1288, 1314, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1406, 1433, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1525, 1549, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1642, 1666, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1749, 1728, sprAmGirder, 0, lfNormal)
-			PlaceSprite(1956, 1802, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1956, 1640, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1782, 1638, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1835, 1487, sprAmGirder, 7, lfNormal)
-			PlaceSprite(1942, 1430, sprAmGirder, 0, lfNormal)
-			PlaceSprite(2051, 1486, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2109, 1639, sprAmGirder, 6, lfNormal)
-			PlaceSprite(2177, 1778, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2323, 1840, sprAmGirder, 4, lfNormal)
-			PlaceSprite(49, 1029, sprAmGirder, 0, lfNormal)
-			PlaceSprite(499, 1172, sprAmGirder, 6, lfNormal)
-			PlaceSprite(527, 1054, sprAmGirder, 3, lfNormal)
-			PlaceSprite(604, 1026, sprAmGirder, 0, lfNormal)
-			PlaceSprite(680, 1056, sprAmGirder, 1, lfNormal)
-			PlaceSprite(719, 1168, sprAmGirder, 6, lfNormal)
-			PlaceSprite(89, 728, sprAmGirder, 4, lfNormal)
-			PlaceSprite(251, 728, sprAmGirder, 4, lfNormal)
-			PlaceSprite(412, 728, sprAmGirder, 4, lfNormal)
-			PlaceSprite(572, 728, sprAmGirder, 4, lfNormal)
-			PlaceSprite(733, 728, sprAmGirder, 4, lfNormal)
-			PlaceSprite(894, 728, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1016, 728, sprAmGirder, 0, lfNormal)
-			PlaceSprite(1067, 799, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1139, 891, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1067, 1171, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1067, 1049, sprAmGirder, 2, lfNormal)
-			PlaceSprite(1136, 999, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1005, 854, sprAmGirder, 2, lfNormal)
-			PlaceSprite(972, 803, sprAmGirder, 0, lfNormal)
-			PlaceSprite(920, 780, sprAmGirder, 2, lfNormal)
-			PlaceSprite(891, 1206, sprAmGirder, 2, lfNormal)
-			PlaceSprite(887, 1150, sprAmGirder, 0, lfNormal)
-			PlaceSprite(3018, 1311, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2871, 1369, sprAmGirder, 7, lfNormal)
-			PlaceSprite(2809, 1523, sprAmGirder, 6, lfNormal)
-			PlaceSprite(2809, 1647, sprAmGirder, 2, lfNormal)
-			PlaceSprite(2469, 1777, sprAmGirder, 7, lfNormal)
-			PlaceSprite(2612, 1715, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2809, 1702, sprAmGirder, 0, lfNormal)
-			PlaceSprite(2727, 1694, sprAmGirder, 0, lfNormal)
+			PlaceSprite(430, 1871, sprAmGirder, 2)
+			PlaceSprite(1249, 1914, sprAmGirder, 4)
+			PlaceSprite(1394, 1849, sprAmGirder, 7)
+			PlaceSprite(1522, 1848, sprAmGirder, 5)
+			PlaceSprite(1578, 1959, sprAmGirder, 2)
+			PlaceSprite(1545, 2011, sprAmGirder, 0)
+			PlaceSprite(430, 1749, sprAmGirder, 6)
+			PlaceSprite(430, 1589, sprAmGirder, 6)
+			PlaceSprite(358, 1499, sprAmGirder, 4)
+			PlaceSprite(198, 1499, sprAmGirder, 4)
+			PlaceSprite(72, 1571, sprAmGirder, 7)
+			PlaceSprite(339, 1618, sprAmGirder, 4)
+			PlaceSprite(520, 1499, sprAmGirder, 4)
+			PlaceSprite(680, 1499, sprAmGirder, 4)
+			PlaceSprite(839, 1499, sprAmGirder, 4)
+			PlaceSprite(1000, 1499, sprAmGirder, 4)
+			PlaceSprite(1404, 1730, sprAmGirder, 5)
+			PlaceSprite(1288, 1613, sprAmGirder, 5)
+			PlaceSprite(1200, 1529, sprAmGirder, 1)
+			PlaceSprite(1125, 1495, sprAmGirder, 0)
+			PlaceSprite(1667, 2011, sprAmGirder, 4)
+			PlaceSprite(1812, 1951, sprAmGirder, 7)
+			PlaceSprite(1964, 2024, sprAmGirder, 0)
+			PlaceSprite(1957, 1892, sprAmGirder, 4)
+			PlaceSprite(2103, 1949, sprAmGirder, 5)
+			PlaceSprite(2242, 2017, sprAmGirder, 4)
+			PlaceSprite(2404, 2017, sprAmGirder, 4)
+			PlaceSprite(2548, 1955, sprAmGirder, 7)
+			PlaceSprite(2635, 1871, sprAmGirder, 3)
+			PlaceSprite(2749, 1836, sprAmGirder, 4)
+			PlaceSprite(2751, 1999, sprAmGirder, 2)
+			PlaceSprite(2749, 1947, sprAmGirder, 0)
+			PlaceSprite(2865, 1870, sprAmGirder, 1)
+			PlaceSprite(2954, 1954, sprAmGirder, 5)
+			PlaceSprite(3061, 2017, sprAmGirder, 0)
+			PlaceSprite(3137, 1984, sprAmGirder, 3)
+			PlaceSprite(3169, 1864, sprAmGirder, 6)
+			PlaceSprite(3169, 1702, sprAmGirder, 6)
+			PlaceSprite(3170, 1540, sprAmGirder, 6)
+			PlaceSprite(3170, 1418, sprAmGirder, 2)
+			PlaceSprite(3138, 1339, sprAmGirder, 1)
+			PlaceSprite(3107, 1260, sprAmGirder, 2)
+			PlaceSprite(3153, 1194, sprAmGirder, 3)
+			PlaceSprite(3230, 1163, sprAmGirder, 0)
+			PlaceSprite(3305, 1201, sprAmGirder, 1)
+			PlaceSprite(3334, 1277, sprAmGirder, 2)
+			PlaceSprite(3227, 1540, sprAmGirder, 6)
+			PlaceSprite(3228, 1419, sprAmGirder, 2)
+			PlaceSprite(3334, 1358, sprAmGirder, 2)
+			PlaceSprite(3280, 1387, sprAmGirder, 0)
+			PlaceSprite(3227, 1702, sprAmGirder, 6)
+			PlaceSprite(3227, 1864, sprAmGirder, 6)
+			PlaceSprite(3253, 1981, sprAmGirder, 1)
+			PlaceSprite(3366, 2017, sprAmGirder, 4)
+			PlaceSprite(3528, 2018, sprAmGirder, 4)
+			PlaceSprite(3689, 2018, sprAmGirder, 4)
+			PlaceSprite(246, 1262, sprAmGirder, 4)
+			PlaceSprite(407, 1262, sprAmGirder, 4)
+			PlaceSprite(568, 1262, sprAmGirder, 4)
+			PlaceSprite(731, 1262, sprAmGirder, 4)
+			PlaceSprite(894, 1261, sprAmGirder, 4)
+			PlaceSprite(1056, 1261, sprAmGirder, 4)
+			PlaceSprite(1179, 1262, sprAmGirder, 0)
+			PlaceSprite(1288, 1314, sprAmGirder, 5)
+			PlaceSprite(1406, 1433, sprAmGirder, 5)
+			PlaceSprite(1525, 1549, sprAmGirder, 5)
+			PlaceSprite(1642, 1666, sprAmGirder, 5)
+			PlaceSprite(1749, 1728, sprAmGirder, 0)
+			PlaceSprite(1956, 1802, sprAmGirder, 6)
+			PlaceSprite(1956, 1640, sprAmGirder, 6)
+			PlaceSprite(1782, 1638, sprAmGirder, 6)
+			PlaceSprite(1835, 1487, sprAmGirder, 7)
+			PlaceSprite(1942, 1430, sprAmGirder, 0)
+			PlaceSprite(2051, 1486, sprAmGirder, 5)
+			PlaceSprite(2109, 1639, sprAmGirder, 6)
+			PlaceSprite(2177, 1778, sprAmGirder, 5)
+			PlaceSprite(2323, 1840, sprAmGirder, 4)
+			PlaceSprite(49, 1029, sprAmGirder, 0)
+			PlaceSprite(499, 1172, sprAmGirder, 6)
+			PlaceSprite(527, 1054, sprAmGirder, 3)
+			PlaceSprite(604, 1026, sprAmGirder, 0)
+			PlaceSprite(680, 1056, sprAmGirder, 1)
+			PlaceSprite(719, 1168, sprAmGirder, 6)
+			PlaceSprite(89, 728, sprAmGirder, 4)
+			PlaceSprite(251, 728, sprAmGirder, 4)
+			PlaceSprite(412, 728, sprAmGirder, 4)
+			PlaceSprite(572, 728, sprAmGirder, 4)
+			PlaceSprite(733, 728, sprAmGirder, 4)
+			PlaceSprite(894, 728, sprAmGirder, 4)
+			PlaceSprite(1016, 728, sprAmGirder, 0)
+			PlaceSprite(1067, 799, sprAmGirder, 6)
+			PlaceSprite(1139, 891, sprAmGirder, 4)
+			PlaceSprite(1067, 1171, sprAmGirder, 6)
+			PlaceSprite(1067, 1049, sprAmGirder, 2)
+			PlaceSprite(1136, 999, sprAmGirder, 4)
+			PlaceSprite(1005, 854, sprAmGirder, 2)
+			PlaceSprite(972, 803, sprAmGirder, 0)
+			PlaceSprite(920, 780, sprAmGirder, 2)
+			PlaceSprite(891, 1206, sprAmGirder, 2)
+			PlaceSprite(887, 1150, sprAmGirder, 0)
+			PlaceSprite(3018, 1311, sprAmGirder, 4)
+			PlaceSprite(2871, 1369, sprAmGirder, 7)
+			PlaceSprite(2809, 1523, sprAmGirder, 6)
+			PlaceSprite(2809, 1647, sprAmGirder, 2)
+			PlaceSprite(2469, 1777, sprAmGirder, 7)
+			PlaceSprite(2612, 1715, sprAmGirder, 4)
+			PlaceSprite(2809, 1702, sprAmGirder, 0)
+			PlaceSprite(2727, 1694, sprAmGirder, 0)
 
-			PlaceSprite(3334, 1481, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3334, 1643, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3334, 1804, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3403, 1940, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1120, 944, sprAmGirder, 2, lfNormal)
-			PlaceSprite(1163, 945, sprAmGirder, 2, lfNormal)
-			PlaceSprite(1141, 781, sprAmGirder, 5, lfNormal)
-			PlaceSprite(81, 629, sprAmGirder, 1, lfNormal)
-			PlaceSprite(102, 498, sprAmGirder, 3, lfNormal)
-			PlaceSprite(81, 373, sprAmGirder, 1, lfNormal)
-			PlaceSprite(179, 453, sprAmGirder, 6, lfNormal)
-			PlaceSprite(100, 260, sprAmGirder, 3, lfNormal)
-			PlaceSprite(179, 330, sprAmGirder, 2, lfNormal)
-			PlaceSprite(249, 544, sprAmGirder, 4, lfNormal)
-			PlaceSprite(410, 545, sprAmGirder, 4, lfNormal)
-			PlaceSprite(571, 543, sprAmGirder, 4, lfNormal)
-			PlaceSprite(731, 543, sprAmGirder, 4, lfNormal)
-			PlaceSprite(891, 544, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1014, 544, sprAmGirder, 0, lfNormal)
-			PlaceSprite(1779, 1321, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1779, 1159, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1779, 997, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1779, 836, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1722, 684, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1137, 545, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1298, 545, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1460, 546, sprAmGirder, 4, lfNormal)
-			PlaceSprite(1608, 600, sprAmGirder, 5, lfNormal)
-			PlaceSprite(1508, 1005, sprAmGirder, 4, lfNormal)
-			PlaceSprite(160, 246, sprAmGirder, 1, lfNormal)
-			PlaceSprite(1821, 1356, sprAmGirder, 3, lfNormal)
-			PlaceSprite(1938, 1323, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2086, 1381, sprAmGirder, 5, lfNormal)
-			PlaceSprite(4004, 2018, sprAmGirder, 4, lfNormal)
-			PlaceSprite(3934, 1926, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3965, 1835, sprAmGirder, 0, lfNormal)
-			PlaceSprite(4015, 1763, sprAmGirder, 6, lfNormal)
-			PlaceSprite(4015, 1603, sprAmGirder, 6, lfNormal)
-			PlaceSprite(4015, 1442, sprAmGirder, 6, lfNormal)
-			PlaceSprite(4015, 1280, sprAmGirder, 6, lfNormal)
-			PlaceSprite(4014, 1118, sprAmGirder, 6, lfNormal)
-			PlaceSprite(4014, 956, sprAmGirder, 6, lfNormal)
-			PlaceSprite(4014, 793, sprAmGirder, 6, lfNormal)
-			PlaceSprite(4014, 632, sprAmGirder, 6, lfNormal)
-			PlaceSprite(4014, 469, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3981, 351, sprAmGirder, 1, lfNormal)
-			PlaceSprite(3985, 204, sprAmGirder, 3, lfNormal)
-			PlaceSprite(4045, 156, sprAmGirder, 0, lfNormal)
-			PlaceSprite(3667, 344, sprAmGirder, 0, lfNormal)
-			PlaceSprite(4016, 1925, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3998, 1926, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3980, 1925, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3957, 1926, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3843, 1832, sprAmGirder, 4, lfNormal)
-			PlaceSprite(3682, 1832, sprAmGirder, 4, lfNormal)
-			PlaceSprite(3561, 1833, sprAmGirder, 0, lfNormal)
-			PlaceSprite(3484, 1796, sprAmGirder, 1, lfNormal)
-			PlaceSprite(3455, 1675, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3455, 1513, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3455, 1351, sprAmGirder, 6, lfNormal)
-			PlaceSprite(1601, 476, sprAmGirder, 7, lfNormal)
-			PlaceSprite(1706, 421, sprAmGirder, 0, lfNormal)
-			PlaceSprite(1888, 366, sprAmGirder, 6, lfNormal)
+			PlaceSprite(3334, 1481, sprAmGirder, 6)
+			PlaceSprite(3334, 1643, sprAmGirder, 6)
+			PlaceSprite(3334, 1804, sprAmGirder, 6)
+			PlaceSprite(3403, 1940, sprAmGirder, 5)
+			PlaceSprite(1120, 944, sprAmGirder, 2)
+			PlaceSprite(1163, 945, sprAmGirder, 2)
+			PlaceSprite(1141, 781, sprAmGirder, 5)
+			PlaceSprite(81, 629, sprAmGirder, 1)
+			PlaceSprite(102, 498, sprAmGirder, 3)
+			PlaceSprite(81, 373, sprAmGirder, 1)
+			PlaceSprite(179, 453, sprAmGirder, 6)
+			PlaceSprite(100, 260, sprAmGirder, 3)
+			PlaceSprite(179, 330, sprAmGirder, 2)
+			PlaceSprite(249, 544, sprAmGirder, 4)
+			PlaceSprite(410, 545, sprAmGirder, 4)
+			PlaceSprite(571, 543, sprAmGirder, 4)
+			PlaceSprite(731, 543, sprAmGirder, 4)
+			PlaceSprite(891, 544, sprAmGirder, 4)
+			PlaceSprite(1014, 544, sprAmGirder, 0)
+			PlaceSprite(1779, 1321, sprAmGirder, 6)
+			PlaceSprite(1779, 1159, sprAmGirder, 6)
+			PlaceSprite(1779, 997, sprAmGirder, 6)
+			PlaceSprite(1779, 836, sprAmGirder, 6)
+			PlaceSprite(1722, 684, sprAmGirder, 5)
+			PlaceSprite(1137, 545, sprAmGirder, 4)
+			PlaceSprite(1298, 545, sprAmGirder, 4)
+			PlaceSprite(1460, 546, sprAmGirder, 4)
+			PlaceSprite(1608, 600, sprAmGirder, 5)
+			PlaceSprite(1508, 1005, sprAmGirder, 4)
+			PlaceSprite(160, 246, sprAmGirder, 1)
+			PlaceSprite(1821, 1356, sprAmGirder, 3)
+			PlaceSprite(1938, 1323, sprAmGirder, 4)
+			PlaceSprite(2086, 1381, sprAmGirder, 5)
+			PlaceSprite(4004, 2018, sprAmGirder, 4)
+			PlaceSprite(3934, 1926, sprAmGirder, 6)
+			PlaceSprite(3965, 1835, sprAmGirder, 0)
+			PlaceSprite(4015, 1763, sprAmGirder, 6)
+			PlaceSprite(4015, 1603, sprAmGirder, 6)
+			PlaceSprite(4015, 1442, sprAmGirder, 6)
+			PlaceSprite(4015, 1280, sprAmGirder, 6)
+			PlaceSprite(4014, 1118, sprAmGirder, 6)
+			PlaceSprite(4014, 956, sprAmGirder, 6)
+			PlaceSprite(4014, 793, sprAmGirder, 6)
+			PlaceSprite(4014, 632, sprAmGirder, 6)
+			PlaceSprite(4014, 469, sprAmGirder, 6)
+			PlaceSprite(3981, 351, sprAmGirder, 1)
+			PlaceSprite(3985, 204, sprAmGirder, 3)
+			PlaceSprite(4045, 156, sprAmGirder, 0)
+			PlaceSprite(3667, 344, sprAmGirder, 0)
+			PlaceSprite(4016, 1925, sprAmGirder, 6)
+			PlaceSprite(3998, 1926, sprAmGirder, 6)
+			PlaceSprite(3980, 1925, sprAmGirder, 6)
+			PlaceSprite(3957, 1926, sprAmGirder, 6)
+			PlaceSprite(3843, 1832, sprAmGirder, 4)
+			PlaceSprite(3682, 1832, sprAmGirder, 4)
+			PlaceSprite(3561, 1833, sprAmGirder, 0)
+			PlaceSprite(3484, 1796, sprAmGirder, 1)
+			PlaceSprite(3455, 1675, sprAmGirder, 6)
+			PlaceSprite(3455, 1513, sprAmGirder, 6)
+			PlaceSprite(3455, 1351, sprAmGirder, 6)
+			PlaceSprite(1601, 476, sprAmGirder, 7)
+			PlaceSprite(1706, 421, sprAmGirder, 0)
+			PlaceSprite(1888, 366, sprAmGirder, 6)
 
-			PlaceSprite(3997, 1743, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3979, 1742, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3962, 1741, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3943, 1741, sprAmGirder, 6, lfNormal)
-			PlaceSprite(2199, 393, sprAmGirder, 7, lfNormal)
-			PlaceSprite(2304, 337, sprAmGirder, 0, lfNormal)
-			PlaceSprite(2409, 392, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2470, 502, sprAmGirder, 2, lfNormal)
-			PlaceSprite(2412, 606, sprAmGirder, 7, lfNormal)
-			PlaceSprite(2308, 673, sprAmGirder, 0, lfNormal)
-			PlaceSprite(2202, 612, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2138, 507, sprAmGirder, 2, lfNormal)
-			PlaceSprite(2739, 378, sprAmGirder, 7, lfNormal)
-			PlaceSprite(2847, 322, sprAmGirder, 0, lfNormal)
-			PlaceSprite(2953, 378, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2680, 489, sprAmGirder, 2, lfNormal)
-			PlaceSprite(3012, 489, sprAmGirder, 2, lfNormal)
-			PlaceSprite(2736, 594, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2841, 657, sprAmGirder, 0, lfNormal)
-			PlaceSprite(2949, 594, sprAmGirder, 7, lfNormal)
-			PlaceSprite(2448, 837, sprAmGirder, 7, lfNormal)
-			PlaceSprite(2594, 779, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2739, 836, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2390, 950, sprAmGirder, 2, lfNormal)
-			PlaceSprite(2789, 950, sprAmGirder, 2, lfNormal)
-			PlaceSprite(2593, 904, sprAmGirder, 4, lfNormal)
-			PlaceSprite(2727, 1056, sprAmGirder, 7, lfNormal)
-			PlaceSprite(2452, 1058, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2510, 1215, sprAmGirder, 6, lfNormal)
-			PlaceSprite(2663, 1208, sprAmGirder, 6, lfNormal)
-			PlaceSprite(2510, 1378, sprAmGirder, 6, lfNormal)
-			PlaceSprite(2664, 1369, sprAmGirder, 6, lfNormal)
-			PlaceSprite(300, 275, sprAmGirder, 0, lfNormal)
-			PlaceSprite(439, 274, sprAmGirder, 0, lfNormal)
-			PlaceSprite(628, 273, sprAmGirder, 4, lfNormal)
-			PlaceSprite(811, 271, sprAmGirder, 0, lfNormal)
-			PlaceSprite(737, 373, sprAmGirder, 4, lfNormal)
-			PlaceSprite(934, 440, sprAmGirder, 0, lfNormal)
-			PlaceSprite(1075, 439, sprAmGirder, 0, lfNormal)
-			PlaceSprite(1209, 438, sprAmGirder, 0, lfNormal)
-			PlaceSprite(1383, 439, sprAmGirder, 4, lfNormal)
-			--PlaceSprite(2159, 1525, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3547, 344, sprAmGirder, 4, lfNormal)
-			PlaceSprite(3584, 254, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3508, 132, sprAmGirder, 5, lfNormal)
-			PlaceSprite(3335, 1117, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3335, 956, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3335, 795, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3335, 634, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3335, 513, sprAmGirder, 2, lfNormal)
-			PlaceSprite(3401, 404, sprAmGirder, 7, lfNormal)
-			PlaceSprite(3455, 1190, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3455, 1029, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3455, 868, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3455, 705, sprAmGirder, 6, lfNormal)
-			PlaceSprite(3455, 582, sprAmGirder, 2, lfNormal)
-			PlaceSprite(3485, 503, sprAmGirder, 3, lfNormal)
-			PlaceSprite(3601, 475, sprAmGirder, 4, lfNormal)
-			PlaceSprite(3719, 444, sprAmGirder, 3, lfNormal)
-			PlaceSprite(3094, 828, sprAmGirder, 5, lfNormal)
-			PlaceSprite(2064, 947, sprAmGirder, 7, lfNormal)
-			PlaceSprite(1826, 512, sprAmGirder, 7, lfNormal)
+			PlaceSprite(3997, 1743, sprAmGirder, 6)
+			PlaceSprite(3979, 1742, sprAmGirder, 6)
+			PlaceSprite(3962, 1741, sprAmGirder, 6)
+			PlaceSprite(3943, 1741, sprAmGirder, 6)
+			PlaceSprite(2199, 393, sprAmGirder, 7)
+			PlaceSprite(2304, 337, sprAmGirder, 0)
+			PlaceSprite(2409, 392, sprAmGirder, 5)
+			PlaceSprite(2470, 502, sprAmGirder, 2)
+			PlaceSprite(2412, 606, sprAmGirder, 7)
+			PlaceSprite(2308, 673, sprAmGirder, 0)
+			PlaceSprite(2202, 612, sprAmGirder, 5)
+			PlaceSprite(2138, 507, sprAmGirder, 2)
+			PlaceSprite(2739, 378, sprAmGirder, 7)
+			PlaceSprite(2847, 322, sprAmGirder, 0)
+			PlaceSprite(2953, 378, sprAmGirder, 5)
+			PlaceSprite(2680, 489, sprAmGirder, 2)
+			PlaceSprite(3012, 489, sprAmGirder, 2)
+			PlaceSprite(2736, 594, sprAmGirder, 5)
+			PlaceSprite(2841, 657, sprAmGirder, 0)
+			PlaceSprite(2949, 594, sprAmGirder, 7)
+			PlaceSprite(2448, 837, sprAmGirder, 7)
+			PlaceSprite(2594, 779, sprAmGirder, 4)
+			PlaceSprite(2739, 836, sprAmGirder, 5)
+			PlaceSprite(2390, 950, sprAmGirder, 2)
+			PlaceSprite(2789, 950, sprAmGirder, 2)
+			PlaceSprite(2593, 904, sprAmGirder, 4)
+			PlaceSprite(2727, 1056, sprAmGirder, 7)
+			PlaceSprite(2452, 1058, sprAmGirder, 5)
+			PlaceSprite(2510, 1215, sprAmGirder, 6)
+			PlaceSprite(2663, 1208, sprAmGirder, 6)
+			PlaceSprite(2510, 1378, sprAmGirder, 6)
+			PlaceSprite(2664, 1369, sprAmGirder, 6)
+			PlaceSprite(300, 275, sprAmGirder, 0)
+			PlaceSprite(439, 274, sprAmGirder, 0)
+			PlaceSprite(628, 273, sprAmGirder, 4)
+			PlaceSprite(811, 271, sprAmGirder, 0)
+			PlaceSprite(737, 373, sprAmGirder, 4)
+			PlaceSprite(934, 440, sprAmGirder, 0)
+			PlaceSprite(1075, 439, sprAmGirder, 0)
+			PlaceSprite(1209, 438, sprAmGirder, 0)
+			PlaceSprite(1383, 439, sprAmGirder, 4)
+			--PlaceSprite(2159, 1525, sprAmGirder, 6)
+			PlaceSprite(3547, 344, sprAmGirder, 4)
+			PlaceSprite(3584, 254, sprAmGirder, 6)
+			PlaceSprite(3508, 132, sprAmGirder, 5)
+			PlaceSprite(3335, 1117, sprAmGirder, 6)
+			PlaceSprite(3335, 956, sprAmGirder, 6)
+			PlaceSprite(3335, 795, sprAmGirder, 6)
+			PlaceSprite(3335, 634, sprAmGirder, 6)
+			PlaceSprite(3335, 513, sprAmGirder, 2)
+			PlaceSprite(3401, 404, sprAmGirder, 7)
+			PlaceSprite(3455, 1190, sprAmGirder, 6)
+			PlaceSprite(3455, 1029, sprAmGirder, 6)
+			PlaceSprite(3455, 868, sprAmGirder, 6)
+			PlaceSprite(3455, 705, sprAmGirder, 6)
+			PlaceSprite(3455, 582, sprAmGirder, 2)
+			PlaceSprite(3485, 503, sprAmGirder, 3)
+			PlaceSprite(3601, 475, sprAmGirder, 4)
+			PlaceSprite(3719, 444, sprAmGirder, 3)
+			PlaceSprite(3094, 828, sprAmGirder, 5)
+			PlaceSprite(2064, 947, sprAmGirder, 7)
+			PlaceSprite(1826, 512, sprAmGirder, 7)
 
-			PlaceSprite(3420, 49, sprAmGirder, 1, lfNormal)
-			PlaceSprite(410, 682, sprAmGirder, 3, lfNormal)
-			PlaceSprite(528, 653, sprAmGirder, 4, lfNormal)
-			PlaceSprite(688, 653, sprAmGirder, 4, lfNormal)
-			PlaceSprite(805, 684, sprAmGirder, 1, lfNormal)
-			PlaceSprite(528, 672, sprAmGirder, 4, lfNormal)
-			PlaceSprite(688, 672, sprAmGirder, 4, lfNormal)
-			PlaceSprite(500, 696, sprAmGirder, 4, lfNormal)
-			PlaceSprite(701, 696, sprAmGirder, 4, lfNormal)
+			PlaceSprite(3420, 49, sprAmGirder, 1)
+			PlaceSprite(410, 682, sprAmGirder, 3)
+			PlaceSprite(528, 653, sprAmGirder, 4)
+			PlaceSprite(688, 653, sprAmGirder, 4)
+			PlaceSprite(805, 684, sprAmGirder, 1)
+			PlaceSprite(528, 672, sprAmGirder, 4)
+			PlaceSprite(688, 672, sprAmGirder, 4)
+			PlaceSprite(500, 696, sprAmGirder, 4)
+			PlaceSprite(701, 696, sprAmGirder, 4)
 
 			------ AMMO CRATE LIST ------
 			tempG = SpawnAmmoCrate(889, 1126, amBaseballBat)
@@ -1580,6 +1919,7 @@
 		(GetGearType(gear) == gtExplosives) or
 		(GetGearType(gear) == gtMine) or
 		(GetGearType(gear) == gtSMine) or
+		(GetGearType(gear) == gtAirMine) or
 		(GetGearType(gear) == gtCase)
 	then
 		return(true)