mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
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:
parent
449a17c2f4
commit
a922ae04cc
1 changed files with 14 additions and 4 deletions
|
@ -16,6 +16,7 @@
|
||||||
#include "p_setup.h"
|
#include "p_setup.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "r_data/colormaps.h"
|
#include "r_data/colormaps.h"
|
||||||
|
#include "gi.h"
|
||||||
|
|
||||||
// MACROS ------------------------------------------------------------------
|
// 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.)
|
// BUILD info from the map we need. (Sprites are ignored.)
|
||||||
LoadSectors (bsec);
|
LoadSectors (bsec);
|
||||||
LoadWalls (bwal, numWalls, bsec);
|
LoadWalls (bwal, numWalls, bsec);
|
||||||
*mapthings = new FMapThing[numsprites + 1];
|
*mapthings = new FMapThing[numsprites];
|
||||||
CreateStartSpot ((fixed_t *)infoBlock, *mapthings);
|
*numspr = LoadSprites (bspr, xspr, numsprites, bsec, *mapthings);
|
||||||
*numspr = 1 + LoadSprites (bspr, xspr, numsprites, bsec, *mapthings + 1);
|
|
||||||
|
|
||||||
delete[] bsec;
|
delete[] bsec;
|
||||||
delete[] bwal;
|
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[1] = xsprites[i].Data4;
|
||||||
mapthings[count].args[2] = xsprites[i].Data1;
|
mapthings[count].args[2] = xsprites[i].Data1;
|
||||||
mapthings[count].args[3] = xsprites[i].Data2;
|
mapthings[count].args[3] = xsprites[i].Data2;
|
||||||
mapthings[count].args[4] = 0;
|
|
||||||
mapthings[count].type = 14065;
|
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
|
else
|
||||||
{
|
{
|
||||||
if (sprites[i].cstat & (16|32|32768)) continue;
|
if (sprites[i].cstat & (16|32|32768)) continue;
|
||||||
|
|
Loading…
Reference in a new issue