diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas
index e9cc68c2ee55ac7fcb0067073ed725ecdedd6e9e..f44e2113a2e45e99351cf381c53325cd588c1cab 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
writeln('HOST PLRPOS: got: currweap=', CurrWeap, '; curfrm=', gTime, '; netweap=', newweapon, '; oldweap=', CurrWeap);
{$ENDIF}
//NetForceWeap := newweapon;
writeln('HOST PLRPOS: got: currweap=', CurrWeap, '; curfrm=', gTime, '; netweap=', newweapon, '; oldweap=', CurrWeap);
{$ENDIF}
//NetForceWeap := newweapon;
- SetWeaponHost(newweapon);
+ SetWeapon(newweapon);
end;
//e_WriteLog(Format('R:ws=%d', [WeaponSelect]), MSG_WARNING);
if Direction <> TDirection(Dir) then
end;
//e_WriteLog(Format('R:ws=%d', [WeaponSelect]), MSG_WARNING);
if Direction <> TDirection(Dir) then
Exit;
end;
gTime := GT;
Exit;
end;
gTime := GT;
- 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;
+ 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;
PID := M.ReadWord();
Pl := g_Player_Get(PID);
PID := M.ReadWord();
Pl := g_Player_Get(PID);
if (gTime >= NetForceWeapFIdx) then
begin
//NetForceWeap := newweapon;
if (gTime >= NetForceWeapFIdx) then
begin
//NetForceWeap := newweapon;
- SetWeaponHost(newweapon);
+ SetWeapon(newweapon);
end;
//SetWeapon(M.ReadByte());
end;
//SetWeapon(M.ReadByte());
begin
if isKeyPressed(KeyWeapon[I], KeyWeapon2[I]) then
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
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;
gPlayer1.QueueWeaponSwitch(i); // all choices are passed there, and god will take the best
//WeaponSelect := WeaponSelect or Word(1 shl I);
end;