mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-23 01:11:30 +00:00
- Blood: allow bad start spots to pass for modern maps.
These can have alternative start spot definitions. The error will still be printed, though.
This commit is contained in:
parent
1b162ececc
commit
a13612ab9b
3 changed files with 5 additions and 5 deletions
|
@ -418,7 +418,7 @@ void fixSectors()
|
|||
}
|
||||
}
|
||||
|
||||
void validateStartSector(const char* filename, const vec3_t& pos, int* cursectnum, unsigned numsectors)
|
||||
void validateStartSector(const char* filename, const vec3_t& pos, int* cursectnum, unsigned numsectors, bool noabort)
|
||||
{
|
||||
|
||||
if ((unsigned)(*cursectnum) >= numsectors)
|
||||
|
@ -426,10 +426,10 @@ void validateStartSector(const char* filename, const vec3_t& pos, int* cursectnu
|
|||
sectortype* sect = nullptr;
|
||||
updatesectorz(pos.X, pos.Y, pos.Z, §);
|
||||
if (!sect) updatesector(pos.X, pos.Y, §);
|
||||
if (sect)
|
||||
if (sect || noabort)
|
||||
{
|
||||
Printf(PRINT_HIGH, "Error in map %s: Start sector %d out of range. Max. sector is %d\n", filename, *cursectnum, numsectors);
|
||||
*cursectnum = sectnum(sect);
|
||||
*cursectnum = sect? sectnum(sect) : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -648,4 +648,4 @@ void loadMap(const char *filename, int flags, vec3_t *pos, int16_t *ang, int *cu
|
|||
TArray<walltype> loadMapWalls(const char* filename);
|
||||
void loadMapBackup(const char* filename);
|
||||
void loadMapHack(const char* filename, const unsigned char*, SpawnSpriteDef& sprites);
|
||||
void validateStartSector(const char* filename, const vec3_t& pos, int* cursectnum, unsigned numsectors);
|
||||
void validateStartSector(const char* filename, const vec3_t& pos, int* cursectnum, unsigned numsectors, bool noabort = false);
|
||||
|
|
|
@ -672,7 +672,7 @@ void dbLoadMap(const char* pPath, int* pX, int* pY, int* pZ, short* pAngle, int*
|
|||
sectionGeometry.SetSize(sections.Size());
|
||||
wallbackup = wall;
|
||||
sectorbackup = sector;
|
||||
validateStartSector(mapname.GetChars(), { *pX, *pY, *pZ }, cursectnum, mapHeader.numsectors);
|
||||
validateStartSector(mapname.GetChars(), { *pX, *pY, *pZ }, cursectnum, mapHeader.numsectors, gModernMap);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue