X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_netmsg.pas;h=8b42846dd97d6dbc254b2639aefdc7847d615848;hp=910a480a78d25b4073593853012ef1a7d8e6a5b4;hb=1eb8b9c599c59d9cdb36f68bb1ca176b86a0dc80;hpb=1faa4ed48a2107743f3f77c9ee966eb4c29c18e0 diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index 910a480..8b42846 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -400,9 +400,8 @@ begin 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 @@ -461,8 +460,7 @@ begin begin Name := PName; WeapSwitchMode := WeapSwitch; - if (WeapSwitch = 2) then - SetWeaponPrefs(TmpPrefArray); + SetWeaponPrefs(TmpPrefArray); SwitchToEmpty := SwitchEmpty; SkipFist := SkipF; Reset(True); @@ -732,9 +730,8 @@ begin 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 @@ -763,9 +760,7 @@ begin 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; @@ -3164,9 +3159,8 @@ 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); @@ -3318,9 +3312,8 @@ 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);