diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas
index 55b99b3705acbc0ddbe05e00b04ba3657ea2c9fd..01708c297bf82b1d108efa9c427d892e90a29c08 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
WeapSwitch: Byte;
TmpPrefArray: Array [WP_FIRST .. WP_LAST + 1] of Byte;
SwitchEmpty: Byte;
+ SkipF: Byte;
PID: Word;
Color: TRGB;
I: Integer;
B := M.ReadByte();
T := M.ReadByte();
WeapSwitch := M.ReadByte();
- if (WeapSwitch = 2) then
- for I := WP_FIRST to WP_LAST + 1 do
- TmpPrefArray[I] := M.ReadByte();
+ for I := WP_FIRST to WP_LAST + 1 do
+ TmpPrefArray[I] := M.ReadByte();
SwitchEmpty := M.ReadByte();
+ SkipF := M.ReadByte();
except
Err := True;
end;
begin
Name := PName;
WeapSwitchMode := WeapSwitch;
- if (WeapSwitch = 2) then
- SetWeaponPrefs(TmpPrefArray);
+ SetWeaponPrefs(TmpPrefArray);
SwitchToEmpty := SwitchEmpty;
+ SkipFist := SkipF;
Reset(True);
end;
TmpWeapSwitch: Byte;
TmpPrefArray: Array [WP_FIRST .. WP_LAST + 1] of Byte;
TmpSwEmpty: Byte;
+ TmpSkipF: Byte;
I: Integer;
Pl: TPlayer;
Err: Boolean;
TmpColor.B := M.ReadByte();
TmpTeam := M.ReadByte();
TmpWeapSwitch := M.ReadByte();
- if (TmpWeapSwitch = 2) then
- for I := WP_FIRST to WP_LAST + 1 do
- TmpPrefArray[I] := M.ReadByte();
+ for I := WP_FIRST to WP_LAST + 1 do
+ TmpPrefArray[I] := M.ReadByte();
TmpSwEmpty := M.ReadByte();
+ TmpSkipF := M.ReadByte();
except
Err := True;
end;
if (TmpWeapSwitch <> Pl.WeapSwitchMode) then
Pl.WeapSwitchMode := TmpWeapSwitch;
- if (TmpWeapSwitch = 2) then
- Pl.SetWeaponPrefs(TmpPrefArray);
-
+ Pl.SetWeaponPrefs(TmpPrefArray);
if (TmpSwEmpty <> Pl.SwitchToEmpty) then
Pl.SwitchToEmpty := TmpSwEmpty;
+
+ if (TmpSkipF <> Pl.SkipFist) then
+ Pl.SkipFist := TmpSkipF;
+
MH_SEND_PlayerSettings(Pl.UID, TmpModel);
end;
TmpModel: string;
TmpColor: TRGB;
TmpTeam: Byte;
- i: Integer;
Pl: TPlayer;
PID: Word;
begin
NetOut.Write(gPlayer1Settings.Color.B);
NetOut.Write(gPlayer1Settings.Team);
NetOut.Write(gPlayer1Settings.WeaponSwitch);
- if (gPlayer1Settings.WeaponSwitch = 2) then
- for i := WP_FIRST to WP_LAST + 1 do
- NetOut.Write(gPlayer1Settings.WeaponPreferences[i]);
+ for i := WP_FIRST to WP_LAST + 1 do
+ NetOut.Write(gPlayer1Settings.WeaponPreferences[i]);
NetOut.Write(gPlayer1Settings.SwitchToEmpty);
+ NetOut.Write(gPlayer1Settings.SkipFist);
g_Net_Client_Send(True, NET_CHAN_SERVICE);
end;
NetOut.Write(gPlayer1Settings.Color.B);
NetOut.Write(gPlayer1Settings.Team);
NetOut.Write(gPlayer1Settings.WeaponSwitch);
- if (gPlayer1Settings.WeaponSwitch = 2) then
- for i := WP_FIRST to WP_LAST + 1 do
- NetOut.Write(gPlayer1Settings.WeaponPreferences[i]);
+ for i := WP_FIRST to WP_LAST + 1 do
+ NetOut.Write(gPlayer1Settings.WeaponPreferences[i]);
NetOut.Write(gPlayer1Settings.SwitchToEmpty);
+ NetOut.Write(gPlayer1Settings.SkipFist);
+
g_Net_Client_Send(True, NET_CHAN_IMPORTANT);
end;