X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_netmsg.pas;h=f235035fbda6d740146eb383d07d4e66e740948f;hb=8a0bb6df836d0e815a261280d628cfd766fa02e7;hp=f44e2113a2e45e99351cf381c53325cd588c1cab;hpb=7fff36f90fbb1fb0f5a8cdc8d3c49a5dc2ee67b8;p=d2df-sdl.git diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index f44e211..f235035 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -2043,8 +2043,8 @@ begin Exit; end; gTime := GT; - if g_Game_IsClient and (gPlayer1.NetForceWeapFIdx >= gTime+5) then gPlayer1.NetForceWeapFIdx := 0; - if g_Game_IsClient and (gPlayer2 <> nil) and (gPlayer2.NetForceWeapFIdx >= gTime+5) then gPlayer2.NetForceWeapFIdx := 0; + if g_Game_IsClient and (gPlayer1 <> nil) and (gPlayer1.NetForceWeapFIdx >= gTime+15) then gPlayer1.NetForceWeapFIdx := 0; + if g_Game_IsClient and (gPlayer2 <> nil) and (gPlayer2.NetForceWeapFIdx >= gTime+15) then gPlayer2.NetForceWeapFIdx := 0; PID := M.ReadWord(); Pl := g_Player_Get(PID); @@ -2839,9 +2839,11 @@ begin begin if isKeyPressed(KeyWeapon[I], KeyWeapon2[I]) then begin + //writeln('keyweapon #', i, ' is pressed; released=', Integer(gPlayer1.isWeaponSwitchKeyReleased(i)), '; frm=', gPlayer1.NetForceWeapFIdx, '; gTime=', gTime); gPlayer1.weaponSwitchKeysStateChange(i, true); if gPlayer1.isWeaponSwitchKeyReleased(i) then begin + //writeln('keyweapon #', i, ' is pressed; released=', Integer(gPlayer1.isWeaponSwitchKeyReleased(i)), '; frm=', gPlayer1.NetForceWeapFIdx, '; gTime=', gTime); gPlayer1.QueueWeaponSwitch(i); // all choices are passed there, and god will take the best //WeaponSelect := WeaponSelect or Word(1 shl I); end;