Skip to content

Commit 31197ab

Browse files
committed
fix: disable convar dumping for latest cs2 build
1 parent 7aafa89 commit 31197ab

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/main/appframework.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ void* AppSystemFactory(const char* pName, int* pReturnCode)
9494
// which then calls convar change handlers that try to load main scenesystem appsystem
9595
void SetConvarValueStub(ICvar* icvar, ConVarRef ref)
9696
{
97+
// TODO: remove after cvar interface is fixed
98+
#ifndef GAME_CS2
9799
ConVarRefAbstract cvar(ref);
98100
if (!cvar.IsConVarDataValid())
99101
return;
@@ -103,6 +105,7 @@ void SetConvarValueStub(ICvar* icvar, ConVarRef ref)
103105
{
104106
cvar.SetBool(false);
105107
}
108+
#endif
106109
}
107110

108111
void InitializeCoreModules()
@@ -148,11 +151,14 @@ void InitializeAppSystems()
148151

149152
std::string path = appSystem.gameBin ? fmt::format("../../{}/bin/{}", GAME_PATH, PLATFORM_FOLDER) : "";
150153

154+
spdlog::trace("Creating module {}", path);
151155
CModule module(path.c_str(), appSystem.moduleName);
152156

157+
spdlog::trace("Finding interface for module {}", path);
153158
auto interface = module.FindInterface<IAppSystem*>(appSystem.interfaceVersion.c_str());
154159

155160
g_factoryMap[appSystem.interfaceVersion] = interface;
161+
spdlog::trace("Connecting app system for module {}", path);
156162
interface->Connect(&AppSystemFactory);
157163
if (appSystem.connect)
158164
{

src/main/globalvariables.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
namespace Globals {
2626

2727
inline std::filesystem::path outputPath;
28-
inline std::ofstream stringsIgnoreStream;
28+
inline std::stringstream stringsIgnoreStream;
2929

3030
} // namespace Interfaces

src/main/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,20 @@ int main(int argc, char** argv)
5353
return 0;
5454
}
5555

56-
Globals::stringsIgnoreStream = std::ofstream(Globals::outputPath / ".stringsignore");
5756
spdlog::info("Starting Source2Dumper");
5857

5958
InitializeCoreModules();
6059
InitializeAppSystems();
6160

61+
// TODO: remove after cvar interface is fixed
62+
#ifndef GAME_CS2
6263
Dumpers::ConCommands::Dump();
64+
#endif
6365
Dumpers::Schemas::Dump();
6466

67+
std::ofstream file(Globals::outputPath / ".stringsignore");
68+
file << Globals::stringsIgnoreStream.str();
69+
6570
spdlog::info("Dumped successfully");
6671

6772
// skips atexit calls that cause a segfault on dota only while unregistering cvar callbacks

0 commit comments

Comments
 (0)