DEADSOFTWARE

Revert one line that breaks rocket parkour feature
[d2df-sdl.git] / src / game / g_weapons.pas
index e63de3c653a96d42b616ec32543014a8c5934dbd..68843d20c3d2e20528ae1fb449142a2960306550 100644 (file)
@@ -1,3 +1,19 @@
+(* Copyright (C)  DooM 2D:Forever Developers
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *)
+{$MODE DELPHI}
 unit g_weapons;
 
 interface
@@ -106,11 +122,11 @@ type
   end;
 
 const
-  SHOT_ROCKETLAUNCHER_WIDTH = 27;
-  SHOT_ROCKETLAUNCHER_HEIGHT = 12;
+  SHOT_ROCKETLAUNCHER_WIDTH = 14;
+  SHOT_ROCKETLAUNCHER_HEIGHT = 14;
 
-  SHOT_SKELFIRE_WIDTH = 32;
-  SHOT_SKELFIRE_HEIGHT = 16;
+  SHOT_SKELFIRE_WIDTH = 14;
+  SHOT_SKELFIRE_HEIGHT = 14;
 
   SHOT_PLASMA_WIDTH = 16;
   SHOT_PLASMA_HEIGHT = 16;
@@ -1189,7 +1205,7 @@ begin
     Obj.Rect.Width := SHOT_ROCKETLAUNCHER_WIDTH;
     Obj.Rect.Height := SHOT_ROCKETLAUNCHER_HEIGHT;
 
-    dx := IfThen(xd>x, -Obj.Rect.Width, 0);
+    dx := IfThen(xd > x, -Obj.Rect.Width, 0);
     dy := -(Obj.Rect.Height div 2);
     throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 12);
 
@@ -1227,7 +1243,7 @@ begin
     Obj.Rect.Width := SHOT_SKELFIRE_WIDTH;
     Obj.Rect.Height := SHOT_SKELFIRE_HEIGHT;
 
-    dx := IfThen(xd>x, -Obj.Rect.Width, 0);
+    dx := -(Obj.Rect.Width div 2);
     dy := -(Obj.Rect.Height div 2);
     throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 12);
 
@@ -1675,7 +1691,7 @@ begin
               begin
                 Anim := TAnimation.Create(_id, False, 3);
                 Anim.Alpha := 150;
-                g_GFX_OnceAnim(Obj.X-8+Random(9),
+                g_GFX_OnceAnim(Obj.X-14+Random(9),
                                Obj.Y+(Obj.Rect.Height div 2)-20+Random(9),
                                Anim, ONCEANIM_SMOKE);
                 Anim.Free();
@@ -1697,7 +1713,7 @@ begin
                   begin
                     Anim := TAnimation.Create(TextureID, False, 8);
                     Anim.Blending := False;
-                    g_GFX_OnceAnim((Obj.X+32)-32, (Obj.Y+8)-32, Anim);
+                    g_GFX_OnceAnim((Obj.X+32)-58, (Obj.Y+8)-36, Anim);
                     Anim.Free();
                   end;
                 end