@@ -107,6 +107,7 @@ function InitializeReplicatedCounts()
107107 for ( i = 0 ; i < Pocket .EnumCount ; ++i )
108108 {
109109 //assert(i != Pocket.Pocket_CustomSkin || ReplicatedLoadOutSpec[i] == None);
110+ mplog ("---NetPlayer::InitializeReplicatedCounts(" $i$ ") = " $ReplicatedLoadoutSpec [i ]);
110111 if ( ReplicatedLoadOutSpec [i ] != None )
111112 ++LoadOutSpecCount ;
112113 }
@@ -244,6 +245,25 @@ simulated event PostReplication()
244245 mplog ( self$ " has name: " $GetHumanReadableName () );
245246}
246247
248+ event PostNetReceive ()
249+ {
250+ local OfficerLoadout NewLoadout ;
251+
252+ if (ReplicatedLoadoutSpec [0 ] != DynamicLoadoutSpec .LoadOutSpec [0 ])
253+ {
254+ // Our loadout got forced to something else by the server. Adjust. Adapt. Overcome.
255+ NewLoadOut = Spawn (class 'OfficerLoadOut' , self , 'EmptyMultiplayerOfficerLoadOut' );
256+
257+ CopyReplicatedSpecToDynamicSpec ();
258+
259+ NewLoadout .Initialize (DynamicLoadoutSpec , false );
260+ ReceiveLoadout (NewLoadout );
261+
262+ CheckDesiredItemAndEquipIfNeeded ();
263+
264+ SwatGamePlayerController (Controller ).EquipNextSlot ();
265+ }
266+ }
247267
248268///////////////////////////////////////////////////////////////////////////////
249269//
@@ -799,11 +819,6 @@ simulated function OnDoorUnlocked( SwatDoor TheDoor )
799819simulated function DynamicLoadOutSpec GetLoadoutSpec ()
800820{
801821 //mplog( self$"---NetPlayer::GetLoadoutSpec()." );
802- if (SwatGamePlayerController (Controller ) != None && SwatGamePlayerController (Controller ).SwatRepoPlayerItem .bForcedLessLethal )
803- {
804- return SwatGameInfo (Level .Game ).Admin .GetLessLethalSpec ();
805- }
806-
807822 if ( DynamicLoadOutSpec == None )
808823 {
809824 if ( IsTheVIP () )
@@ -1009,6 +1024,8 @@ defaultproperties
10091024
10101025 TeamNumber=-1
10111026
1027+ bNetNotify=true
1028+
10121029 bLoadOutInitialized=false
10131030 LoadOutSpecCount=0
10141031 SkinsCount=0
0 commit comments