From 62c17b14e43712b41d5bcd635568a221022e6160 Mon Sep 17 00:00:00 2001 From: Giegue Date: Sat, 1 Apr 2023 23:57:11 -0300 Subject: [PATCH] Even more BSP reader fixes. Also fix project file not including all files. --- src/dlls/.gitignore | 6 +++++- src/dlls/monster_config.cpp | 8 ++++++++ src/dlls/monster_mm.vcxproj.filters | 9 +++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/dlls/.gitignore b/src/dlls/.gitignore index b42cbff..b17895e 100644 --- a/src/dlls/.gitignore +++ b/src/dlls/.gitignore @@ -1,5 +1,9 @@ +Release/ +Debug/ msgs/ opt.*/ debug.*/ *.o -*.so \ No newline at end of file +*.so +*.suo +*.sdf \ No newline at end of file diff --git a/src/dlls/monster_config.cpp b/src/dlls/monster_config.cpp index 7b1c757..2e520e1 100644 --- a/src/dlls/monster_config.cpp +++ b/src/dlls/monster_config.cpp @@ -433,6 +433,14 @@ void scan_monster_bsp(void) // examine all keys while (kv_pair != NULL) { + // entities cannot be this big! + if (kvd_index >= MAX_KEYVALUES) + { + LOG_MESSAGE(PLID, "WARNING: can't process entity #%i - too many keyvalues", ent); + use_monstermod = false; + break; + } + if (strcmp(kv_pair->key, "classname") == 0) { // the entity we are trying to spawn could already exist within the game diff --git a/src/dlls/monster_mm.vcxproj.filters b/src/dlls/monster_mm.vcxproj.filters index 7d2721f..cc7fa73 100644 --- a/src/dlls/monster_mm.vcxproj.filters +++ b/src/dlls/monster_mm.vcxproj.filters @@ -177,6 +177,12 @@ Source Files + + Source Files + + + Source Files + @@ -266,5 +272,8 @@ Header Files + + Header Files + \ No newline at end of file