From acc22bc9ef4d92184389115661ac0d35b9fd4dda Mon Sep 17 00:00:00 2001 From: Giegue Date: Wed, 29 Mar 2023 12:54:54 -0300 Subject: [PATCH] Fix BSP reader crashing the server. --- src/dlls/monster_config.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/dlls/monster_config.cpp b/src/dlls/monster_config.cpp index 71cbd2a..7b1c757 100644 --- a/src/dlls/monster_config.cpp +++ b/src/dlls/monster_config.cpp @@ -452,7 +452,13 @@ void scan_monster_bsp(void) break; } } - UTIL_Remove( existsGAME ); // get rid of the temporary entity + + // use REMOVE_ENTITY instead of UTIL_Remove! + // UTIL_Remove sets FL_KILLME to remove the entity on the next frame, that won't do. + // REMOVE_ENTITY instead removes it instantly, which is needed to prevent server crashes + // due to "ED_Alloc: no free edicts" error. + + REMOVE_ENTITY( existsGAME ); // get rid of the temporary entity use_monstermod = false; // use game entity } }