Skip to content

Commit b63ea22

Browse files
authored
fix: update to latest CS2 engine sync (#3)
1 parent ee8817d commit b63ea22

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

src/main/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ file(GLOB_RECURSE HEADERS_LIST
66
"*.h"
77
)
88

9-
function(BUILD_GAME GAME GAME_PATH)
9+
function(BUILD_GAME GAME GAME_PATH SDK)
1010
add_executable(DumpSource2-${GAME} ${SOURCES_LIST} ${HEADERS_LIST})
1111

1212
target_link_libraries(DumpSource2-${GAME} PRIVATE
13-
HL2SDK-${GAME}
13+
HL2SDK-${SDK}
1414
fmt::fmt
1515
spdlog
1616
${CMAKE_DL_LIBS}
@@ -19,9 +19,9 @@ function(BUILD_GAME GAME GAME_PATH)
1919
target_compile_definitions(DumpSource2-${GAME} PRIVATE GAME_${GAME} GAME_PATH="${GAME_PATH}")
2020
endfunction()
2121

22-
build_game(CS2 csgo)
23-
build_game(DOTA dota)
24-
build_game(DEADLOCK citadel)
22+
build_game(CS2 csgo DEADLOCK)
23+
build_game(DOTA dota DOTA)
24+
build_game(DEADLOCK citadel DEADLOCK)
2525

2626
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Source Files" FILES ${SOURCES_LIST})
2727
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${HEADERS_LIST})

src/main/application.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ class DumperApplication : public CTier0AppSystem<IAppSystem>
5757
virtual void* unk11() { return nullptr; };
5858
virtual void* AddSystemDontLoadStartupManifests(const char* a, const char* b) { return nullptr; };
5959
virtual void* unk12() { return nullptr; };
60+
virtual void* unk13() { return nullptr; };
6061
};

src/main/dumpers/schemas/schemas.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "schemas.h"
2121
#include "globalvariables.h"
2222
#include "interfaces.h"
23-
#include "schemasystem/schemasystem.h"
2423
#include <filesystem>
2524
#include <fstream>
2625
#include <map>
@@ -32,6 +31,9 @@
3231
#include <fmt/format.h>
3332
#include "metadata_stringifier.h"
3433
#include <spdlog/spdlog.h>
34+
#define private public
35+
#include "schemasystem/schemasystem.h"
36+
#undef private
3537

3638
namespace Dumpers::Schemas
3739
{
@@ -197,7 +199,8 @@ void Dump()
197199

198200
std::map<std::string, std::unordered_set<std::string>> foundFiles;
199201

200-
for (auto i = 0; i < typeScopes.GetNumStrings(); ++i)
202+
// poggu: this used to be typeScopes.GetNumStrings() but after the 29/07/2025 cs2 engine sync this caused out of bounds access to the internal vector
203+
for (auto i = 0; i < typeScopes.m_Vector.Count(); ++i)
201204
DumpTypeScope(typeScopes[i], schemaPath, foundFiles);
202205

203206
DumpTypeScope(schemaSystem->GlobalTypeScope(), schemaPath, foundFiles);

src/main/utils/common.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ IMemAlloc* g_pMemAlloc = nullptr;
9595
void Plat_ExitProcess(int) {
9696
// STUB
9797
}
98-
98+
/*
9999
#ifdef GAME_CS2
100100
void Plat_FatalErrorFunc(const tchar* pMsg, ...) {
101101
// STUB
102102
}
103103
#endif
104-
104+
*/
105105
bool Plat_IsInDebugSession() {
106106
// STUB
107107
return false;

0 commit comments

Comments
 (0)