X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_netmsg.pas;h=0ea771329dbf0358acd332b70e85d8e4fe24e90c;hb=b7c26c7f1787937245991190591ef4a6ee4d152e;hp=e84d82965bcc48850e4d971a28234fb4adbf7a18;hpb=228d34465e847f7953a4b2a9e6a32c3b5d2316ae;p=d2df-sdl.git diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index e84d829..0ea7713 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,16 @@ 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 + gPlayerAction[0, ACTION_WEAPNEXT] := False; // HACK, remove after readyweaon&pendinweapon implementation + gPlayerAction[0, ACTION_WEAPPREV] := False; // HACK, remove after readyweaon&pendinweapon implementation + + 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