Fix another dragpoint() bug that was wrongly omitting walls.

This one could have only happened with TROR maps, I think.

git-svn-id: https://svn.eduke32.com/eduke32@2097 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-11-01 22:01:35 +00:00
parent 4322bae14c
commit 3713e3db9b

View file

@ -11477,7 +11477,7 @@ void dragpoint(int16_t pointhighlight, int32_t dax, int32_t day)
}
}
if (clockwise==0) //search points CCW
if (!clockwise) //search points CCW
{
if (wall[w].nextwall >= 0)
w = wall[wall[w].nextwall].point2;
@ -11488,7 +11488,15 @@ void dragpoint(int16_t pointhighlight, int32_t dax, int32_t day)
}
}
if (clockwise==1)
cnt--;
if (cnt==0)
{
initprintf("dragpoint %d: infloop!\n", pointhighlight);
i = numyaxwalls;
break;
}
if (clockwise)
{
thelastwall = lastwall(w);
if (wall[thelastwall].nextwall >= 0)
@ -11497,9 +11505,15 @@ void dragpoint(int16_t pointhighlight, int32_t dax, int32_t day)
break;
}
cnt--;
if ((walbitmap[w>>3] & (1<<(w&7))) || cnt==0)
break;
if ((walbitmap[w>>3] & (1<<(w&7))))
{
if (clockwise)
break;
w = tmpstartwall;
clockwise = 1;
continue;
}
}
}