- moved most content of p_setup.cpp into a MapLoader class.

This commit is contained in:
Christoph Oelckers 2018-12-27 09:44:49 +01:00
commit 2e22c01d45
10 changed files with 511 additions and 451 deletions

View file

@ -98,6 +98,7 @@
#include "events.h"
#include "actorinlines.h"
#include "a_dynlight.h"
#include "fragglescript/t_fs.h"
// MACROS ------------------------------------------------------------------
@ -5577,6 +5578,26 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
return mobj;
}
//===========================================================================
//
// SpawnMapThing
//
//===========================================================================
CVAR(Bool, dumpspawnedthings, false, 0)
AActor *SpawnMapThing(int index, FMapThing *mt, int position)
{
AActor *spawned = P_SpawnMapThing(mt, position);
if (dumpspawnedthings)
{
Printf("%5d: (%5f, %5f, %5f), doomednum = %5d, flags = %04x, type = %s\n",
index, mt->pos.X, mt->pos.Y, mt->pos.Z, mt->EdNum, mt->flags,
spawned ? spawned->GetClass()->TypeName.GetChars() : "(none)");
}
T_AddSpawnedThing(spawned);
return spawned;
}
//