aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorthstar <northstar@northstar.tf>2023-12-20 15:20:02 +0100
committerNorthstar <northstar@northstar.tf>2023-12-20 15:20:02 +0100
commit1e5c4a7f6a734352f802c82b293fe3b215e3a5b2 (patch)
treeb1a5484f3839e1b0c2a9169856a51c16cf255180
parent714282b52039b12225c8348ef7346d092676ffb1 (diff)
downloadNorthstarLauncher-1e5c4a7f6a734352f802c82b293fe3b215e3a5b2.tar.gz
NorthstarLauncher-1e5c4a7f6a734352f802c82b293fe3b215e3a5b2.zip
Format project
-rw-r--r--NorthstarDLL/client/audio.h6
-rw-r--r--NorthstarDLL/client/localchatwriter.cpp12
-rw-r--r--NorthstarDLL/client/localchatwriter.h6
-rw-r--r--NorthstarDLL/core/convar/concommand.h10
-rw-r--r--NorthstarDLL/core/convar/convar.h2
-rw-r--r--NorthstarDLL/core/convar/cvar.h4
-rw-r--r--NorthstarDLL/core/filesystem/filesystem.h4
-rw-r--r--NorthstarDLL/core/filesystem/rpakfilesystem.h4
-rw-r--r--NorthstarDLL/core/hooks.h16
-rw-r--r--NorthstarDLL/core/math/bitbuf.h20
-rw-r--r--NorthstarDLL/core/math/color.h4
-rw-r--r--NorthstarDLL/core/memalloc.h2
-rw-r--r--NorthstarDLL/core/memory.h10
-rw-r--r--NorthstarDLL/core/sourceinterface.h4
-rw-r--r--NorthstarDLL/core/tier0.h4
-rw-r--r--NorthstarDLL/core/vanilla.h4
-rw-r--r--NorthstarDLL/dedicated/dedicatedlogtoclient.h2
-rw-r--r--NorthstarDLL/engine/hoststate.h2
-rw-r--r--NorthstarDLL/engine/r2engine.h2
-rw-r--r--NorthstarDLL/logging/crashhandler.h4
-rw-r--r--NorthstarDLL/logging/logging.h10
-rw-r--r--NorthstarDLL/logging/loghooks.cpp2
-rw-r--r--NorthstarDLL/logging/sourceconsole.h12
-rw-r--r--NorthstarDLL/masterserver/masterserver.h20
-rw-r--r--NorthstarDLL/mods/autodownload/moddownloader.h4
-rw-r--r--NorthstarDLL/mods/modmanager.h26
-rw-r--r--NorthstarDLL/mods/modsavefiles.h4
-rw-r--r--NorthstarDLL/plugins/pluginbackend.h6
-rw-r--r--NorthstarDLL/plugins/plugins.h10
-rw-r--r--NorthstarDLL/scripts/scripthttprequesthandler.h4
-rw-r--r--NorthstarDLL/server/auth/bansystem.h4
-rw-r--r--NorthstarDLL/server/auth/serverauthentication.h4
-rw-r--r--NorthstarDLL/server/serverpresence.h8
-rw-r--r--NorthstarDLL/shared/exploit_fixes/ns_limits.h4
-rw-r--r--NorthstarDLL/shared/keyvalues.cpp2
-rw-r--r--NorthstarDLL/shared/keyvalues.h6
-rw-r--r--NorthstarDLL/squirrel/squirrel.h8
-rw-r--r--NorthstarDLL/squirrel/squirrelautobind.h4
-rw-r--r--NorthstarDLL/squirrel/squirrelclasstypes.h8
39 files changed, 134 insertions, 134 deletions
diff --git a/NorthstarDLL/client/audio.h b/NorthstarDLL/client/audio.h
index 26cda205..15fd1a35 100644
--- a/NorthstarDLL/client/audio.h
+++ b/NorthstarDLL/client/audio.h
@@ -14,11 +14,11 @@ enum class AudioSelectionStrategy
class EventOverrideData
{
- public:
+public:
EventOverrideData(const std::string&, const fs::path&);
EventOverrideData();
- public:
+public:
bool LoadedSuccessfully = false;
std::vector<std::string> EventIds = {};
@@ -34,7 +34,7 @@ class EventOverrideData
class CustomAudioManager
{
- public:
+public:
bool TryLoadAudioOverride(const fs::path&);
void ClearAudioOverrides();
diff --git a/NorthstarDLL/client/localchatwriter.cpp b/NorthstarDLL/client/localchatwriter.cpp
index 848d898f..35cc065f 100644
--- a/NorthstarDLL/client/localchatwriter.cpp
+++ b/NorthstarDLL/client/localchatwriter.cpp
@@ -4,13 +4,13 @@ class vgui_BaseRichText_vtable;
class vgui_BaseRichText
{
- public:
+public:
vgui_BaseRichText_vtable* vtable;
};
class vgui_BaseRichText_vtable
{
- public:
+public:
char unknown1[1880];
void(__fastcall* InsertChar)(vgui_BaseRichText* self, wchar_t ch);
@@ -49,7 +49,7 @@ class vgui_BaseRichText_vtable
class CGameSettings
{
- public:
+public:
char unknown1[92];
int isChatEnabled;
};
@@ -58,7 +58,7 @@ class CGameSettings
// have their value at the same offset
class CGameFloatVar
{
- public:
+public:
char unknown1[88];
float value;
};
@@ -101,7 +101,7 @@ Color lightColors[8] = {
class AnsiEscapeParser
{
- public:
+public:
explicit AnsiEscapeParser(LocalChatWriter* writer) : m_writer(writer) {}
void HandleVal(unsigned long val)
@@ -129,7 +129,7 @@ class AnsiEscapeParser
}
}
- private:
+private:
enum class Next
{
ControlType,
diff --git a/NorthstarDLL/client/localchatwriter.h b/NorthstarDLL/client/localchatwriter.h
index de9e2f9b..acf6f87e 100644
--- a/NorthstarDLL/client/localchatwriter.h
+++ b/NorthstarDLL/client/localchatwriter.h
@@ -5,7 +5,7 @@ class vgui_BaseRichText;
class CHudChat
{
- public:
+public:
static CHudChat** allHuds;
char unknown1[720];
@@ -29,7 +29,7 @@ class CHudChat
class LocalChatWriter
{
- public:
+public:
enum Context
{
NetworkContext = 0,
@@ -56,7 +56,7 @@ class LocalChatWriter
void InsertColorChange(Color color);
void InsertSwatchColorChange(SwatchColor color);
- private:
+private:
Context m_context;
const char* ApplyAnsiEscape(const char* escape);
diff --git a/NorthstarDLL/core/convar/concommand.h b/NorthstarDLL/core/convar/concommand.h
index c11c7ea4..71a82fec 100644
--- a/NorthstarDLL/core/convar/concommand.h
+++ b/NorthstarDLL/core/convar/concommand.h
@@ -4,7 +4,7 @@
class ConCommandBase;
class IConCommandBaseAccessor
{
- public:
+public:
// Flags is a combination of FCVAR flags in cvar.h.
// hOut is filled in with a handle to the variable.
virtual bool RegisterConCommandBase(ConCommandBase* pVar) = 0;
@@ -12,7 +12,7 @@ class IConCommandBaseAccessor
class CCommand
{
- public:
+public:
CCommand() = delete;
int64_t ArgC() const;
@@ -24,7 +24,7 @@ class CCommand
static int MaxCommandLength();
- private:
+private:
enum
{
COMMAND_MAX_ARGC = 64,
@@ -88,7 +88,7 @@ typedef int (*FnCommandCompletionCallback)(const char* partial, char commands[CO
// From r5reloaded
class ConCommandBase
{
- public:
+public:
bool HasFlags(int nFlags);
void AddFlags(int nFlags);
void RemoveFlags(int nFlags);
@@ -120,7 +120,7 @@ class ConCommand : public ConCommandBase
{
friend class CCVar;
- public:
+public:
ConCommand(void) {}; // !TODO: Rebuild engine constructor in SDK instead.
ConCommand(const char* szName, const char* szHelpString, int nFlags, void* pCallback, void* pCommandCompletionCallback);
void Init(void);
diff --git a/NorthstarDLL/core/convar/convar.h b/NorthstarDLL/core/convar/convar.h
index 4b00e25f..f0366b46 100644
--- a/NorthstarDLL/core/convar/convar.h
+++ b/NorthstarDLL/core/convar/convar.h
@@ -124,7 +124,7 @@ typedef void (*FnChangeCallback_t)(ConVar* var, const char* pOldValue, float flO
//-----------------------------------------------------------------------------
class ConVar
{
- public:
+public:
ConVar(void) {};
ConVar(const char* pszName, const char* pszDefaultValue, int nFlags, const char* pszHelpString);
ConVar(
diff --git a/NorthstarDLL/core/convar/cvar.h b/NorthstarDLL/core/convar/cvar.h
index 09fa8591..beaa84f4 100644
--- a/NorthstarDLL/core/convar/cvar.h
+++ b/NorthstarDLL/core/convar/cvar.h
@@ -13,7 +13,7 @@ class ConVar;
//-----------------------------------------------------------------------------
class CCVarIteratorInternal // Fully reversed table, just look at the virtual function table and rename the function.
{
- public:
+public:
virtual void SetFirst(void) = 0; // 0
virtual void Next(void) = 0; // 1
virtual bool IsValid(void) = 0; // 2
@@ -25,7 +25,7 @@ class CCVarIteratorInternal // Fully reversed table, just look at the virtual fu
//-----------------------------------------------------------------------------
class CCvar
{
- public:
+public:
M_VMETHOD(ConCommandBase*, FindCommandBase, 14, (const char* pszCommandName), (this, pszCommandName));
M_VMETHOD(ConVar*, FindVar, 16, (const char* pszVarName), (this, pszVarName));
M_VMETHOD(ConCommand*, FindCommand, 18, (const char* pszCommandName), (this, pszCommandName));
diff --git a/NorthstarDLL/core/filesystem/filesystem.h b/NorthstarDLL/core/filesystem/filesystem.h
index 9c4e891b..fcd1bb2f 100644
--- a/NorthstarDLL/core/filesystem/filesystem.h
+++ b/NorthstarDLL/core/filesystem/filesystem.h
@@ -29,14 +29,14 @@ enum SearchPathAdd_t
class CSearchPath
{
- public:
+public:
unsigned char unknown[0x18];
const char* debugPath;
};
class IFileSystem
{
- public:
+public:
struct VTable
{
void* unknown[10];
diff --git a/NorthstarDLL/core/filesystem/rpakfilesystem.h b/NorthstarDLL/core/filesystem/rpakfilesystem.h
index 3f608dba..bcd57a73 100644
--- a/NorthstarDLL/core/filesystem/rpakfilesystem.h
+++ b/NorthstarDLL/core/filesystem/rpakfilesystem.h
@@ -17,11 +17,11 @@ struct LoadedPak
class PakLoadManager
{
- private:
+private:
std::map<int, LoadedPak> m_vLoadedPaks {};
std::unordered_map<size_t, int> m_HashToPakHandle {};
- public:
+public:
int LoadPakAsync(const char* pPath, const ePakLoadSource nLoadSource);
void UnloadPak(const int nPakHandle);
void UnloadMapPaks();
diff --git a/NorthstarDLL/core/hooks.h b/NorthstarDLL/core/hooks.h
index 01244b3d..15edbf0b 100644
--- a/NorthstarDLL/core/hooks.h
+++ b/NorthstarDLL/core/hooks.h
@@ -25,7 +25,7 @@ enum class eDllLoadCallbackSide
class __dllLoadCallback
{
- public:
+public:
__dllLoadCallback() = delete;
__dllLoadCallback(
eDllLoadCallbackSide side,
@@ -67,7 +67,7 @@ class __autovar;
class __fileAutohook
{
- public:
+public:
std::vector<__autohook*> hooks;
std::vector<__autovar*> vars;
@@ -91,7 +91,7 @@ uintptr_t ParseDLLOffsetString(const char* pAddrString);
class __autohook
{
- public:
+public:
enum AddressResolutionMode
{
OFFSET_STRING, // we're using a string that of the format dllname.dll + offset
@@ -111,7 +111,7 @@ class __autohook
char* pModuleName; // for PROCADDRESS
char* pProcName; // for PROCADDRESS
- public:
+public:
__autohook() = delete;
__autohook(__fileAutohook* autohook, const char* funcName, LPVOID absoluteAddress, LPVOID* orig, LPVOID func)
@@ -250,13 +250,13 @@ class __autohook
class ManualHook
{
- public:
+public:
char* pFuncName;
LPVOID pHookFunc;
LPVOID* ppOrigFunc;
- public:
+public:
ManualHook() = delete;
ManualHook(const char* funcName, LPVOID func);
ManualHook(const char* funcName, LPVOID* orig, LPVOID func);
@@ -284,11 +284,11 @@ void MakeHook(LPVOID pTarget, LPVOID pDetour, void* ppOriginal, const char* pFun
class __autovar
{
- public:
+public:
char* m_pAddrString;
void** m_pTarget;
- public:
+public:
__autovar(__fileAutohook* pAutohook, const char* pAddrString, void** pTarget)
{
m_pTarget = pTarget;
diff --git a/NorthstarDLL/core/math/bitbuf.h b/NorthstarDLL/core/math/bitbuf.h
index 8e8e216f..5ca75455 100644
--- a/NorthstarDLL/core/math/bitbuf.h
+++ b/NorthstarDLL/core/math/bitbuf.h
@@ -89,13 +89,13 @@ enum EBitCoordType
class BitBufferBase
{
- protected:
+protected:
INLINE void SetName(const char* name)
{
m_BufferName = name;
}
- public:
+public:
INLINE bool IsOverflowed()
{
return m_Overflow;
@@ -110,16 +110,16 @@ class BitBufferBase
return m_BufferName;
}
- private:
+private:
const char* m_BufferName = "";
- protected:
+protected:
u8 m_Overflow = false;
};
class BFRead : public BitBufferBase
{
- public:
+public:
BFRead() = default;
INLINE BFRead(uptr data, size_t byteLength, size_t startPos = 0, const char* bufferName = 0)
@@ -130,7 +130,7 @@ class BFRead : public BitBufferBase
SetName(bufferName);
}
- public:
+public:
INLINE void StartReading(uptr data, size_t byteLength, size_t startPos = 0)
{
m_Data = reinterpret_cast<u32 const*>(data);
@@ -706,7 +706,7 @@ class BFRead : public BitBufferBase
return GetNumBitsLeft() >> 3;
}
- private:
+private:
size_t m_DataBits; // 0x0010
size_t m_DataBytes; // 0x0018
@@ -720,7 +720,7 @@ class BFRead : public BitBufferBase
class BFWrite : public BitBufferBase
{
- public:
+public:
BFWrite() = default;
INLINE BFWrite(uptr data, size_t byteLength, const char* bufferName = 0)
@@ -731,7 +731,7 @@ class BFWrite : public BitBufferBase
SetName(bufferName);
}
- public:
+public:
INLINE void StartWriting(uptr data, size_t byteLength)
{
m_Data = reinterpret_cast<u32*>(data);
@@ -1131,7 +1131,7 @@ class BFWrite : public BitBufferBase
WriteBitVec3Coord(tmp);
}*/
- private:
+private:
size_t m_DataBits = 0;
size_t m_DataBytes = 0;
diff --git a/NorthstarDLL/core/math/color.h b/NorthstarDLL/core/math/color.h
index 76cf8a47..013c4e4c 100644
--- a/NorthstarDLL/core/math/color.h
+++ b/NorthstarDLL/core/math/color.h
@@ -57,7 +57,7 @@ struct SourceColor
//-----------------------------------------------------------------------------
class Color
{
- public:
+public:
Color(int r, int g, int b, int a = 255)
{
_color[0] = (unsigned char)r;
@@ -169,7 +169,7 @@ class Color
return SourceColor(_color[0], _color[1], _color[2], _color[3]);
}
- private:
+private:
unsigned char _color[4];
};
diff --git a/NorthstarDLL/core/memalloc.h b/NorthstarDLL/core/memalloc.h
index 97f60012..2f383335 100644
--- a/NorthstarDLL/core/memalloc.h
+++ b/NorthstarDLL/core/memalloc.h
@@ -17,7 +17,7 @@ void operator delete(void* p) noexcept;
class SourceAllocator
{
- public:
+public:
static const bool kNeedFree = true;
void* Malloc(size_t size)
{
diff --git a/NorthstarDLL/core/memory.h b/NorthstarDLL/core/memory.h
index db0a38b3..a978963e 100644
--- a/NorthstarDLL/core/memory.h
+++ b/NorthstarDLL/core/memory.h
@@ -2,10 +2,10 @@
class CMemoryAddress
{
- public:
+public:
uintptr_t m_nAddress;
- public:
+public:
CMemoryAddress();
CMemoryAddress(const uintptr_t nAddress);
CMemoryAddress(const void* pAddress);
@@ -47,7 +47,7 @@ class CMemoryAddress
// based on https://github.com/Mauler125/r5sdk/blob/master/r5dev/public/include/module.h
class CModule : public CMemoryAddress
{
- public:
+public:
struct ModuleSections_t
{
ModuleSections_t(void) = default;
@@ -71,7 +71,7 @@ class CModule : public CMemoryAddress
ModuleSections_t m_RunTimeData;
ModuleSections_t m_ReadOnlyData;
- private:
+private:
std::string m_svModuleName;
uintptr_t m_pModuleBase {};
DWORD m_nModuleSize {};
@@ -79,7 +79,7 @@ class CModule : public CMemoryAddress
IMAGE_DOS_HEADER* m_pDOSHeader = nullptr;
std::vector<ModuleSections_t> m_vModuleSections;
- public:
+public:
CModule() = delete; // no default, we need a module name
CModule(const HMODULE pModule);
CModule(const char* pModuleName);
diff --git a/NorthstarDLL/core/sourceinterface.h b/NorthstarDLL/core/sourceinterface.h
index 474e961b..7b5e81f3 100644
--- a/NorthstarDLL/core/sourceinterface.h
+++ b/NorthstarDLL/core/sourceinterface.h
@@ -6,10 +6,10 @@ typedef void* (*CreateInterfaceFn)(const char* pName, int* pReturnCode);
template <typename T> class SourceInterface
{
- private:
+private:
T* m_interface;
- public:
+public:
SourceInterface(const std::string& moduleName, const std::string& interfaceName)
{
HMODULE handle = GetModuleHandleA(moduleName.c_str());
diff --git a/NorthstarDLL/core/tier0.h b/NorthstarDLL/core/tier0.h
index 047610b2..cc9af39e 100644
--- a/NorthstarDLL/core/tier0.h
+++ b/NorthstarDLL/core/tier0.h
@@ -2,7 +2,7 @@
class IMemAlloc
{
- public:
+public:
struct VTable
{
void* unknown[1]; // alloc debug
@@ -25,7 +25,7 @@ class IMemAlloc
class CCommandLine
{
- public:
+public:
// based on the defs in the 2013 source sdk, but for some reason has an extra function (may be another CreateCmdLine overload?)
// these seem to line up with what they should be though
virtual void CreateCmdLine(const char* commandline) = 0;
diff --git a/NorthstarDLL/core/vanilla.h b/NorthstarDLL/core/vanilla.h
index fb809a1a..b0797803 100644
--- a/NorthstarDLL/core/vanilla.h
+++ b/NorthstarDLL/core/vanilla.h
@@ -6,7 +6,7 @@
/// as well as various other small changes for compatibility
class VanillaCompatibility
{
- public:
+public:
void SetVanillaCompatibility(bool isVanilla)
{
static bool bInitialised = false;
@@ -22,7 +22,7 @@ class VanillaCompatibility
return m_bIsVanillaCompatible;
}
- private:
+private:
bool m_bIsVanillaCompatible = false;
};
diff --git a/NorthstarDLL/dedicated/dedicatedlogtoclient.h b/NorthstarDLL/dedicated/dedicatedlogtoclient.h
index 16f1e584..82f4c56b 100644
--- a/NorthstarDLL/dedicated/dedicatedlogtoclient.h
+++ b/NorthstarDLL/dedicated/dedicatedlogtoclient.h
@@ -4,7 +4,7 @@
class DedicatedServerLogToClientSink : public CustomSink
{
- protected:
+protected:
void custom_sink_it_(const custom_log_msg& msg);
void sink_it_(const spdlog::details::log_msg& msg) override;
void flush_() override;
diff --git a/NorthstarDLL/engine/hoststate.h b/NorthstarDLL/engine/hoststate.h
index 0536e91c..290903ab 100644
--- a/NorthstarDLL/engine/hoststate.h
+++ b/NorthstarDLL/engine/hoststate.h
@@ -14,7 +14,7 @@ enum class HostState_t
struct CHostState
{
- public:
+public:
HostState_t m_iCurrentState;
HostState_t m_iNextState;
diff --git a/NorthstarDLL/engine/r2engine.h b/NorthstarDLL/engine/r2engine.h
index 91676b6b..e3bcc37e 100644
--- a/NorthstarDLL/engine/r2engine.h
+++ b/NorthstarDLL/engine/r2engine.h
@@ -78,7 +78,7 @@ enum class EngineState_t
class CEngine
{
- public:
+public:
virtual void unknown() = 0; // unsure if this is where
virtual bool Load(bool dedicated, const char* baseDir) = 0;
virtual void Unload() = 0;
diff --git a/NorthstarDLL/logging/crashhandler.h b/NorthstarDLL/logging/crashhandler.h
index e18de948..c059a8ca 100644
--- a/NorthstarDLL/logging/crashhandler.h
+++ b/NorthstarDLL/logging/crashhandler.h
@@ -7,7 +7,7 @@
//-----------------------------------------------------------------------------
class CCrashHandler
{
- public:
+public:
CCrashHandler();
~CCrashHandler();
@@ -77,7 +77,7 @@ class CCrashHandler
//-----------------------------------------------------------------------------
void WriteMinidump();
- private:
+private:
PVOID m_hExceptionFilter;
EXCEPTION_POINTERS* m_pExceptionInfos;
diff --git a/NorthstarDLL/logging/logging.h b/NorthstarDLL/logging/logging.h
index af4b506c..5056af27 100644
--- a/NorthstarDLL/logging/logging.h
+++ b/NorthstarDLL/logging/logging.h
@@ -13,7 +13,7 @@ class ColoredLogger;
struct custom_log_msg : spdlog::details::log_msg
{
- public:
+public:
custom_log_msg(ColoredLogger* origin, spdlog::details::log_msg msg) : origin(origin), spdlog::details::log_msg(msg) {}
ColoredLogger* origin;
@@ -21,7 +21,7 @@ struct custom_log_msg : spdlog::details::log_msg
class CustomSink : public spdlog::sinks::base_sink<std::mutex>
{
- public:
+public:
void custom_log(const custom_log_msg& msg);
virtual void custom_sink_it_(const custom_log_msg& msg)
{
@@ -31,7 +31,7 @@ class CustomSink : public spdlog::sinks::base_sink<std::mutex>
class ColoredLogger : public spdlog::logger
{
- public:
+public:
std::string ANSIColor;
SourceColor SRCColor;
@@ -117,7 +117,7 @@ static const char* level_names[] {"trac", "dbug", "info", "warn", "errr", "crit"
// spdlog logger, for cool colour things
class ExternalConsoleSink : public CustomSink
{
- private:
+private:
std::map<spdlog::level::level_enum, std::string> m_LogColours = {
{spdlog::level::trace, NS::Colors::TRACE.ToANSIColor()},
{spdlog::level::debug, NS::Colors::DEBUG.ToANSIColor()},
@@ -129,7 +129,7 @@ class ExternalConsoleSink : public CustomSink
std::string default_color = "\033[39;49m";
- protected:
+protected:
void sink_it_(const spdlog::details::log_msg& msg) override;
void custom_sink_it_(const custom_log_msg& msg);
void flush_() override;
diff --git a/NorthstarDLL/logging/loghooks.cpp b/NorthstarDLL/logging/loghooks.cpp
index 41e1bce2..7efb5b99 100644
--- a/NorthstarDLL/logging/loghooks.cpp
+++ b/NorthstarDLL/logging/loghooks.cpp
@@ -24,7 +24,7 @@ enum class TextMsgPrintType_t
class ICenterPrint
{
- public:
+public:
virtual void ctor() = 0;
virtual void Clear(void) = 0;
virtual void ColorPrint(int r, int g, int b, int a, wchar_t* text) = 0;
diff --git a/NorthstarDLL/logging/sourceconsole.h b/NorthstarDLL/logging/sourceconsole.h
index 3abcc470..44d73843 100644
--- a/NorthstarDLL/logging/sourceconsole.h
+++ b/NorthstarDLL/logging/sourceconsole.h
@@ -5,14 +5,14 @@
class EditablePanel
{
- public:
+public:
virtual ~EditablePanel() = 0;
unsigned char unknown[0x2B0];
};
class IConsoleDisplayFunc
{
- public:
+public:
virtual void ColorPrint(const SourceColor& clr, const char* pMessage) = 0;
virtual void Print(const char* pMessage) = 0;
virtual void DPrint(const char* pMessage) = 0;
@@ -24,7 +24,7 @@ class CConsolePanel : public EditablePanel, public IConsoleDisplayFunc
class CConsoleDialog
{
- public:
+public:
struct VTable
{
void* unknown[298];
@@ -38,7 +38,7 @@ class CConsoleDialog
class CGameConsole
{
- public:
+public:
virtual ~CGameConsole() = 0;
// activates the console, makes it visible and brings it to the foreground
@@ -66,7 +66,7 @@ extern SourceInterface<CGameConsole>* g_pSourceGameConsole;
// spdlog logger
class SourceConsoleSink : public CustomSink
{
- private:
+private:
std::map<spdlog::level::level_enum, SourceColor> m_LogColours = {
{spdlog::level::trace, NS::Colors::TRACE.ToSourceColor()},
{spdlog::level::debug, NS::Colors::DEBUG.ToSourceColor()},
@@ -76,7 +76,7 @@ class SourceConsoleSink : public CustomSink
{spdlog::level::critical, NS::Colors::CRIT.ToSourceColor()},
{spdlog::level::off, NS::Colors::OFF.ToSourceColor()}};
- protected:
+protected:
void custom_sink_it_(const custom_log_msg& msg);
void sink_it_(const spdlog::details::log_msg& msg) override;
void flush_() override;
diff --git a/NorthstarDLL/masterserver/masterserver.h b/NorthstarDLL/masterserver/masterserver.h
index c4fa56c2..570db619 100644
--- a/NorthstarDLL/masterserver/masterserver.h
+++ b/NorthstarDLL/masterserver/masterserver.h
@@ -13,14 +13,14 @@ extern ConVar* Cvar_ns_curl_log_enable;
struct RemoteModInfo
{
- public:
+public:
std::string Name;
std::string Version;
};
class RemoteServerInfo
{
- public:
+public:
char id[33]; // 32 bytes + nullterminator
// server info
@@ -37,7 +37,7 @@ class RemoteServerInfo
// connection stuff
bool requiresPassword;
- public:
+public:
RemoteServerInfo(
const char* newId,
const char* newName,
@@ -52,7 +52,7 @@ class RemoteServerInfo
struct RemoteServerConnectionInfo
{
- public:
+public:
char authToken[32];
in_addr ip;
@@ -61,7 +61,7 @@ struct RemoteServerConnectionInfo
struct MainMenuPromoData
{
- public:
+public:
std::string newInfoTitle1;
std::string newInfoTitle2;
std::string newInfoTitle3;
@@ -82,11 +82,11 @@ struct MainMenuPromoData
class MasterServerManager
{
- private:
+private:
bool m_bRequestingServerList = false;
bool m_bAuthenticatingWithGameServer = false;
- public:
+public:
char m_sOwnServerId[33];
char m_sOwnServerAuthToken[33];
char m_sOwnClientAuthToken[33];
@@ -123,7 +123,7 @@ class MasterServerManager
std::unordered_set<std::string> m_handledServerConnections;
- public:
+public:
MasterServerManager();
void ClearServerList();
@@ -156,7 +156,7 @@ enum class MasterServerReportPresenceResult
class MasterServerPresenceReporter : public ServerPresenceReporter
{
- public:
+public:
/** Full data returned in the std::future of a MasterServerPresenceReporter::ReportPresence() call. */
struct ReportPresenceResultData
{
@@ -180,7 +180,7 @@ class MasterServerPresenceReporter : public ServerPresenceReporter
// Called every frame.
void RunFrame(double flCurrentTime, const ServerPresence* pServerPresence) override;
- protected:
+protected:
// Contains the async logic to add the server to the MS.
void InternalAddServer(const ServerPresence* pServerPresence);
diff --git a/NorthstarDLL/mods/autodownload/moddownloader.h b/NorthstarDLL/mods/autodownload/moddownloader.h
index 747b3c01..5302c21e 100644
--- a/NorthstarDLL/mods/autodownload/moddownloader.h
+++ b/NorthstarDLL/mods/autodownload/moddownloader.h
@@ -1,6 +1,6 @@
class ModDownloader
{
- private:
+private:
const char* VERIFICATION_FLAG = "-disablemodverification";
const char* CUSTOM_MODS_URL_FLAG = "-customverifiedurl=";
const char* STORE_URL = "https://gcdn.thunderstore.io/live/repository/packages/";
@@ -70,7 +70,7 @@ class ModDownloader
*/
void ExtractMod(fs::path modPath);
- public:
+public:
ModDownloader();
/**
diff --git a/NorthstarDLL/mods/modmanager.h b/NorthstarDLL/mods/modmanager.h
index c141414f..233f004d 100644
--- a/NorthstarDLL/mods/modmanager.h
+++ b/NorthstarDLL/mods/modmanager.h
@@ -19,7 +19,7 @@ const std::set<std::string> MODS_BLACKLIST = {"Mod Settings"};
struct ModConVar
{
- public:
+public:
std::string Name;
std::string DefaultValue;
std::string HelpString;
@@ -28,7 +28,7 @@ struct ModConVar
struct ModConCommand
{
- public:
+public:
std::string Name;
std::string Function;
std::string HelpString;
@@ -38,7 +38,7 @@ struct ModConCommand
struct ModScriptCallback
{
- public:
+public:
ScriptContext Context;
// called before the codecallback is executed
@@ -51,7 +51,7 @@ struct ModScriptCallback
struct ModScript
{
- public:
+public:
std::string Path;
std::string RunOn;
@@ -61,14 +61,14 @@ struct ModScript
// these are pretty much identical, could refactor to use the same stuff?
struct ModVPKEntry
{
- public:
+public:
bool m_bAutoLoad;
std::string m_sVpkPath;
};
struct ModRpakEntry
{
- public:
+public:
bool m_bAutoLoad;
std::string m_sPakName;
std::string m_sLoadAfterPak;
@@ -76,7 +76,7 @@ struct ModRpakEntry
class Mod
{
- public:
+public:
// runtime stuff
bool m_bEnabled = true;
bool m_bWasReadSuccessfully = false;
@@ -127,10 +127,10 @@ class Mod
std::unordered_map<std::string, std::string> DependencyConstants;
std::vector<std::string> PluginDependencyConstants;
- public:
+public:
Mod(fs::path modPath, char* jsonBuf);
- private:
+private:
void ParseConVars(rapidjson_document& json);
void ParseConCommands(rapidjson_document& json);
void ParseScripts(rapidjson_document& json);
@@ -142,14 +142,14 @@ class Mod
struct ModOverrideFile
{
- public:
+public:
Mod* m_pOwningMod;
fs::path m_Path;
};
class ModManager
{
- private:
+private:
bool m_bHasLoadedMods = false;
bool m_bHasEnabledModsCfg;
rapidjson_document m_EnabledModsCfg;
@@ -159,13 +159,13 @@ class ModManager
size_t m_hPdefHash;
size_t m_hKBActHash;
- public:
+public:
std::vector<Mod> m_LoadedMods;
std::unordered_map<std::string, ModOverrideFile> m_ModFiles;
std::unordered_map<std::string, std::string> m_DependencyConstants;
std::unordered_set<std::string> m_PluginDependencyConstants;
- public:
+public:
ModManager();
void LoadMods();
void UnloadMods();
diff --git a/NorthstarDLL/mods/modsavefiles.h b/NorthstarDLL/mods/modsavefiles.h
index a50fe62c..f9d39723 100644
--- a/NorthstarDLL/mods/modsavefiles.h
+++ b/NorthstarDLL/mods/modsavefiles.h
@@ -4,13 +4,13 @@ bool ContainsInvalidChars(std::string str);
class SaveFileManager
{
- public:
+public:
template <ScriptContext context> void SaveFileAsync(fs::path file, std::string content);
template <ScriptContext context> int LoadFileAsync(fs::path file);
template <ScriptContext context> void DeleteFileAsync(fs::path file);
// Future proofed in that if we ever get multi-threaded SSDs this code will take advantage of them.
std::mutex fileMutex;
- private:
+private:
int m_iLastRequestHandle = 0;
};
diff --git a/NorthstarDLL/plugins/pluginbackend.h b/NorthstarDLL/plugins/pluginbackend.h
index fc66a597..45cd42f3 100644
--- a/NorthstarDLL/plugins/pluginbackend.h
+++ b/NorthstarDLL/plugins/pluginbackend.h
@@ -17,7 +17,7 @@ union PluginRespondDataCallable
class PluginDataRequest
{
- public:
+public:
PluginDataRequestType type;
PluginRespondDataCallable func;
PluginDataRequest(PluginDataRequestType type, PluginRespondDataCallable func) : type(type), func(func) {}
@@ -25,11 +25,11 @@ class PluginDataRequest
class PluginCommunicationHandler
{
- public:
+public:
void RunFrame();
void PushRequest(PluginDataRequestType type, PluginRespondDataCallable func);
- public:
+public:
std::queue<PluginDataRequest> requestQueue = {};
std::mutex requestMutex;
diff --git a/NorthstarDLL/plugins/plugins.h b/NorthstarDLL/plugins/plugins.h
index d91b2811..4e841f27 100644
--- a/NorthstarDLL/plugins/plugins.h
+++ b/NorthstarDLL/plugins/plugins.h
@@ -5,7 +5,7 @@ const int IDR_RCDATA1 = 101;
class Plugin
{
- public:
+public:
std::string name;
std::string displayName;
std::string dependencyName;
@@ -23,7 +23,7 @@ class Plugin
bool run_on_client = false;
bool run_on_server = false;
- public:
+public:
PLUGIN_INIT_TYPE init;
PLUGIN_INIT_SQVM_TYPE init_sqvm_client;
PLUGIN_INIT_SQVM_TYPE init_sqvm_server;
@@ -37,10 +37,10 @@ class Plugin
class PluginManager
{
- public:
+public:
std::vector<Plugin> m_vLoadedPlugins;
- public:
+public:
bool LoadPlugins();
std::optional<Plugin> LoadPlugin(fs::path path, PluginInitFuncs* funcs, PluginNorthstarData* data);
@@ -52,7 +52,7 @@ class PluginManager
void RunFrame();
- private:
+private:
std::string pluginPath;
};
diff --git a/NorthstarDLL/scripts/scripthttprequesthandler.h b/NorthstarDLL/scripts/scripthttprequesthandler.h
index 1f237bac..f3921f4e 100644
--- a/NorthstarDLL/scripts/scripthttprequesthandler.h
+++ b/NorthstarDLL/scripts/scripthttprequesthandler.h
@@ -99,7 +99,7 @@ struct HttpRequest
*/
class HttpRequestHandler
{
- public:
+public:
HttpRequestHandler();
// Start/Stop the HTTP request handler. Right now this doesn't do much.
@@ -122,7 +122,7 @@ class HttpRequestHandler
/** Registers the HTTP request Squirrel functions for the given script context. */
template <ScriptContext context> void RegisterSQFuncs();
- private:
+private:
int m_iLastRequestHandle = 0;
std::atomic_bool m_bIsHttpRequestHandlerRunning = false;
};
diff --git a/NorthstarDLL/server/auth/bansystem.h b/NorthstarDLL/server/auth/bansystem.h
index 6f180126..d6ac5a4f 100644
--- a/NorthstarDLL/server/auth/bansystem.h
+++ b/NorthstarDLL/server/auth/bansystem.h
@@ -3,11 +3,11 @@
class ServerBanSystem
{
- private:
+private:
std::ofstream m_sBanlistStream;
std::vector<uint64_t> m_vBannedUids;
- public:
+public:
void OpenBanlist();
void ReloadBanlist();
void ClearBanlist();
diff --git a/NorthstarDLL/server/auth/serverauthentication.h b/NorthstarDLL/server/auth/serverauthentication.h
index 32e1d0a8..996d20e1 100644
--- a/NorthstarDLL/server/auth/serverauthentication.h
+++ b/NorthstarDLL/server/auth/serverauthentication.h
@@ -26,7 +26,7 @@ extern CBaseServer__RejectConnectionType CBaseServer__RejectConnection;
class ServerAuthenticationManager
{
- public:
+public:
ConVar* Cvar_ns_erase_auth_info;
ConVar* Cvar_ns_auth_allow_insecure;
ConVar* Cvar_ns_auth_allow_insecure_write;
@@ -40,7 +40,7 @@ class ServerAuthenticationManager
bool m_bForceResetLocalPlayerPersistence = false;
bool m_bStartingLocalSPGame = false;
- public:
+public:
void AddRemotePlayer(std::string token, uint64_t uid, std::string username, std::string pdata);
void AddPlayer(CBaseClient* pPlayer, const char* pAuthToken);
diff --git a/NorthstarDLL/server/serverpresence.h b/NorthstarDLL/server/serverpresence.h
index 3aabecde..c644cc37 100644
--- a/NorthstarDLL/server/serverpresence.h
+++ b/NorthstarDLL/server/serverpresence.h
@@ -3,7 +3,7 @@
struct ServerPresence
{
- public:
+public:
int m_iPort;
std::string m_sServerId;
@@ -44,7 +44,7 @@ struct ServerPresence
class ServerPresenceReporter
{
- public:
+public:
virtual void CreatePresence(const ServerPresence* pServerPresence) {}
virtual void ReportPresence(const ServerPresence* pServerPresence) {}
virtual void DestroyPresence(const ServerPresence* pServerPresence) {}
@@ -53,7 +53,7 @@ class ServerPresenceReporter
class ServerPresenceManager
{
- private:
+private:
ServerPresence m_ServerPresence;
bool m_bHasPresence = false;
@@ -71,7 +71,7 @@ class ServerPresenceManager
ConVar* Cvar_ns_report_server_to_masterserver;
ConVar* Cvar_ns_report_sp_server_to_masterserver;
- public:
+public:
void AddPresenceReporter(ServerPresenceReporter* reporter);
void CreateConVars();
diff --git a/NorthstarDLL/shared/exploit_fixes/ns_limits.h b/NorthstarDLL/shared/exploit_fixes/ns_limits.h
index a2cc431f..546fec6f 100644
--- a/NorthstarDLL/shared/exploit_fixes/ns_limits.h
+++ b/NorthstarDLL/shared/exploit_fixes/ns_limits.h
@@ -27,7 +27,7 @@ struct UnconnectedPlayerLimitData
class ServerLimitsManager
{
- public:
+public:
ConVar* CVar_sv_quota_stringcmdspersecond;
ConVar* Cvar_net_chan_limit_mode;
ConVar* Cvar_net_chan_limit_msec_per_sec;
@@ -40,7 +40,7 @@ class ServerLimitsManager
std::unordered_map<CBaseClient*, PlayerLimitData> m_PlayerLimitData;
std::vector<UnconnectedPlayerLimitData> m_UnconnectedPlayerLimitData;
- public:
+public:
void RunFrame(double flCurrentTime, float flFrameTime);
void AddPlayer(CBaseClient* player);
void RemovePlayer(CBaseClient* player);
diff --git a/NorthstarDLL/shared/keyvalues.cpp b/NorthstarDLL/shared/keyvalues.cpp
index aa22ca65..88753723 100644
--- a/NorthstarDLL/shared/keyvalues.cpp
+++ b/NorthstarDLL/shared/keyvalues.cpp
@@ -17,7 +17,7 @@ typedef int HKeySymbol;
struct CKeyValuesSystem
{
- public:
+public:
struct __VTable
{
char pad0[8 * 3]; // 2 methods
diff --git a/NorthstarDLL/shared/keyvalues.h b/NorthstarDLL/shared/keyvalues.h
index 64ca0cc7..bd62797e 100644
--- a/NorthstarDLL/shared/keyvalues.h
+++ b/NorthstarDLL/shared/keyvalues.h
@@ -48,10 +48,10 @@ enum MergeKeyValuesOp_t
//-----------------------------------------------------------------------------
class KeyValues
{
- private:
+private:
KeyValues(); // for internal use only
- public:
+public:
// Constructors/destructors
KeyValues(const char* pszSetName);
KeyValues(const char* pszSetName, const char* pszFirstKey, const char* pszFirstValue);
@@ -112,7 +112,7 @@ class KeyValues
void CopySubkeys(KeyValues* pParent) const;
KeyValues* MakeCopy(void) const;
- public:
+public:
uint32_t m_iKeyName : 24; // 0x0000
uint32_t m_iKeyNameCaseSensitive1 : 8; // 0x0003
char* m_sValue; // 0x0008
diff --git a/NorthstarDLL/squirrel/squirrel.h b/NorthstarDLL/squirrel/squirrel.h
index 50dd31d0..a4932044 100644
--- a/NorthstarDLL/squirrel/squirrel.h
+++ b/NorthstarDLL/squirrel/squirrel.h
@@ -64,10 +64,10 @@ namespace NS::log
// Cuts down on compile time by ~5 seconds
class SquirrelManagerBase
{
- protected:
+protected:
std::vector<SQFuncRegistration*> m_funcRegistrations;
- public:
+public:
CSquirrelVM* m_pSQVM;
std::map<std::string, SQFunction> m_funcOverrides = {};
std::map<std::string, SQFunction> m_funcOriginals = {};
@@ -319,7 +319,7 @@ class SquirrelManagerBase
template <ScriptContext context> class SquirrelManager : public virtual SquirrelManagerBase
{
- public:
+public:
#pragma region MessageBuffer
SquirrelMessageBuffer* messageBuffer;
@@ -404,7 +404,7 @@ template <ScriptContext context> class SquirrelManager : public virtual Squirrel
#pragma endregion
- public:
+public:
SquirrelManager()
{
m_pSQVM = nullptr;
diff --git a/NorthstarDLL/squirrel/squirrelautobind.h b/NorthstarDLL/squirrel/squirrelautobind.h
index 19ecb808..0fc599f3 100644
--- a/NorthstarDLL/squirrel/squirrelautobind.h
+++ b/NorthstarDLL/squirrel/squirrelautobind.h
@@ -5,7 +5,7 @@ typedef void (*SqAutoBindFunc)();
class SquirrelAutoBindContainer
{
- public:
+public:
std::vector<std::function<void()>> clientSqAutoBindFuncs;
std::vector<std::function<void()>> serverSqAutoBindFuncs;
};
@@ -61,7 +61,7 @@ class __squirrelautobind;
class __squirrelautobind
{
- public:
+public:
__squirrelautobind() = delete;
__squirrelautobind(std::function<void()> clientAutoBindFunc, std::function<void()> serverAutoBindFunc)
diff --git a/NorthstarDLL/squirrel/squirrelclasstypes.h b/NorthstarDLL/squirrel/squirrelclasstypes.h
index c193f2fc..cd777551 100644
--- a/NorthstarDLL/squirrel/squirrelclasstypes.h
+++ b/NorthstarDLL/squirrel/squirrelclasstypes.h
@@ -122,7 +122,7 @@ typedef void (*sq_schedule_call_externalType)(
class SquirrelMessage
{
- public:
+public:
std::string functionName;
FunctionVector args;
bool isExternal = false;
@@ -133,10 +133,10 @@ class SquirrelMessage
class SquirrelMessageBuffer
{
- private:
+private:
std::queue<SquirrelMessage> messages = {};
- public:
+public:
std::mutex mutex;
std::optional<SquirrelMessage> pop()
{
@@ -179,7 +179,7 @@ class SquirrelMessageBuffer
// Super simple wrapper class to allow pushing Assets via call
class SquirrelAsset
{
- public:
+public:
std::string path;
SquirrelAsset(std::string path) : path(path) {};
};