Use Blood player starts

- Blood's maps use thing types, much like Doom's, so getting its player
  starts is easy. There's no need to synthesize a start from the editor
  position like with other Build maps.
This commit is contained in:
Randy Heit 2014-07-29 21:39:05 -05:00
parent 449a17c2f4
commit a922ae04cc

View file

@ -16,6 +16,7 @@
#include "p_setup.h"
#include "g_level.h"
#include "r_data/colormaps.h"
#include "gi.h"
// MACROS ------------------------------------------------------------------
@ -361,9 +362,8 @@ static bool P_LoadBloodMap (BYTE *data, size_t len, FMapThing **mapthings, int *
// BUILD info from the map we need. (Sprites are ignored.)
LoadSectors (bsec);
LoadWalls (bwal, numWalls, bsec);
*mapthings = new FMapThing[numsprites + 1];
CreateStartSpot ((fixed_t *)infoBlock, *mapthings);
*numspr = 1 + LoadSprites (bspr, xspr, numsprites, bsec, *mapthings + 1);
*mapthings = new FMapThing[numsprites];
*numspr = LoadSprites (bspr, xspr, numsprites, bsec, *mapthings);
delete[] bsec;
delete[] bwal;
@ -713,9 +713,19 @@ static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites,
mapthings[count].args[1] = xsprites[i].Data4;
mapthings[count].args[2] = xsprites[i].Data1;
mapthings[count].args[3] = xsprites[i].Data2;
mapthings[count].args[4] = 0;
mapthings[count].type = 14065;
}
else if (xsprites != NULL && sprites[i].lotag == 1)
{ // Blood player start
if (xsprites[i].Data1 < 4)
mapthings[count].type = 1 + xsprites[i].Data1;
else
mapthings[count].type = gameinfo.player5start + xsprites[i].Data1 - 4;
}
else if (xsprites != NULL && sprites[i].lotag == 2)
{ // Bloodbath start
mapthings[count].type = 11;
}
else
{
if (sprites[i].cstat & (16|32|32768)) continue;