Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- event Tick( float DeltaTime )
- {
- local name SessionName;
- local bool bUpdateGameSettings;
- local KFGameInfo_Survival KFGI;
- local KFOnlineGameSettings GameSettings;
- KFGI = KFGameInfo_Survival( WorldInfo.Game );
- super.Tick( DeltaTime );
- if ( WorldInfo.NetMode == NM_DedicatedServer || WorldInfo.NetMode == NM_ListenServer )
- {
- if ( KFGI != None && KFGI.GameInterface != None )
- {
- SessionName = KFGI.PlayerReplicationInfoClass.default.SessionName;
- if ( KFGI.PlayfabInter != None && KFGI.PlayfabInter.GetGameSettings() != None )
- {
- GameSettings = KFOnlineGameSettings( KFGI.PlayfabInter.GetGameSettings() );
- }
- else
- {
- GameSettings = KFOnlineGameSettings( KFGI.GameInterface.GetGameSettings( SessionName ) );
- }
- if ( GameSettings != None )
- {
- bUpdateGameSettings = false;
- if ( GameSettings.bCustom || !GameSettings.bUsesStats )
- {
- GameSettings.bCustom = false;
- GameSettings.bUsesStats = true;
- bUpdateGameSettings = true;
- }
- if ( GameSettings.bServerExiled )
- {
- GameSettings.bServerExiled = false;
- bUpdateGameSettings = true;
- }
- if ( bUpdateGameSettings )
- {
- if ( KFGI.PlayfabInter != None && KFGI.PlayfabInter.IsRegisteredWithPlayfab() )
- {
- KFGI.PlayfabInter.ServerUpdateOnlineGame();
- if ( WorldInfo.IsEOSDedicatedServer() )
- KFGI.GameInterface.UpdateOnlineGame( SessionName, GameSettings, true );
- }
- else
- {
- KFGI.GameInterface.UpdateOnlineGame( SessionName, GameSettings, true );
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment