From 8f24f63be140a34c9ac19463832bed0e7fabba67 Mon Sep 17 00:00:00 2001 From: James Haley Date: Wed, 25 Aug 2010 03:05:19 +0000 Subject: Added riftSpots and fleshed out Strife level exit behavior as far as setting of destmap, riftdest, and riftangle (previously unknown variable dword_9F138). Added functions G_RiftExitLevel, G_RiftPlayer, and G_RiftCheat. Removed G_WorldDone and secretexit variable. Subversion-branch: /branches/strife-branch Subversion-revision: 1967 --- src/strife/p_setup.c | 82 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 32 deletions(-) (limited to 'src/strife/p_setup.c') diff --git a/src/strife/p_setup.c b/src/strife/p_setup.c index 2a3a8f85..8a8bfd9c 100644 --- a/src/strife/p_setup.c +++ b/src/strife/p_setup.c @@ -114,6 +114,8 @@ mapthing_t deathmatchstarts[MAX_DEATHMATCH_STARTS]; mapthing_t* deathmatch_p; mapthing_t playerstarts[MAXPLAYERS]; +// haleyjd 08/24/10: [STRIFE] rift spots for player spawning +mapthing_t riftSpots[MAXRIFTSPOTS]; @@ -319,6 +321,8 @@ void P_LoadNodes (int lump) // // P_LoadThings // +// haleyjd 08/24/10: [STRIFE]: +// * Added code to record rift spots void P_LoadThings (int lump) { byte *data; @@ -330,42 +334,56 @@ void P_LoadThings (int lump) data = W_CacheLumpNum (lump,PU_STATIC); numthings = W_LumpLength (lump) / sizeof(mapthing_t); - + mt = (mapthing_t *)data; for (i=0 ; itype)) - { - case 68: // Arachnotron - case 64: // Archvile - case 88: // Boss Brain - case 89: // Boss Shooter - case 69: // Hell Knight - case 67: // Mancubus - case 71: // Pain Elemental - case 65: // Former Human Commando - case 66: // Revenant - case 84: // Wolf SS - spawn = false; - break; - } - } - if (spawn == false) - break; - - // Do spawn all other stuff. - spawnthing.x = SHORT(mt->x); - spawnthing.y = SHORT(mt->y); - spawnthing.angle = SHORT(mt->angle); - spawnthing.type = SHORT(mt->type); - spawnthing.options = SHORT(mt->options); - - P_SpawnMapThing(&spawnthing); + // Do not spawn cool, new monsters if !commercial + // STRIFE-TODO: replace with isregistered stuff + if (gamemode != commercial) + { + switch (SHORT(mt->type)) + { + case 68: // Arachnotron + case 64: // Archvile + case 88: // Boss Brain + case 89: // Boss Shooter + case 69: // Hell Knight + case 67: // Mancubus + case 71: // Pain Elemental + case 65: // Former Human Commando + case 66: // Revenant + case 84: // Wolf SS + spawn = false; + break; + } + } + if (spawn == false) + break; + + // Do spawn all other stuff. + spawnthing.x = SHORT(mt->x); + spawnthing.y = SHORT(mt->y); + spawnthing.angle = SHORT(mt->angle); + spawnthing.type = SHORT(mt->type); + spawnthing.options = SHORT(mt->options); + + // haleyjd 08/24/2010: Special Strife checks + if(spawnthing.type >= 118 && spawnthing.type < 128) + { + // initialize riftSpots + int riftSpotNum = spawnthing.type - 118; + riftSpots[riftSpotNum] = spawnthing; + riftSpots[riftSpotNum].type = 1; + } + else if(spawnthing.type >= 9001 && spawnthing.type < 9011) + { + // STRIFE-TODO: mystery array of 90xx objects + } + else + P_SpawnMapThing(&spawnthing); } W_ReleaseLumpNum(lump); -- cgit v1.2.3