mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-14 00:21:38 +00:00
Mapster32: second attempt at preventing extra wall points from being inserted on some walls with the batch point insert tool
git-svn-id: https://svn.eduke32.com/eduke32@6863 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2b80de8a8c
commit
07ec86c4af
1 changed files with 9 additions and 6 deletions
|
@ -7606,22 +7606,22 @@ end_space_handling:
|
||||||
}
|
}
|
||||||
|
|
||||||
newnumwalls = -1;
|
newnumwalls = -1;
|
||||||
char touchedwall[(MAXWALLS+7)>>3];
|
|
||||||
|
|
||||||
for (i=0; i<numdrawnwalls; i++)
|
for (i=0; i<numdrawnwalls; i++)
|
||||||
{
|
{
|
||||||
|
char touchedwall[(MAXWALLS+7)>>3];
|
||||||
Bmemset(touchedwall, 0, sizeof(touchedwall));
|
Bmemset(touchedwall, 0, sizeof(touchedwall));
|
||||||
|
|
||||||
for (j=numwalls-1; j>=0; j--) /* j may be modified in loop */
|
for (j=numwalls-1; j>=0; j--) /* j may be modified in loop */
|
||||||
{
|
{
|
||||||
vec2_t pint;
|
|
||||||
int32_t inspts;
|
|
||||||
|
|
||||||
YAX_SKIPWALL(j);
|
YAX_SKIPWALL(j);
|
||||||
|
|
||||||
if (wall[j].nextwall >= 0 && (touchedwall[wall[j].nextwall>>3] & pow2char[wall[j].nextwall&7]))
|
if ((touchedwall[j >> 3] & pow2char[j & 7])
|
||||||
|
|| (wall[j].nextwall >= 0 && (touchedwall[wall[j].nextwall >> 3] & pow2char[wall[j].nextwall & 7])))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
vec2_t pint;
|
||||||
|
|
||||||
if (!lineintersect2v((vec2_t *)&wall[j], (vec2_t *)&POINT2(j),
|
if (!lineintersect2v((vec2_t *)&wall[j], (vec2_t *)&POINT2(j),
|
||||||
&point[i], &point[i+1], &pint))
|
&point[i], &point[i+1], &pint))
|
||||||
continue;
|
continue;
|
||||||
|
@ -7631,7 +7631,10 @@ end_space_handling:
|
||||||
|
|
||||||
touchedwall[j>>3] |= (1<<(j&7));
|
touchedwall[j>>3] |= (1<<(j&7));
|
||||||
|
|
||||||
inspts = M32_InsertPoint(j, pint.x, pint.y, -1, &j); /* maybe modify j */
|
if (wall[j].nextwall != -1)
|
||||||
|
touchedwall[wall[j].nextwall>>3] |= (1<<(wall[j].nextwall&7));
|
||||||
|
|
||||||
|
int32_t inspts = M32_InsertPoint(j, pint.x, pint.y, -1, &j); /* maybe modify j */
|
||||||
|
|
||||||
if (inspts==0)
|
if (inspts==0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue