DEADSOFTWARE

Revert "fix: we can have more priorities than "real" weapons (consider berserk knuckl...
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Fri, 4 Jan 2019 19:58:38 +0000 (22:58 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Fri, 4 Jan 2019 19:58:38 +0000 (22:58 +0300)
src/game/g_player.pas

index 8628d4a436e982b1027ae5048d86465a732b305b..3d1b927b6f7f78bea422f0cf7a480dead5133473 100644 (file)
@@ -3730,14 +3730,14 @@ begin
 
   // find next weapon to switch onto
   cwi := curlidx;
-  for i := 0 to High(weaponOrder) do
+  for i := 0 to High(FWeapon) do
   begin
-    cwi := (cwi+length(weaponOrder)+1) mod length(weaponOrder);
+    cwi := (cwi+length(FWeapon)+1) mod length(FWeapon);
     if (cwi = curlidx) then continue; // skip current weapon
     if not wantThisWeapon[cwi] then continue;
     rwidx := weaponOrder[cwi];
     if (rwidx < 0) then continue;
-    //e_WriteLog(Format('  trying logical %d (real %d); has=%d, hasammo=%d', [cwi, rwidx, Integer(FWeapon[rwidx]), Integer(hasAmmoForWeapon(rwidx))]), TMsgType.Warning);
+    //e_WriteLog(Format('  trying logical %d (real %d)', [cwi, rwidx]), TMsgType.Warning);
     if FWeapon[rwidx] and ((wwc = 1) or hasAmmoForWeapon(rwidx)) then
     begin
       //e_WriteLog('    I FOUND HER!', TMsgType.Warning);