mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Engine: properly detect if we are in single player mode
This check is meant to drop the restrictions if we are in single player mode, we should however properly check in this by checking the actual game mode rather than if the listen server is running.
This commit is contained in:
parent
3d8d0b37a6
commit
9939d963ef
@ -25,6 +25,8 @@
|
||||
#include <ebisusdk/EbisuSDK.h>
|
||||
#include <engine/cmd.h>
|
||||
|
||||
extern CGlobalVarsBase* gpGlobals;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Purpose: console command callbacks
|
||||
//------------------------------------------------------------------------------
|
||||
@ -234,7 +236,8 @@ bool CClientState::_ProcessStringCmd(CClientState* thisptr, NET_StringCmd* msg)
|
||||
|
||||
if (thisptr_ADJ->m_bRestrictServerCommands
|
||||
#ifndef CLIENT_DLL
|
||||
&& !g_pServer->IsActive()
|
||||
// Don't restrict commands from the server in single player
|
||||
&& gpGlobals->gameMode != GameMode_t::SP_MODE
|
||||
#endif // !CLIENT_DLL
|
||||
)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user