diff options
89 files changed, 121 insertions, 90 deletions
diff --git a/NorthstarDLL/NorthstarDLL.vcxproj b/NorthstarDLL/NorthstarDLL.vcxproj index 68b172fa..9bd3d6fa 100644 --- a/NorthstarDLL/NorthstarDLL.vcxproj +++ b/NorthstarDLL/NorthstarDLL.vcxproj @@ -63,6 +63,7 @@ <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -95,6 +96,7 @@ <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<Optimization>Disabled</Optimization>
+ <ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
diff --git a/NorthstarDLL/client/audio.cpp b/NorthstarDLL/client/audio.cpp index f0bc385b..ea1f6416 100644 --- a/NorthstarDLL/client/audio.cpp +++ b/NorthstarDLL/client/audio.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "audio.h" #include "dedicated/dedicated.h" #include "core/convar/convar.h" diff --git a/NorthstarDLL/client/chatcommand.cpp b/NorthstarDLL/client/chatcommand.cpp index 76ed9784..c1ad1b3b 100644 --- a/NorthstarDLL/client/chatcommand.cpp +++ b/NorthstarDLL/client/chatcommand.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "core/convar/convar.h" #include "core/convar/concommand.h" #include "localchatwriter.h" diff --git a/NorthstarDLL/client/clientauthhooks.cpp b/NorthstarDLL/client/clientauthhooks.cpp index 904ecb2f..7fca9581 100644 --- a/NorthstarDLL/client/clientauthhooks.cpp +++ b/NorthstarDLL/client/clientauthhooks.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "masterserver/masterserver.h" #include "core/convar/convar.h" #include "client/r2client.h" diff --git a/NorthstarDLL/client/clientruihooks.cpp b/NorthstarDLL/client/clientruihooks.cpp index 7896daa8..ad50d11a 100644 --- a/NorthstarDLL/client/clientruihooks.cpp +++ b/NorthstarDLL/client/clientruihooks.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "core/convar/convar.h" AUTOHOOK_INIT() diff --git a/NorthstarDLL/client/clientvideooverrides.cpp b/NorthstarDLL/client/clientvideooverrides.cpp index d3362adc..a6178cfc 100644 --- a/NorthstarDLL/client/clientvideooverrides.cpp +++ b/NorthstarDLL/client/clientvideooverrides.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "mods/modmanager.h" AUTOHOOK_INIT() diff --git a/NorthstarDLL/client/debugoverlay.cpp b/NorthstarDLL/client/debugoverlay.cpp index dd273227..e3a9292d 100644 --- a/NorthstarDLL/client/debugoverlay.cpp +++ b/NorthstarDLL/client/debugoverlay.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "dedicated/dedicated.h" #include "core/convar/cvar.h" #include "core/math/vector.h" diff --git a/NorthstarDLL/client/demofixes.cpp b/NorthstarDLL/client/demofixes.cpp index 5fb49918..65e48fc0 100644 --- a/NorthstarDLL/client/demofixes.cpp +++ b/NorthstarDLL/client/demofixes.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "core/convar/convar.h" ON_DLL_LOAD_CLIENT("engine.dll", EngineDemoFixes, (CModule module)) diff --git a/NorthstarDLL/client/diskvmtfixes.cpp b/NorthstarDLL/client/diskvmtfixes.cpp index cd762c8a..4ab951c0 100644 --- a/NorthstarDLL/client/diskvmtfixes.cpp +++ b/NorthstarDLL/client/diskvmtfixes.cpp @@ -1,4 +1,3 @@ -#include "pch.h" ON_DLL_LOAD_CLIENT("materialsystem_dx11.dll", DiskVMTFixes, (CModule module)) { diff --git a/NorthstarDLL/client/languagehooks.cpp b/NorthstarDLL/client/languagehooks.cpp index 1a46633c..4251dbbd 100644 --- a/NorthstarDLL/client/languagehooks.cpp +++ b/NorthstarDLL/client/languagehooks.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "core/tier0.h" #include <filesystem> diff --git a/NorthstarDLL/client/latencyflex.cpp b/NorthstarDLL/client/latencyflex.cpp index a1ef72ca..25e38c7a 100644 --- a/NorthstarDLL/client/latencyflex.cpp +++ b/NorthstarDLL/client/latencyflex.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "core/convar/convar.h" AUTOHOOK_INIT() diff --git a/NorthstarDLL/client/localchatwriter.cpp b/NorthstarDLL/client/localchatwriter.cpp index efa7eeee..57fe98a2 100644 --- a/NorthstarDLL/client/localchatwriter.cpp +++ b/NorthstarDLL/client/localchatwriter.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "localchatwriter.h" class vgui_BaseRichText_vtable; diff --git a/NorthstarDLL/client/localchatwriter.h b/NorthstarDLL/client/localchatwriter.h index 8bb1fb2f..de9e2f9b 100644 --- a/NorthstarDLL/client/localchatwriter.h +++ b/NorthstarDLL/client/localchatwriter.h @@ -1,5 +1,4 @@ #pragma once -#include "pch.h" #include "core/math/color.h" class vgui_BaseRichText; diff --git a/NorthstarDLL/client/modlocalisation.cpp b/NorthstarDLL/client/modlocalisation.cpp index 04719934..16fff5f7 100644 --- a/NorthstarDLL/client/modlocalisation.cpp +++ b/NorthstarDLL/client/modlocalisation.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "mods/modmanager.h" AUTOHOOK_INIT() diff --git a/NorthstarDLL/client/r2client.cpp b/NorthstarDLL/client/r2client.cpp index 2e7bd564..fabc0dc6 100644 --- a/NorthstarDLL/client/r2client.cpp +++ b/NorthstarDLL/client/r2client.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "r2client.h" using namespace R2; diff --git a/NorthstarDLL/client/rejectconnectionfixes.cpp b/NorthstarDLL/client/rejectconnectionfixes.cpp index 994e9747..5daeb3ee 100644 --- a/NorthstarDLL/client/rejectconnectionfixes.cpp +++ b/NorthstarDLL/client/rejectconnectionfixes.cpp @@ -1,4 +1,3 @@ -#include "pch.h"
#include "engine/r2engine.h"
AUTOHOOK_INIT()
diff --git a/NorthstarDLL/config/profile.cpp b/NorthstarDLL/config/profile.cpp index 270ec4d3..80ddb59f 100644 --- a/NorthstarDLL/config/profile.cpp +++ b/NorthstarDLL/config/profile.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "config/profile.h" #include "dedicated/dedicated.h" #include <string> diff --git a/NorthstarDLL/core/convar/concommand.cpp b/NorthstarDLL/core/convar/concommand.cpp index 49c8c806..d6874c5c 100644 --- a/NorthstarDLL/core/convar/concommand.cpp +++ b/NorthstarDLL/core/convar/concommand.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "concommand.h" #include "shared/misccommands.h" #include "engine/r2engine.h" diff --git a/NorthstarDLL/core/convar/convar.cpp b/NorthstarDLL/core/convar/convar.cpp index 81648f53..b9c4173e 100644 --- a/NorthstarDLL/core/convar/convar.cpp +++ b/NorthstarDLL/core/convar/convar.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "bits.h" #include "cvar.h" #include "convar.h" diff --git a/NorthstarDLL/core/convar/cvar.cpp b/NorthstarDLL/core/convar/cvar.cpp index 787790be..21f8d2ec 100644 --- a/NorthstarDLL/core/convar/cvar.cpp +++ b/NorthstarDLL/core/convar/cvar.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "cvar.h" #include "convar.h" #include "concommand.h" diff --git a/NorthstarDLL/core/filesystem/filesystem.cpp b/NorthstarDLL/core/filesystem/filesystem.cpp index 6cff7927..b06bd140 100644 --- a/NorthstarDLL/core/filesystem/filesystem.cpp +++ b/NorthstarDLL/core/filesystem/filesystem.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "filesystem.h" #include "core/sourceinterface.h" #include "mods/modmanager.h" diff --git a/NorthstarDLL/core/filesystem/rpakfilesystem.cpp b/NorthstarDLL/core/filesystem/rpakfilesystem.cpp index 82747bdb..e8c4232d 100644 --- a/NorthstarDLL/core/filesystem/rpakfilesystem.cpp +++ b/NorthstarDLL/core/filesystem/rpakfilesystem.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "rpakfilesystem.h" #include "mods/modmanager.h" #include "dedicated/dedicated.h" diff --git a/NorthstarDLL/core/hooks.cpp b/NorthstarDLL/core/hooks.cpp index 79bcbb92..34b48d1d 100644 --- a/NorthstarDLL/core/hooks.cpp +++ b/NorthstarDLL/core/hooks.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "dedicated/dedicated.h" #include <iostream> diff --git a/NorthstarDLL/core/math/bits.cpp b/NorthstarDLL/core/math/bits.cpp index 014899f2..c879a45c 100644 --- a/NorthstarDLL/core/math/bits.cpp +++ b/NorthstarDLL/core/math/bits.cpp @@ -4,7 +4,6 @@ // //=============================================================================// -#include "pch.h" #include "bits.h" //----------------------------------------------------------------------------- diff --git a/NorthstarDLL/core/math/color.cpp b/NorthstarDLL/core/math/color.cpp index 05cf645f..9936cc5a 100644 --- a/NorthstarDLL/core/math/color.cpp +++ b/NorthstarDLL/core/math/color.cpp @@ -1,4 +1,3 @@ -#include "pch.h" // clang-format off namespace NS::Colors diff --git a/NorthstarDLL/core/memalloc.cpp b/NorthstarDLL/core/memalloc.cpp index 122ab444..69ce6f54 100644 --- a/NorthstarDLL/core/memalloc.cpp +++ b/NorthstarDLL/core/memalloc.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "core/memalloc.h" #include "core/tier0.h" diff --git a/NorthstarDLL/core/memory.cpp b/NorthstarDLL/core/memory.cpp index 5e7c3e78..7bd87d70 100644 --- a/NorthstarDLL/core/memory.cpp +++ b/NorthstarDLL/core/memory.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "memory.h" MemoryAddress::MemoryAddress() : m_nAddress(0) {} diff --git a/NorthstarDLL/core/sourceinterface.cpp b/NorthstarDLL/core/sourceinterface.cpp index f9ad694c..5a72beb0 100644 --- a/NorthstarDLL/core/sourceinterface.cpp +++ b/NorthstarDLL/core/sourceinterface.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "sourceinterface.h" #include "logging/sourceconsole.h" diff --git a/NorthstarDLL/core/tier0.cpp b/NorthstarDLL/core/tier0.cpp index 61ad7783..cbad3ec0 100644 --- a/NorthstarDLL/core/tier0.cpp +++ b/NorthstarDLL/core/tier0.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "tier0.h" // use the Tier0 namespace for tier0 funcs diff --git a/NorthstarDLL/dedicated/dedicated.cpp b/NorthstarDLL/dedicated/dedicated.cpp index e58900b7..267fbe92 100644 --- a/NorthstarDLL/dedicated/dedicated.cpp +++ b/NorthstarDLL/dedicated/dedicated.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "dedicated.h" #include "core/tier0.h" #include "playlist.h" diff --git a/NorthstarDLL/dedicated/dedicatedmaterialsystem.cpp b/NorthstarDLL/dedicated/dedicatedmaterialsystem.cpp index 37b74576..5bd6ea93 100644 --- a/NorthstarDLL/dedicated/dedicatedmaterialsystem.cpp +++ b/NorthstarDLL/dedicated/dedicatedmaterialsystem.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "dedicated.h" #include "core/tier0.h" diff --git a/NorthstarDLL/dllmain.cpp b/NorthstarDLL/dllmain.cpp index 31243e6d..91fb94a1 100644 --- a/NorthstarDLL/dllmain.cpp +++ b/NorthstarDLL/dllmain.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "dllmain.h" #include "logging/logging.h" #include "logging/crashhandler.h" diff --git a/NorthstarDLL/engine/host.cpp b/NorthstarDLL/engine/host.cpp index a55c8dfd..436a169d 100644 --- a/NorthstarDLL/engine/host.cpp +++ b/NorthstarDLL/engine/host.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "core/convar/convar.h" #include "mods/modmanager.h" #include "util/printcommands.h" diff --git a/NorthstarDLL/engine/hoststate.cpp b/NorthstarDLL/engine/hoststate.cpp index d89e6c12..e9c44803 100644 --- a/NorthstarDLL/engine/hoststate.cpp +++ b/NorthstarDLL/engine/hoststate.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "engine/hoststate.h" #include "masterserver/masterserver.h" #include "server/auth/serverauthentication.h" diff --git a/NorthstarDLL/engine/r2engine.cpp b/NorthstarDLL/engine/r2engine.cpp index eaa392c8..303cfaf8 100644 --- a/NorthstarDLL/engine/r2engine.cpp +++ b/NorthstarDLL/engine/r2engine.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "r2engine.h" using namespace R2; diff --git a/NorthstarDLL/engine/runframe.cpp b/NorthstarDLL/engine/runframe.cpp index 3df93f54..40a619bb 100644 --- a/NorthstarDLL/engine/runframe.cpp +++ b/NorthstarDLL/engine/runframe.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "engine/r2engine.h" #include "server/r2server.h" #include "hoststate.h" diff --git a/NorthstarDLL/logging/crashhandler.cpp b/NorthstarDLL/logging/crashhandler.cpp index baa75923..36f8b714 100644 --- a/NorthstarDLL/logging/crashhandler.cpp +++ b/NorthstarDLL/logging/crashhandler.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "crashhandler.h" #include "dedicated/dedicated.h" #include "config/profile.h" diff --git a/NorthstarDLL/logging/logging.cpp b/NorthstarDLL/logging/logging.cpp index 200d861c..edf122be 100644 --- a/NorthstarDLL/logging/logging.cpp +++ b/NorthstarDLL/logging/logging.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "logging.h" #include "core/convar/convar.h" #include "core/convar/concommand.h" diff --git a/NorthstarDLL/logging/logging.h b/NorthstarDLL/logging/logging.h index 2cccdde6..1cfc6644 100644 --- a/NorthstarDLL/logging/logging.h +++ b/NorthstarDLL/logging/logging.h @@ -1,5 +1,4 @@ #pragma once -#include "pch.h" #include "spdlog/sinks/base_sink.h" #include "spdlog/logger.h" #include "squirrel/squirrel.h" diff --git a/NorthstarDLL/logging/loghooks.cpp b/NorthstarDLL/logging/loghooks.cpp index d09f23cc..805a5125 100644 --- a/NorthstarDLL/logging/loghooks.cpp +++ b/NorthstarDLL/logging/loghooks.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "logging.h" #include "loghooks.h" #include "core/convar/convar.h" diff --git a/NorthstarDLL/logging/sourceconsole.cpp b/NorthstarDLL/logging/sourceconsole.cpp index 775caa49..16080794 100644 --- a/NorthstarDLL/logging/sourceconsole.cpp +++ b/NorthstarDLL/logging/sourceconsole.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "core/convar/convar.h" #include "sourceconsole.h" #include "core/sourceinterface.h" diff --git a/NorthstarDLL/logging/sourceconsole.h b/NorthstarDLL/logging/sourceconsole.h index cf7027df..3abcc470 100644 --- a/NorthstarDLL/logging/sourceconsole.h +++ b/NorthstarDLL/logging/sourceconsole.h @@ -1,5 +1,4 @@ #pragma once -#include "pch.h" #include "core/sourceinterface.h" #include "spdlog/sinks/base_sink.h" #include <map> diff --git a/NorthstarDLL/masterserver/masterserver.cpp b/NorthstarDLL/masterserver/masterserver.cpp index 5679939b..37301886 100644 --- a/NorthstarDLL/masterserver/masterserver.cpp +++ b/NorthstarDLL/masterserver/masterserver.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "masterserver/masterserver.h" #include "core/convar/concommand.h" #include "playlist.h" diff --git a/NorthstarDLL/mods/compiled/kb_act.cpp b/NorthstarDLL/mods/compiled/kb_act.cpp index 83f469f4..ecfb8388 100644 --- a/NorthstarDLL/mods/compiled/kb_act.cpp +++ b/NorthstarDLL/mods/compiled/kb_act.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "mods/modmanager.h" #include "core/filesystem/filesystem.h" diff --git a/NorthstarDLL/mods/compiled/modkeyvalues.cpp b/NorthstarDLL/mods/compiled/modkeyvalues.cpp index df35de64..4672d195 100644 --- a/NorthstarDLL/mods/compiled/modkeyvalues.cpp +++ b/NorthstarDLL/mods/compiled/modkeyvalues.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "mods/modmanager.h" #include "core/filesystem/filesystem.h" diff --git a/NorthstarDLL/mods/compiled/modpdef.cpp b/NorthstarDLL/mods/compiled/modpdef.cpp new file mode 100644 index 00000000..4b1b12b7 --- /dev/null +++ b/NorthstarDLL/mods/compiled/modpdef.cpp @@ -0,0 +1,118 @@ +#include "mods/modmanager.h" +#include "core/filesystem/filesystem.h" + +#include <map> +#include <sstream> +#include <fstream> + +const fs::path MOD_PDEF_SUFFIX = "cfg/server/persistent_player_data_version_231.pdef"; +const char* VPK_PDEF_PATH = "cfg/server/persistent_player_data_version_231.pdef"; + +void ModManager::BuildPdef() +{ + spdlog::info("Building persistent_player_data_version_231.pdef..."); + + fs::path MOD_PDEF_PATH = fs::path(GetCompiledAssetsPath() / MOD_PDEF_SUFFIX); + + fs::remove(MOD_PDEF_PATH); + std::string pdef = R2::ReadVPKOriginalFile(VPK_PDEF_PATH); + + for (Mod& mod : m_LoadedMods) + { + if (!mod.m_bEnabled || !mod.Pdiff.size()) + continue; + + // this code probably isn't going to be pretty lol + // refer to shared/pjson.js for an actual okish parser of the pdiff format + // but pretty much, $ENUM_ADD blocks define members added to preexisting enums + // $PROP_START ends the custom stuff, and from there it's just normal props we append to the pdef + + std::map<std::string, std::vector<std::string>> enumAdds; + + // read pdiff + bool inEnum = false; + bool inProp = false; + std::string currentEnum; + std::string currentLine; + std::istringstream pdiffStream(mod.Pdiff); + + while (std::getline(pdiffStream, currentLine)) + { + if (inProp) + { + // just append to pdef here + pdef += currentLine; + pdef += '\n'; + continue; + } + + // trim leading whitespace + size_t start = currentLine.find_first_not_of(" \n\r\t\f\v"); + size_t end = currentLine.find("//"); + if (end == std::string::npos) + end = currentLine.size() - 1; // last char + + if (!currentLine.size() || !currentLine.compare(start, 2, "//")) + continue; + + if (inEnum) + { + if (!currentLine.compare(start, 9, "$ENUM_END")) + inEnum = false; + else + enumAdds[currentEnum].push_back(currentLine); // only need to push_back current line, if there's syntax errors then game + // pdef parser will handle them + } + else if (!currentLine.compare(start, 9, "$ENUM_ADD")) + { + inEnum = true; + currentEnum = currentLine.substr(start + 10 /*$ENUM_ADD + 1*/, currentLine.size() - end - (start + 10)); + enumAdds.insert(std::make_pair(currentEnum, std::vector<std::string>())); + } + else if (!currentLine.compare(start, 11, "$PROP_START")) + { + inProp = true; + pdef += "\n// $PROP_START "; + pdef += mod.Name; + pdef += "\n"; + } + } + + // add new members to preexisting enums + // note: this code could 100% be messed up if people put //$ENUM_START comments and the like + // could make it protect against this, but honestly not worth atm + for (auto enumAdd : enumAdds) + { + std::string addStr; + for (std::string enumMember : enumAdd.second) + { + addStr += enumMember; + addStr += '\n'; + } + + // start of enum we're adding to + std::string startStr = "$ENUM_START "; + startStr += enumAdd.first; + + // insert enum values into enum + size_t insertIdx = pdef.find("$ENUM_END", pdef.find(startStr)); + pdef.reserve(addStr.size()); + pdef.insert(insertIdx, addStr); + } + } + + fs::create_directories(MOD_PDEF_PATH.parent_path()); + + std::ofstream writeStream(MOD_PDEF_PATH, std::ios::binary); + writeStream << pdef; + writeStream.close(); + + ModOverrideFile overrideFile; + overrideFile.m_pOwningMod = nullptr; + overrideFile.m_Path = VPK_PDEF_PATH; + + if (m_ModFiles.find(VPK_PDEF_PATH) == m_ModFiles.end()) + m_ModFiles.insert(std::make_pair(VPK_PDEF_PATH, overrideFile)); + else + m_ModFiles[VPK_PDEF_PATH] = overrideFile; +} diff --git a/NorthstarDLL/mods/compiled/modscriptsrson.cpp b/NorthstarDLL/mods/compiled/modscriptsrson.cpp index 1a27aefa..5e837a60 100644 --- a/NorthstarDLL/mods/compiled/modscriptsrson.cpp +++ b/NorthstarDLL/mods/compiled/modscriptsrson.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "mods/modmanager.h" #include "core/filesystem/filesystem.h" #include "squirrel/squirrel.h" diff --git a/NorthstarDLL/mods/modmanager.cpp b/NorthstarDLL/mods/modmanager.cpp index 40ed9f3e..06e32e29 100644 --- a/NorthstarDLL/mods/modmanager.cpp +++ b/NorthstarDLL/mods/modmanager.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "modmanager.h" #include "core/convar/convar.h" #include "core/convar/concommand.h" diff --git a/NorthstarDLL/plugins/plugins.cpp b/NorthstarDLL/plugins/plugins.cpp index 97ac0b9f..47d27da1 100644 --- a/NorthstarDLL/plugins/plugins.cpp +++ b/NorthstarDLL/plugins/plugins.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrel/squirrel.h" #include "plugins.h" #include "masterserver/masterserver.h" diff --git a/NorthstarDLL/scripts/client/clientchathooks.cpp b/NorthstarDLL/scripts/client/clientchathooks.cpp index a1a9e503..df9497ef 100644 --- a/NorthstarDLL/scripts/client/clientchathooks.cpp +++ b/NorthstarDLL/scripts/client/clientchathooks.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrel/squirrel.h" #include "util/utils.h" diff --git a/NorthstarDLL/scripts/client/cursorposition.cpp b/NorthstarDLL/scripts/client/cursorposition.cpp index 61fd427a..c0e8623c 100644 --- a/NorthstarDLL/scripts/client/cursorposition.cpp +++ b/NorthstarDLL/scripts/client/cursorposition.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrel/squirrel.h" #include "util/wininfo.h" diff --git a/NorthstarDLL/scripts/client/scriptbrowserhooks.cpp b/NorthstarDLL/scripts/client/scriptbrowserhooks.cpp index df4014de..1462e57f 100644 --- a/NorthstarDLL/scripts/client/scriptbrowserhooks.cpp +++ b/NorthstarDLL/scripts/client/scriptbrowserhooks.cpp @@ -1,4 +1,3 @@ -#include "pch.h" AUTOHOOK_INIT() diff --git a/NorthstarDLL/scripts/client/scriptmainmenupromos.cpp b/NorthstarDLL/scripts/client/scriptmainmenupromos.cpp index 0ea167f8..ecb47af7 100644 --- a/NorthstarDLL/scripts/client/scriptmainmenupromos.cpp +++ b/NorthstarDLL/scripts/client/scriptmainmenupromos.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrel/squirrel.h" #include "masterserver/masterserver.h" diff --git a/NorthstarDLL/scripts/client/scriptmodmenu.cpp b/NorthstarDLL/scripts/client/scriptmodmenu.cpp index 6c0684e2..9d024936 100644 --- a/NorthstarDLL/scripts/client/scriptmodmenu.cpp +++ b/NorthstarDLL/scripts/client/scriptmodmenu.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "mods/modmanager.h" #include "squirrel/squirrel.h" diff --git a/NorthstarDLL/scripts/client/scriptserverbrowser.cpp b/NorthstarDLL/scripts/client/scriptserverbrowser.cpp index 5f1287ad..584ec905 100644 --- a/NorthstarDLL/scripts/client/scriptserverbrowser.cpp +++ b/NorthstarDLL/scripts/client/scriptserverbrowser.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrel/squirrel.h" #include "masterserver/masterserver.h" #include "server/auth/serverauthentication.h" diff --git a/NorthstarDLL/scripts/client/scriptservertoclientstringcommand.cpp b/NorthstarDLL/scripts/client/scriptservertoclientstringcommand.cpp index f3cb2f18..a3a81c8a 100644 --- a/NorthstarDLL/scripts/client/scriptservertoclientstringcommand.cpp +++ b/NorthstarDLL/scripts/client/scriptservertoclientstringcommand.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrel/squirrel.h" #include "core/convar/convar.h" #include "core/convar/concommand.h" diff --git a/NorthstarDLL/scripts/scriptdatatables.cpp b/NorthstarDLL/scripts/scriptdatatables.cpp index 915d4df0..b050ff8d 100644 --- a/NorthstarDLL/scripts/scriptdatatables.cpp +++ b/NorthstarDLL/scripts/scriptdatatables.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrel/squirrel.h" #include "core/filesystem/rpakfilesystem.h" #include "core/convar/convar.h" diff --git a/NorthstarDLL/scripts/scripthttprequesthandler.cpp b/NorthstarDLL/scripts/scripthttprequesthandler.cpp index 17ccc888..8a6f70fc 100644 --- a/NorthstarDLL/scripts/scripthttprequesthandler.cpp +++ b/NorthstarDLL/scripts/scripthttprequesthandler.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "scripthttprequesthandler.h" #include "util/version.h" #include "squirrel/squirrel.h" diff --git a/NorthstarDLL/scripts/scripthttprequesthandler.h b/NorthstarDLL/scripts/scripthttprequesthandler.h index 0f888b6e..1f237bac 100644 --- a/NorthstarDLL/scripts/scripthttprequesthandler.h +++ b/NorthstarDLL/scripts/scripthttprequesthandler.h @@ -1,7 +1,5 @@ #pragma once -#include "pch.h" - enum class ScriptContext; // These definitions below should match on the Squirrel side so we can easily pass them along through a function. diff --git a/NorthstarDLL/scripts/scriptjson.cpp b/NorthstarDLL/scripts/scriptjson.cpp index f41b0457..98cb52d6 100644 --- a/NorthstarDLL/scripts/scriptjson.cpp +++ b/NorthstarDLL/scripts/scriptjson.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrel/squirrel.h" #include "rapidjson/error/en.h" diff --git a/NorthstarDLL/scripts/scriptutility.cpp b/NorthstarDLL/scripts/scriptutility.cpp index fa35df7b..054836ca 100644 --- a/NorthstarDLL/scripts/scriptutility.cpp +++ b/NorthstarDLL/scripts/scriptutility.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrel/squirrel.h" #include "client/r2client.h" #include "engine/r2engine.h" diff --git a/NorthstarDLL/scripts/server/miscserverfixes.cpp b/NorthstarDLL/scripts/server/miscserverfixes.cpp index 4feca505..48c2c111 100644 --- a/NorthstarDLL/scripts/server/miscserverfixes.cpp +++ b/NorthstarDLL/scripts/server/miscserverfixes.cpp @@ -1,4 +1,3 @@ -#include "pch.h" ON_DLL_LOAD("server.dll", MiscServerFixes, (CModule module)) { diff --git a/NorthstarDLL/scripts/server/miscserverscript.cpp b/NorthstarDLL/scripts/server/miscserverscript.cpp index b58bdfda..06e9fda0 100644 --- a/NorthstarDLL/scripts/server/miscserverscript.cpp +++ b/NorthstarDLL/scripts/server/miscserverscript.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrel/squirrel.h" #include "masterserver/masterserver.h" #include "server/auth/serverauthentication.h" diff --git a/NorthstarDLL/scripts/server/scriptuserinfo.cpp b/NorthstarDLL/scripts/server/scriptuserinfo.cpp index 68baac0e..6b26ed61 100644 --- a/NorthstarDLL/scripts/server/scriptuserinfo.cpp +++ b/NorthstarDLL/scripts/server/scriptuserinfo.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrel/squirrel.h" #include "engine/r2engine.h" #include "server/r2server.h" diff --git a/NorthstarDLL/server/auth/bansystem.cpp b/NorthstarDLL/server/auth/bansystem.cpp index b92f8187..c7c94c1c 100644 --- a/NorthstarDLL/server/auth/bansystem.cpp +++ b/NorthstarDLL/server/auth/bansystem.cpp @@ -1,5 +1,4 @@ #pragma once -#include "pch.h" #include "bansystem.h" #include "serverauthentication.h" #include "core/convar/concommand.h" diff --git a/NorthstarDLL/server/auth/serverauthentication.cpp b/NorthstarDLL/server/auth/serverauthentication.cpp index 2f06f60f..72f21d51 100644 --- a/NorthstarDLL/server/auth/serverauthentication.cpp +++ b/NorthstarDLL/server/auth/serverauthentication.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "serverauthentication.h" #include "shared/exploit_fixes/ns_limits.h" #include "core/convar/cvar.h" diff --git a/NorthstarDLL/server/buildainfile.cpp b/NorthstarDLL/server/buildainfile.cpp index d1150a6b..848d8569 100644 --- a/NorthstarDLL/server/buildainfile.cpp +++ b/NorthstarDLL/server/buildainfile.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "core/convar/convar.h" #include "engine/hoststate.h" #include "engine/r2engine.h" diff --git a/NorthstarDLL/server/r2server.cpp b/NorthstarDLL/server/r2server.cpp index 50cfa239..a8aa84ce 100644 --- a/NorthstarDLL/server/r2server.cpp +++ b/NorthstarDLL/server/r2server.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "r2server.h" using namespace R2; diff --git a/NorthstarDLL/server/serverchathooks.cpp b/NorthstarDLL/server/serverchathooks.cpp index 0ea3c2d2..96765697 100644 --- a/NorthstarDLL/server/serverchathooks.cpp +++ b/NorthstarDLL/server/serverchathooks.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "serverchathooks.h" #include "shared/exploit_fixes/ns_limits.h" #include "squirrel/squirrel.h" diff --git a/NorthstarDLL/server/serverchathooks.h b/NorthstarDLL/server/serverchathooks.h index 1d8a806a..8fda3cec 100644 --- a/NorthstarDLL/server/serverchathooks.h +++ b/NorthstarDLL/server/serverchathooks.h @@ -1,5 +1,4 @@ #pragma once -#include "pch.h" #include <rapidjson/document.h> #include <rapidjson/stringbuffer.h> diff --git a/NorthstarDLL/server/serverpresence.cpp b/NorthstarDLL/server/serverpresence.cpp index bda5e7fe..072ef347 100644 --- a/NorthstarDLL/server/serverpresence.cpp +++ b/NorthstarDLL/server/serverpresence.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "serverpresence.h" #include "shared/playlist.h" #include "core/tier0.h" diff --git a/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp b/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp index 8cb956e6..338de306 100644 --- a/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp +++ b/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "core/convar/cvar.h" #include "ns_limits.h" #include "dedicated/dedicated.h" diff --git a/NorthstarDLL/shared/exploit_fixes/exploitfixes_lzss.cpp b/NorthstarDLL/shared/exploit_fixes/exploitfixes_lzss.cpp index 4205133a..ccb6ac18 100644 --- a/NorthstarDLL/shared/exploit_fixes/exploitfixes_lzss.cpp +++ b/NorthstarDLL/shared/exploit_fixes/exploitfixes_lzss.cpp @@ -1,4 +1,3 @@ -#include "pch.h" AUTOHOOK_INIT() diff --git a/NorthstarDLL/shared/exploit_fixes/exploitfixes_utf8parser.cpp b/NorthstarDLL/shared/exploit_fixes/exploitfixes_utf8parser.cpp index e2510765..de0b0f21 100644 --- a/NorthstarDLL/shared/exploit_fixes/exploitfixes_utf8parser.cpp +++ b/NorthstarDLL/shared/exploit_fixes/exploitfixes_utf8parser.cpp @@ -1,4 +1,3 @@ -#include "pch.h" AUTOHOOK_INIT() diff --git a/NorthstarDLL/shared/exploit_fixes/ns_limits.cpp b/NorthstarDLL/shared/exploit_fixes/ns_limits.cpp index 135cfb83..b01a9b98 100644 --- a/NorthstarDLL/shared/exploit_fixes/ns_limits.cpp +++ b/NorthstarDLL/shared/exploit_fixes/ns_limits.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "ns_limits.h" #include "engine/hoststate.h" #include "client/r2client.h" diff --git a/NorthstarDLL/shared/keyvalues.cpp b/NorthstarDLL/shared/keyvalues.cpp index 25155dde..06ed8d68 100644 --- a/NorthstarDLL/shared/keyvalues.cpp +++ b/NorthstarDLL/shared/keyvalues.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "keyvalues.h" #include <winnt.h> diff --git a/NorthstarDLL/shared/maxplayers.cpp b/NorthstarDLL/shared/maxplayers.cpp index ebb44341..dcf4044e 100644 --- a/NorthstarDLL/shared/maxplayers.cpp +++ b/NorthstarDLL/shared/maxplayers.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "core/tier0.h" #include "maxplayers.h" diff --git a/NorthstarDLL/shared/misccommands.cpp b/NorthstarDLL/shared/misccommands.cpp index 5894f5a2..ba00de29 100644 --- a/NorthstarDLL/shared/misccommands.cpp +++ b/NorthstarDLL/shared/misccommands.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "misccommands.h" #include "core/convar/concommand.h" #include "shared/playlist.h" diff --git a/NorthstarDLL/shared/playlist.cpp b/NorthstarDLL/shared/playlist.cpp index 7c8f7312..018b2a9b 100644 --- a/NorthstarDLL/shared/playlist.cpp +++ b/NorthstarDLL/shared/playlist.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "playlist.h" #include "core/convar/concommand.h" #include "core/convar/convar.h" diff --git a/NorthstarDLL/squirrel/squirrel.cpp b/NorthstarDLL/squirrel/squirrel.cpp index 0c538b21..06ba445c 100644 --- a/NorthstarDLL/squirrel/squirrel.cpp +++ b/NorthstarDLL/squirrel/squirrel.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrel.h" #include "logging/logging.h" #include "core/convar/concommand.h" diff --git a/NorthstarDLL/squirrel/squirrelautobind.cpp b/NorthstarDLL/squirrel/squirrelautobind.cpp index d5f42477..c15240f5 100644 --- a/NorthstarDLL/squirrel/squirrelautobind.cpp +++ b/NorthstarDLL/squirrel/squirrelautobind.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "squirrelautobind.h" SquirrelAutoBindContainer* g_pSqAutoBindContainer; diff --git a/NorthstarDLL/squirrel/squirrelclasstypes.h b/NorthstarDLL/squirrel/squirrelclasstypes.h index efc80f15..68b57bae 100644 --- a/NorthstarDLL/squirrel/squirrelclasstypes.h +++ b/NorthstarDLL/squirrel/squirrelclasstypes.h @@ -1,5 +1,4 @@ #pragma once -#include "pch.h" #include "squirreldatatypes.h" #include <queue> diff --git a/NorthstarDLL/util/printcommands.cpp b/NorthstarDLL/util/printcommands.cpp index 5552c50c..c3eb21ab 100644 --- a/NorthstarDLL/util/printcommands.cpp +++ b/NorthstarDLL/util/printcommands.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "printcommands.h" #include "core/convar/convar.h" #include "core/convar/concommand.h" diff --git a/NorthstarDLL/util/printmaps.cpp b/NorthstarDLL/util/printmaps.cpp index 853e4877..449aa351 100644 --- a/NorthstarDLL/util/printmaps.cpp +++ b/NorthstarDLL/util/printmaps.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include "printmaps.h" #include "core/convar/convar.h" #include "core/convar/concommand.h" diff --git a/NorthstarDLL/util/utils.cpp b/NorthstarDLL/util/utils.cpp index a3b31e17..2c9dc85a 100644 --- a/NorthstarDLL/util/utils.cpp +++ b/NorthstarDLL/util/utils.cpp @@ -1,4 +1,3 @@ -#include "pch.h" #include <ctype.h> #include "utils.h" diff --git a/NorthstarDLL/util/version.cpp b/NorthstarDLL/util/version.cpp index 8697b61f..1ad62438 100644 --- a/NorthstarDLL/util/version.cpp +++ b/NorthstarDLL/util/version.cpp @@ -1,5 +1,4 @@ #include "util/version.h" -#include "pch.h" #include "ns_version.h" #include "dedicated/dedicated.h" diff --git a/NorthstarDLL/util/version.h b/NorthstarDLL/util/version.h index 261a4cf1..a3dcf8c7 100644 --- a/NorthstarDLL/util/version.h +++ b/NorthstarDLL/util/version.h @@ -1,6 +1,6 @@ #pragma once extern char version[16]; -extern char NSUserAgent[32]; +extern char NSUserAgent[256]; void InitialiseVersion(); diff --git a/NorthstarDLL/util/wininfo.cpp b/NorthstarDLL/util/wininfo.cpp index 991deb33..b0b77749 100644 --- a/NorthstarDLL/util/wininfo.cpp +++ b/NorthstarDLL/util/wininfo.cpp @@ -1,5 +1,3 @@ -#include "pch.h" - AUTOHOOK_INIT() HWND* g_gameHWND; diff --git a/NorthstarDLL/util/wininfo.h b/NorthstarDLL/util/wininfo.h index ac417034..c56f7b87 100644 --- a/NorthstarDLL/util/wininfo.h +++ b/NorthstarDLL/util/wininfo.h @@ -1,6 +1,4 @@ #pragma once -#pragma once -#include "pch.h" extern HWND* g_gameHWND; extern HMODULE g_NorthstarModule; |