DEADSOFTWARE

Refactor: Constants for first and last weapon
[d2df-sdl.git] / src / game / g_weapons.pas
index 43a02a25ead779c9c08bdbac902b6683811abaa5..c6f09a9d08dab480254b6657a86ed821a88e414d 100644 (file)
@@ -106,6 +106,9 @@ const
   WEAPON_MANCUB_FIRE    = 25;
   WEAPON_SKEL_FIRE      = 26;
 
+  WP_FIRST          = WEAPON_KASTET;
+  WP_LAST           = WEAPON_SUPERPULEMET;
+
 implementation
 
 uses
@@ -1205,7 +1208,7 @@ begin
     Obj.Rect.Width := SHOT_ROCKETLAUNCHER_WIDTH;
     Obj.Rect.Height := SHOT_ROCKETLAUNCHER_HEIGHT;
 
-    dx := -(Obj.Rect.Width div 2);
+    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);