mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- let ValidateSprite print better messages when developer mode is set to warning and also call it for Blood.
This commit is contained in:
parent
f2e344a235
commit
642088ed80
3 changed files with 9 additions and 4 deletions
|
@ -377,6 +377,7 @@ int32_t engineInit(void);
|
|||
void engineUnInit(void);
|
||||
void initspritelists(void);
|
||||
|
||||
void ValidateSprite(spritetype& spr);
|
||||
void engineLoadBoard(const char *filename, int flags, vec3_t *dapos, int16_t *daang, int *dacursectnum);
|
||||
void loadMapBackup(const char* filename);
|
||||
void G_LoadMapHack(const char* filename, const unsigned char*);
|
||||
|
|
|
@ -206,7 +206,7 @@ static void SetWallPalV5()
|
|||
}
|
||||
}
|
||||
|
||||
static void ValidateSprite(spritetype& spr)
|
||||
void ValidateSprite(spritetype& spr)
|
||||
{
|
||||
int index = int(&spr - sprite);
|
||||
bool bugged = false;
|
||||
|
@ -224,10 +224,13 @@ static void ValidateSprite(spritetype& spr)
|
|||
{
|
||||
int sectnum = -1;
|
||||
updatesector(spr.x, spr.y, §num);
|
||||
spr.sectnum = sectnum;
|
||||
|
||||
bugged = sectnum < 0;
|
||||
if (bugged) Printf("Sprite #%d (%d,%d) with invalid sector %d\n", index, spr.x, spr.y, sectnum);
|
||||
if (!DPrintf(DMSG_WARNING, "Sprite #%d (%d,%d) with invalid sector %d was corrected to sector %d\n", index, spr.x, spr.y, spr.sectnum, sectnum))
|
||||
{
|
||||
bugged = sectnum < 0;
|
||||
if (bugged) Printf("Sprite #%d (%d,%d) with invalid sector %d\n", index, spr.x, spr.y, spr.sectnum);
|
||||
}
|
||||
spr.sectnum = sectnum;
|
||||
}
|
||||
if (bugged)
|
||||
{
|
||||
|
|
|
@ -893,6 +893,7 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, shor
|
|||
pSprite->shade = load.shade;
|
||||
pSprite->blend = 0;
|
||||
pSprite->time = i;
|
||||
ValidateSprite(*pSprite);
|
||||
|
||||
InsertSpriteSect(i, sprite[i].sectnum);
|
||||
InsertSpriteStat(i, sprite[i].statnum);
|
||||
|
|
Loading…
Reference in a new issue