Skip to content

Commit

Permalink
game state timeline transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar committed Jun 27, 2024
1 parent f3707ba commit 4fe7250
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/game/client/swarm/gameui/swarm/basemodpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,11 @@ void CBaseModPanel::OnLevelLoadingStarted( char const *levelName, bool bShowProg
pLoadingProgress->SetLoadingType( type );
pLoadingProgress->SetProgress( 0.0f );

if ( ISteamTimeline *pTimeline = SteamTimeline() )
{
pTimeline->SetTimelineGameMode( k_ETimelineGameMode_LoadingScreen );
}

m_LevelLoading = true;
}

Expand Down Expand Up @@ -1474,6 +1479,11 @@ void CBaseModPanel::OnLevelLoadingFinished( KeyValues *kvEvent )
pLoadingProgress->Close();
}

if ( ISteamTimeline *pTimeline = SteamTimeline() )
{
pTimeline->SetTimelineGameMode( bError ? k_ETimelineGameMode_Menus : k_ETimelineGameMode_Staging );
}

m_LevelLoading = false;

CBaseModFrame *pFrame = CBaseModPanel::GetSingleton().GetWindow( WT_GENERICCONFIRMATION );
Expand Down
10 changes: 10 additions & 0 deletions src/game/shared/swarm/asw_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,11 @@ CAlienSwarm::~CAlienSwarm()

GameTimescale()->SetDesiredTimescale( 1.0f );
engine->SetPitchScale( 1.0f );

if ( ISteamTimeline *pTimeline = SteamTimeline() )
{
pTimeline->SetTimelineGameMode( k_ETimelineGameMode_Menus );
}
}

float CAlienSwarm::GetMarineDeathCamInterp( bool bIgnoreCvar )
Expand Down Expand Up @@ -1588,6 +1593,11 @@ void CAlienSwarm::OnDataChanged( DataUpdateType_t updateType )
g_ReactiveDropWorkshop.OnMissionStart();
}

if ( ISteamTimeline *pTimeline = SteamTimeline() )
{
pTimeline->SetTimelineGameMode( GetGameState() == ASW_GS_INGAME ? k_ETimelineGameMode_Playing : k_ETimelineGameMode_Staging );
}

g_ReactiveDropWorkshop.CheckForRequiredAddons();

g_RD_Rich_Presence.UpdatePresence();
Expand Down

0 comments on commit 4fe7250

Please sign in to comment.