mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Unify string conversion and __FUNCTION__ uses in hoststate
This commit is contained in:
parent
604e4a6705
commit
841ae89261
@ -92,7 +92,6 @@ FORCEINLINE void CHostState::FrameUpdate(CHostState* pHostState, double flCurren
|
||||
{
|
||||
case HostStates_t::HS_NEW_GAME:
|
||||
{
|
||||
DevMsg(eDLL_T::ENGINE, "%s - Loading level: '%s'\n", "CHostState::FrameUpdate", g_pHostState->m_levelName);
|
||||
g_pHostState->State_NewGame();
|
||||
break;
|
||||
}
|
||||
@ -138,13 +137,13 @@ FORCEINLINE void CHostState::FrameUpdate(CHostState* pHostState, double flCurren
|
||||
}
|
||||
case HostStates_t::HS_GAME_SHUTDOWN:
|
||||
{
|
||||
DevMsg(eDLL_T::ENGINE, "%s - Shutdown host game\n", "CHostState::FrameUpdate");
|
||||
DevMsg(eDLL_T::ENGINE, __FUNCTION__": Shutdown host game\n");
|
||||
CHostState_State_GameShutDown(g_pHostState);
|
||||
break;
|
||||
}
|
||||
case HostStates_t::HS_RESTART:
|
||||
{
|
||||
DevMsg(eDLL_T::ENGINE, "%s - Restarting state machine\n", "CHostState::FrameUpdate");
|
||||
DevMsg(eDLL_T::ENGINE, __FUNCTION__": Restarting state machine\n");
|
||||
#ifndef DEDICATED
|
||||
CL_EndMovie();
|
||||
#endif // !DEDICATED
|
||||
@ -356,6 +355,8 @@ FORCEINLINE void CHostState::GameShutDown(void)
|
||||
//-----------------------------------------------------------------------------
|
||||
FORCEINLINE void CHostState::State_NewGame(void)
|
||||
{
|
||||
DevMsg(eDLL_T::ENGINE, __FUNCTION__": Loading level: '%s'\n", g_pHostState->m_levelName);
|
||||
|
||||
LARGE_INTEGER time{};
|
||||
uint16_t nSplitScreenPlayers = m_nSplitScreenPlayers;
|
||||
m_nSplitScreenPlayers = 0;
|
||||
@ -370,7 +371,7 @@ FORCEINLINE void CHostState::State_NewGame(void)
|
||||
if (!CModelLoader__Map_IsValid(g_pModelLoader, m_levelName) // Check if map is valid and if we can start a new game.
|
||||
|| !Host_NewGame(m_levelName, nullptr, m_bBackgroundLevel, nSplitScreenPlayers, time) || !g_pServerGameClients)
|
||||
{
|
||||
Error(eDLL_T::ENGINE, NO_ERROR, "%s - Error: Map not valid\n", "CHostState::State_NewGame");
|
||||
Error(eDLL_T::ENGINE, NO_ERROR, __FUNCTION__": Error: Level not valid\n");
|
||||
#ifndef DEDICATED
|
||||
SCR_EndLoadingPlaque();
|
||||
#endif // !DEDICATED
|
||||
@ -392,7 +393,7 @@ FORCEINLINE void CHostState::State_NewGame(void)
|
||||
//-----------------------------------------------------------------------------
|
||||
FORCEINLINE void CHostState::State_ChangeLevelSP(void)
|
||||
{
|
||||
DevMsg(eDLL_T::ENGINE, "%s - Changing singleplayer level to: '%s'\n", "CHostState::State_ChangeLevelSP", m_levelName);
|
||||
DevMsg(eDLL_T::ENGINE, __FUNCTION__": Changing singleplayer level to: '%s'\n", m_levelName);
|
||||
m_flShortFrameTime = 1.5; // Set frame time.
|
||||
|
||||
if (CModelLoader__Map_IsValid(g_pModelLoader, m_levelName)) // Check if map is valid and if we can start a new game.
|
||||
@ -401,7 +402,7 @@ FORCEINLINE void CHostState::State_ChangeLevelSP(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
Error(eDLL_T::ENGINE, NO_ERROR, "%s - Error: Unable to find map: '%s'\n", "CHostState::State_ChangeLevelSP", m_levelName);
|
||||
Error(eDLL_T::ENGINE, NO_ERROR, __FUNCTION__": Error: Unable to find level: '%s'\n", m_levelName);
|
||||
}
|
||||
|
||||
m_iCurrentState = HostStates_t::HS_RUN; // Set current state to run.
|
||||
@ -418,7 +419,7 @@ FORCEINLINE void CHostState::State_ChangeLevelSP(void)
|
||||
//-----------------------------------------------------------------------------
|
||||
FORCEINLINE void CHostState::State_ChangeLevelMP(void)
|
||||
{
|
||||
DevMsg(eDLL_T::ENGINE, "%s - Changing multiplayer level to: '%s'\n", "CHostState::State_ChangeLevelMP", m_levelName);
|
||||
DevMsg(eDLL_T::ENGINE, __FUNCTION__": Changing multiplayer level to: '%s'\n", m_levelName);
|
||||
m_flShortFrameTime = 0.5; // Set frame time.
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
@ -433,7 +434,7 @@ FORCEINLINE void CHostState::State_ChangeLevelMP(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
Error(eDLL_T::ENGINE, NO_ERROR, "%s - Error: Unable to find map: '%s'\n", "CHostState::State_ChangeLevelMP", m_levelName);
|
||||
Error(eDLL_T::ENGINE, NO_ERROR, __FUNCTION__": Error: Unable to find level: '%s'\n", m_levelName);
|
||||
}
|
||||
|
||||
m_iCurrentState = HostStates_t::HS_RUN; // Set current state to run.
|
||||
|
Loading…
x
Reference in New Issue
Block a user