Read entities within the BSP itself.

NOT YET COMPLETE, HIGHLY UNSTABLE!

Disabled by default, prone to crashing under Windows.
Set CVar "monster_entity_config" to 0 (or 2) to enable reading from BSP.
This commit is contained in:
Giegue
2023-03-29 02:48:18 -03:00
parent 074635bf8d
commit 79d4b3b21d
5 changed files with 363 additions and 27 deletions

View File

@@ -724,6 +724,9 @@ edict_t* spawn_monster(int monster_type, Vector origin, Vector angles, int spawn
monster_pent->v.origin = origin;
monster_pent->v.angles = angles;
// Pass spawnflags first if no keyvalue data exists for it
monster_pent->v.spawnflags = spawnflags;
// Keyvalue data
if (keyvalue != NULL)
{
@@ -738,8 +741,6 @@ edict_t* spawn_monster(int monster_type, Vector origin, Vector angles, int spawn
}
}
monster_pent->v.spawnflags = spawnflags;
monsters[monster_index].pMonster->Spawn();
// Only modify starting spawnflags for monsters, not for entities!