DEADSOFTWARE

Fix empty switching
[d2df-sdl.git] / src / game / g_player.pas
index 8f4331079506d89ee91e6c0b00d13701ad8c5153..f80d72195105d1d96dcbffd5a0f7a63dd8efb2fd 100644 (file)
@@ -2043,9 +2043,11 @@ function TPlayer.maySwitch(Weapon: Byte) : Boolean;
 begin
   result := true;
   if (Weapon = WEAPON_KASTET) and (FSkipFist <> 0) then
+  begin
     if (FSkipFist = 1) and (not (R_BERSERK in FRulez)) then
-      result := false
-  else if (FSwitchToEmpty = 0) and not hasAmmoForWeapon(Weapon) then
+      result := false;
+  end
+  else if (FSwitchToEmpty = 0) and (not hasAmmoForWeapon(Weapon)) then
     result := false
 end;