mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Mapster32: for some nextwall/nextsector corruptions, suggest making wall white.
Selected by writing e.g. 'corruptcheck tryfix 1-14 ??' in the console. Like with the first alternative, the corruption numbers / range (here, 1-14) must be given. git-svn-id: https://svn.eduke32.com/eduke32@3746 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
789e26b42f
commit
9f76b78496
1 changed files with 22 additions and 8 deletions
|
@ -9148,10 +9148,18 @@ static int32_t osdcmd_vars_pk(const osdfuncparm_t *parm)
|
|||
char *endptr;
|
||||
for (i=1; i<parm->numparms; i++)
|
||||
{
|
||||
if (i==parm->numparms-1 && !Bstrcmp(parm->parms[i], "?"))
|
||||
if (i==parm->numparms-1)
|
||||
{
|
||||
corrupt_tryfix_alt = 1;
|
||||
break;
|
||||
if (!Bstrcmp(parm->parms[i], "??"))
|
||||
{
|
||||
corrupt_tryfix_alt = 2;
|
||||
break;
|
||||
}
|
||||
else if (!Bstrcmp(parm->parms[i], "?"))
|
||||
{
|
||||
corrupt_tryfix_alt = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
n = (int32_t)Bstrtol(parm->parms[i], &endptr, 10);
|
||||
|
@ -11426,11 +11434,13 @@ static void suggest_nextsector_correction(int32_t nw, int32_t j)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
OSD_Printf(" ?? suggest making wall %d white\n", j);
|
||||
}
|
||||
|
||||
static void do_nextsector_correction(int32_t nw, int32_t j)
|
||||
{
|
||||
if (!corrupt_tryfix_alt)
|
||||
if (corrupt_tryfix_alt==0)
|
||||
{
|
||||
if (nw>=0 && nw<numwalls)
|
||||
if (wall[nw].nextwall==j && walls_are_consistent(nw, j))
|
||||
|
@ -11441,7 +11451,7 @@ static void do_nextsector_correction(int32_t nw, int32_t j)
|
|||
j, newns);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (corrupt_tryfix_alt==1)
|
||||
{
|
||||
if (wall[j].nextsector>=0 && wall[j].nextsector<numsectors)
|
||||
{
|
||||
|
@ -11456,6 +11466,11 @@ static void do_nextsector_correction(int32_t nw, int32_t j)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (corrupt_tryfix_alt==2)
|
||||
{
|
||||
wall[j].nextwall = wall[j].nextsector = -1;
|
||||
OSD_Printf(CCHK_CORRECTED "auto-correction: made wall %d white\n", j);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -11649,13 +11664,12 @@ int32_t CheckMapCorruption(int32_t printfromlev, uint64_t tryfixing)
|
|||
|
||||
// inconsistent cstat&2 and heinum checker
|
||||
{
|
||||
int32_t cs, hn;
|
||||
const char *cflabel[2] = {"ceiling", "floor"};
|
||||
|
||||
for (j=0; j<2; j++)
|
||||
{
|
||||
cs = !!(SECTORFLD(i,stat, j)&2);
|
||||
hn = (SECTORFLD(i,heinum, j)!=0);
|
||||
const int32_t cs = !!(SECTORFLD(i,stat, j)&2);
|
||||
const int32_t hn = !!SECTORFLD(i,heinum, j);
|
||||
|
||||
if (cs != hn && heinumcheckstat <= 1)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue