X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_game.pas;h=c3f4b589684658007dcc4e7d63a9b96a33e20c18;hp=6a11291bb77bfecb12ecb029a8b0d4b295c7ab3b;hb=7cd1c130359bef86087eaefe317526775e8ad4f8;hpb=681c1fa10d6cc9999d4cd0a284723fa0a8f4dec6 diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 6a11291..c3f4b58 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -1233,6 +1233,7 @@ procedure processPlayerControls (plr: TPlayer; var ctrl: TPlayerControl; var Mov var time: Word; strafeDir: Byte; + i: Integer; begin if (plr = nil) then exit; if (p2hack) then time := 1000 else time := 1; @@ -1279,6 +1280,13 @@ begin if isKeyPressed(KeyNextWeapon, KeyNextWeapon2) then plr.PressKey(KEY_NEXTWEAPON); if isKeyPressed(KeyPrevWeapon, KeyPrevWeapon2) then plr.PressKey(KEY_PREVWEAPON); if isKeyPressed(KeyOpen, KeyOpen2) then plr.PressKey(KEY_OPEN); + + for i := 0 to High(KeyWeapon) do + if isKeyPressed(KeyWeapon[i], KeyWeapon2[i]) then + begin + plr.ForceWeapon(i); + Break; + end; end; end;