mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Mapster32: make the heinum&2 and stat inconsistency be displayed only once
with 'corruptcheck now', but still print each corrected one on tryfix. git-svn-id: https://svn.eduke32.com/eduke32@2012 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9c16dc7873
commit
85b65c26d3
1 changed files with 10 additions and 4 deletions
|
@ -11414,6 +11414,7 @@ int32_t CheckMapCorruption(int32_t printfromlev, uint64_t tryfixing)
|
||||||
int32_t ewall=0; // expected wall index
|
int32_t ewall=0; // expected wall index
|
||||||
|
|
||||||
int32_t errlevel=0, bad=0;
|
int32_t errlevel=0, bad=0;
|
||||||
|
int32_t heinumcheckstat = 0; // 1, 2
|
||||||
|
|
||||||
uint8_t *seen_nextwalls = NULL;
|
uint8_t *seen_nextwalls = NULL;
|
||||||
int16_t *lastnextwallsource = NULL;
|
int16_t *lastnextwallsource = NULL;
|
||||||
|
@ -11474,19 +11475,24 @@ int32_t CheckMapCorruption(int32_t printfromlev, uint64_t tryfixing)
|
||||||
cs = !!(SECTORFLD(i,stat, j)&2);
|
cs = !!(SECTORFLD(i,stat, j)&2);
|
||||||
hn = (SECTORFLD(i,heinum, j)!=0);
|
hn = (SECTORFLD(i,heinum, j)!=0);
|
||||||
|
|
||||||
if (cs != hn)
|
if (cs != hn && heinumcheckstat <= 1)
|
||||||
{
|
{
|
||||||
if (numcorruptthings < MAXCORRUPTTHINGS && (tryfixing & (1ull<<numcorruptthings)))
|
if (numcorruptthings < MAXCORRUPTTHINGS &&
|
||||||
|
(heinumcheckstat==1 || (heinumcheckstat==0 && (tryfixing & (1ull<<numcorruptthings)))))
|
||||||
{
|
{
|
||||||
setslope(i, j, 0);
|
setslope(i, j, 0);
|
||||||
OSD_Printf(CCHK_CORRECTED "auto-correction: reset sector %d's %s slope\n",
|
OSD_Printf(CCHK_CORRECTED "auto-correction: reset sector %d's %s slope\n",
|
||||||
i, cflabel[j]);
|
i, cflabel[j]);
|
||||||
|
heinumcheckstat = 1;
|
||||||
}
|
}
|
||||||
else
|
else if (heinumcheckstat==0)
|
||||||
{
|
{
|
||||||
CORRUPTCHK_PRINT(2, CORRUPT_SECTOR|i,
|
CORRUPTCHK_PRINT(1, CORRUPT_SECTOR|i,
|
||||||
"SECTOR[%d]: inconsistent %sstat&2 and heinum", i, cflabel[j]);
|
"SECTOR[%d]: inconsistent %sstat&2 and heinum", i, cflabel[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (heinumcheckstat != 1)
|
||||||
|
heinumcheckstat = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue