mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Only run threaded bone setup when we don't run the listen server
The Season 3 versions of the executable deadlock when threaded bone setup has been enabled on the client while the listen server has ran at least once during the process lifetime.
This commit is contained in:
parent
95a544cdb9
commit
0c13ca4e3f
@ -22,6 +22,30 @@ bool CClientState::IsPaused() const
|
||||
return m_bPaused;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Purpose: returns true if client is fully connected and active
|
||||
//------------------------------------------------------------------------------
|
||||
bool CClientState::IsActive(void) const
|
||||
{
|
||||
return m_nSignonState == SIGNONSTATE::SIGNONSTATE_FULL;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Purpose: returns true if client connected but not active
|
||||
//------------------------------------------------------------------------------
|
||||
bool CClientState::IsConnected(void) const
|
||||
{
|
||||
return m_nSignonState >= SIGNONSTATE::SIGNONSTATE_CONNECTED;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Purpose: returns true if client is still connecting
|
||||
//------------------------------------------------------------------------------
|
||||
bool CClientState::IsConnecting(void) const
|
||||
{
|
||||
return m_nSignonState >= SIGNONSTATE::SIGNONSTATE_NONE;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Purpose: gets the client time
|
||||
// Technically doesn't belong here
|
||||
|
@ -25,6 +25,10 @@ class CClientState : CS_INetChannelHandler, IConnectionlessPacketHandler, IServe
|
||||
{
|
||||
public:
|
||||
bool IsPaused() const;
|
||||
bool IsActive(void) const;
|
||||
bool IsConnected(void) const;
|
||||
bool IsConnecting(void) const;
|
||||
|
||||
float GetClientTime() const;
|
||||
|
||||
int GetTick() const;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#else //
|
||||
#include "engine/client/cl_rcon.h"
|
||||
#include "engine/client/cl_main.h"
|
||||
#include "engine/client/clientstate.h"
|
||||
#endif // DEDICATED
|
||||
#include "engine/net.h"
|
||||
#include "engine/gl_screen.h"
|
||||
@ -120,6 +121,18 @@ FORCEINLINE void CHostState::FrameUpdate(CHostState* pHostState, double flCurren
|
||||
bResetIdleName = true;
|
||||
}
|
||||
|
||||
#if !defined (DEDICATED) && !defined (CLIENT_DLL)
|
||||
// Parallel processing of 'C_BaseAnimating::SetupBones()' is not supported
|
||||
// on listen servers running the local client.
|
||||
if (g_pServer->IsActive())
|
||||
{
|
||||
if (cl_threaded_bone_setup->GetBool())
|
||||
{
|
||||
cl_threaded_bone_setup->SetValue(false);
|
||||
}
|
||||
}
|
||||
#endif // !DEDICATED && !CLIENT_DLL
|
||||
|
||||
CHostState_State_Run(&g_pHostState->m_iCurrentState, flCurrentTime, flFrameTime);
|
||||
break;
|
||||
}
|
||||
@ -445,12 +458,12 @@ FORCEINLINE void CHostState::ResetLevelName(void)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void CHostState_Attach()
|
||||
{
|
||||
DetourAttach((LPVOID*)&CHostState_FrameUpdate, &CHostState::FrameUpdate);
|
||||
DetourAttach(&CHostState_FrameUpdate, &CHostState::FrameUpdate);
|
||||
}
|
||||
|
||||
void CHostState_Detach()
|
||||
{
|
||||
DetourDetach((LPVOID*)&CHostState_FrameUpdate, &CHostState::FrameUpdate);
|
||||
DetourDetach(&CHostState_FrameUpdate, &CHostState::FrameUpdate);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -65,7 +65,6 @@ private:
|
||||
bool m_bUpdateFrame; // perform snapshot update
|
||||
bool m_bUseReputation; // use of player reputation on the server
|
||||
bool m_bSimulating; // are we simulating or not
|
||||
int m_nPad; // padding
|
||||
bf_write m_Signon; // signon bitbuf
|
||||
CUtlMemory<byte> m_SignonBuffer; // signon memory
|
||||
int m_nServerClasses; // number of unique server classes
|
||||
|
@ -5,7 +5,6 @@
|
||||
//// CLIENT ////
|
||||
//////////////////////////
|
||||
cl_noTimeoutLocalHost "0" // Do not time-out on local connections.
|
||||
cl_threaded_bone_setup "0" // Has to be disabled on the client to prevent deadlock.
|
||||
|
||||
//////////////////////////
|
||||
//// DEBUG TEXT ////
|
||||
|
@ -5,7 +5,6 @@
|
||||
//// CLIENT ////
|
||||
//////////////////////////
|
||||
cl_noTimeoutLocalHost "1" // Do not time-out on local connections.
|
||||
cl_threaded_bone_setup "0" // Has to be disabled on the client to prevent deadlock.
|
||||
cl_quota_stringCmdsPerSecond "256" // Max string commands submissions on the client.
|
||||
|
||||
//////////////////////////
|
||||
@ -37,13 +36,13 @@ cl_showsimstats "1" // Shows detailed simula
|
||||
cl_simstats_invert_x "1" // Inverts the X offset for simulation debug overlay.
|
||||
cl_simstats_invert_y "1" // Inverts the Y offset for simulation debug overlay.
|
||||
cl_simstats_offset_x "650" // Simulation stats 'X' offset.
|
||||
cl_simstats_offset_y "120" // Simulation stats 'Y' offset.
|
||||
cl_simstats_offset_y "130" // Simulation stats 'Y' offset.
|
||||
|
||||
cl_showgpustats "1" // Shows detailed GPU memory stats.
|
||||
cl_gpustats_invert_x "1" // Inverts the X offset for texture streaming debug overlay.
|
||||
cl_gpustats_invert_y "1" // Inverts the Y offset for texture streaming debug overlay.
|
||||
cl_gpustats_offset_x "650" // GPU stats 'X' offset.
|
||||
cl_gpustats_offset_y "105" // GPU stats 'Y' offset.
|
||||
cl_gpustats_offset_y "115" // GPU stats 'Y' offset.
|
||||
|
||||
phys_showObjectCount "1" // Shows physics object count.
|
||||
rui_defaultDebugFontFace "ArameMono" // Sets the RUI debug font face.
|
||||
|
Loading…
x
Reference in New Issue
Block a user