File tree Expand file tree Collapse file tree
scripts/5_Mission/mission Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11modded class MissionServer {
22
3- override void OnEvent (EventType eventTypeId , Param params ) {
4- super .OnEvent (eventTypeId , params );
5-
6- switch (eventTypeId ) {
7-
8- case ClientNewEventTypeID :
9- case ClientReadyEventTypeID :
10-
11- ClientReadyEventParams readyParams = ClientReadyEventParams .Cast (params );
12- PlayerBase player ;
13- if (readyParams && Class .CastTo (player , readyParams .param2 )) {
14- syncSUserConfigConstraints (player );
15- }
16-
17- break ;
18-
19- }
3+ override PlayerBase OnClientNewEvent (PlayerIdentity identity , vector pos , ParamsReadContext ctx ) {
4+ PlayerBase player = super .OnClientNewEvent (identity , pos , ctx );
5+ syncSUserConfigConstraints (identity );
6+ return player ;
207 }
218
22- protected void syncSUserConfigConstraints (PlayerBase player ) {
23- SUserConfigConstraints .getInstance ().syncWith (player .GetIdentity ());
9+ override void OnClientReadyEvent (PlayerIdentity identity , PlayerBase player ) {
10+ super .OnClientReadyEvent (identity , player );
11+ syncSUserConfigConstraints (identity );
12+ }
13+
14+ protected void syncSUserConfigConstraints (PlayerIdentity playerIdentity ) {
15+ SUserConfigConstraints .getInstance ().syncWith (playerIdentity );
2416 }
2517
2618}
You can’t perform that action at this time.
0 commit comments