X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_netmsg.pas;h=1bb60c2d53a4aa234445cb1e56a8090f677b1c35;hp=e84d82965bcc48850e4d971a28234fb4adbf7a18;hb=793c463d8e71d5b31b0f99d050bd77870a7a9f2a;hpb=4de34c0c003869d8f125768be330702020f3c514 diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index e84d829..1bb60c2 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -2787,6 +2787,7 @@ var Predict: Boolean; strafeDir: Byte; WeaponSelect: Word = 0; + i: Integer; begin if not gGameOn then Exit; if gPlayers = nil then Exit; @@ -2857,10 +2858,13 @@ begin if gPlayerAction[0, ACTION_WEAPNEXT] then kByte := kByte or NET_KEY_NW; if gPlayerAction[0, ACTION_WEAPPREV] then kByte := kByte or NET_KEY_PW; - if gSelectWeapon[0] >= 0 then + for i := WP_FIRST to WP_LAST do begin - WeaponSelect := gSelectWeapon[0]; - //gSelectWeapon[0] := -1 + if gSelectWeapon[0, i] then + begin + WeaponSelect := WeaponSelect or Word(1 shl i); + gSelectWeapon[0, i] := False + end end; // fix movebutton state