Auto-correct the just mentioned inconsistency by clearing the respective TROR

nextwalls. (i.e. setting them to -1 on 'corruptcheck tryfix')

git-svn-id: https://svn.eduke32.com/eduke32@2134 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-11-26 14:12:44 +00:00
parent 1402a6d70b
commit f4703a596d

View file

@ -11645,11 +11645,23 @@ int32_t CheckMapCorruption(int32_t printfromlev, uint64_t tryfixing)
int32_t onumct = numcorruptthings; int32_t onumct = numcorruptthings;
if (bunchnum < 0 || bunchnum >= numyaxbunches) if (bunchnum < 0 || bunchnum >= numyaxbunches)
{
if (tryfixing == 0ull)
{ {
CORRUPTCHK_PRINT(4, CORRUPT_WALL|j, "WALL %d has %s=%d, " CORRUPTCHK_PRINT(4, CORRUPT_WALL|j, "WALL %d has %s=%d, "
"but its %s bunchnum=%d is invalid\n", "but its %s bunchnum=%d is invalid",
j, YUPDOWNWALL[cf], ynw, j, YUPDOWNWALL[cf], ynw,
cf==YAX_CEILING? "ceiling":"floor", bunchnum); cf==YAX_CEILING? "ceiling":"floor", bunchnum);
OSD_Printf(" will clear wall %d's %s to -1 on tryfix\n",
j, yupdownwall[cf]);
}
else if (tryfixing & (1ull<<onumct))
{
yax_setnextwall(j, cf, -1);
OSD_Printf(CCHK_CORRECTED "auto-correction: cleared wall %d's %s to -1\n",
j, yupdownwall[cf]);
}
} }
else if (!ynextwallok && onumct < MAXCORRUPTTHINGS) else if (!ynextwallok && onumct < MAXCORRUPTTHINGS)
{ {