From: DeaDDooMER Date: Fri, 4 Jan 2019 19:58:38 +0000 (+0300) Subject: Revert "fix: we can have more priorities than "real" weapons (consider berserk knuckl... X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=87d25f00069abd99b5e60eb95db44c350a87d5f6;p=d2df-sdl.git Revert "fix: we can have more priorities than "real" weapons (consider berserk knuckles and normal knuckles, for example)" This reverts commit fd7ac4cd55502ecbb2a77e3f603ac0f899c1064d. --- diff --git a/src/game/g_player.pas b/src/game/g_player.pas index 8628d4a..3d1b927 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -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);