mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Slight cleanup
This commit is contained in:
parent
9953caab7d
commit
73cdaf18e3
@ -16,8 +16,7 @@
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Gets the number of human players on the server
|
||||
// Output : int64_t
|
||||
// !TODO : Rebuild properly..
|
||||
// Output : int
|
||||
//---------------------------------------------------------------------------------
|
||||
int CBaseServer::GetNumHumanPlayers(void) const
|
||||
{
|
||||
@ -28,7 +27,7 @@ int CBaseServer::GetNumHumanPlayers(void) const
|
||||
if (!client)
|
||||
continue;
|
||||
|
||||
if (client->IsConnected())
|
||||
if (client->IsHumanPlayer())
|
||||
nHumans++;
|
||||
}
|
||||
|
||||
@ -37,8 +36,7 @@ int CBaseServer::GetNumHumanPlayers(void) const
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Gets the number of fake clients on the server
|
||||
// Output : int64_t
|
||||
// !TODO : Rebuild properly..
|
||||
// Output : int
|
||||
//---------------------------------------------------------------------------------
|
||||
int CBaseServer::GetNumFakeClients(void) const
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include "engine/baseclient.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -21,7 +20,7 @@ class HBaseServer : public IDetour
|
||||
{
|
||||
//std::cout << "| VAR: g_dwMaxClients : 0x" << std::hex << std::uppercase << g_dwMaxClients << std::setw(0) << " |" << std::endl;
|
||||
//std::cout << "| VAR: g_dwMaxFakeClients : 0x" << std::hex << std::uppercase << g_dwMaxFakeClients << std::setw(0) << " |" << std::endl;
|
||||
std::cout << "+----------------------------------------------------------------+" << std::endl;
|
||||
//std::cout << "+----------------------------------------------------------------+" << std::endl;
|
||||
}
|
||||
};
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -155,8 +155,8 @@ FORCEINLINE void CHostState::Setup(void) const
|
||||
g_pRConClient->Init();
|
||||
#endif // DEDICATED
|
||||
|
||||
std::thread t1(&CHostState::Think, this);
|
||||
t1.detach();
|
||||
std::thread think(&CHostState::Think, this);
|
||||
think.detach();
|
||||
|
||||
*reinterpret_cast<bool*>(m_bRestrictServerCommands) = true; // Restrict commands.
|
||||
ConCommandBase* disconnect = g_pCVar->FindCommandBase("disconnect");
|
||||
@ -231,8 +231,10 @@ FORCEINLINE void CHostState::LoadConfig(void) const
|
||||
{
|
||||
if (!g_pCmdLine->CheckParm("-devsdk"))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec \"autoexec_server.cfg\"", cmd_source_t::kCommandSrcCode);
|
||||
Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec \"rcon_server.cfg\"", cmd_source_t::kCommandSrcCode);
|
||||
#endif //!CLIENT_DLL
|
||||
#ifndef DEDICATED
|
||||
Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec \"autoexec_client.cfg\"", cmd_source_t::kCommandSrcCode);
|
||||
Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec \"rcon_client.cfg\"", cmd_source_t::kCommandSrcCode);
|
||||
@ -241,8 +243,10 @@ FORCEINLINE void CHostState::LoadConfig(void) const
|
||||
}
|
||||
else // Development configs.
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec \"autoexec_server_dev.cfg\"", cmd_source_t::kCommandSrcCode);
|
||||
Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec \"rcon_server_dev.cfg\"", cmd_source_t::kCommandSrcCode);
|
||||
#endif //!CLIENT_DLL
|
||||
#ifndef DEDICATED
|
||||
Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec \"autoexec_client_dev.cfg\"", cmd_source_t::kCommandSrcCode);
|
||||
Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec \"rcon_client_dev.cfg\"", cmd_source_t::kCommandSrcCode);
|
||||
|
@ -6,7 +6,8 @@
|
||||
//
|
||||
// Create functions here under the target VM namespace. If the function has to
|
||||
// be registered for 2 or more VM's, put them under the 'SHARED' namespace.
|
||||
// Ifdef them out for 'DEDICATED' if the target VM's do not include 'SERVER'.
|
||||
// Ifdef them out for 'DEDICATED' / 'CLIENT_DLL' if the target VM's do not
|
||||
// include 'SERVER' / 'CLIENT'.
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
@ -29,9 +30,11 @@ namespace VSquirrel
|
||||
return SQ_OK;
|
||||
}
|
||||
}
|
||||
#ifndef CLIENT_DLL
|
||||
namespace SERVER
|
||||
{
|
||||
}
|
||||
#endif // !CLIENT_DLL
|
||||
#ifndef DEDICATED
|
||||
namespace CLIENT
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user