diff --git a/src/p_buildmap.cpp b/src/p_buildmap.cpp index defaf6970f..63e38c6165 100644 --- a/src/p_buildmap.cpp +++ b/src/p_buildmap.cpp @@ -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;