mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Fix Mapster32 bug where sometimes you'd get two points instead of one when pressing enter to insert points where the lines intersect with the wall drawing tool
git-svn-id: https://svn.eduke32.com/eduke32@6857 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
16696dbe0b
commit
b4a8656910
1 changed files with 8 additions and 0 deletions
|
@ -7606,9 +7606,12 @@ end_space_handling:
|
|||
}
|
||||
|
||||
newnumwalls = -1;
|
||||
char touchedwall[(MAXWALLS+7)>>3];
|
||||
|
||||
for (i=0; i<numdrawnwalls; i++)
|
||||
{
|
||||
Bmemset(touchedwall, 0, sizeof(touchedwall));
|
||||
|
||||
for (j=numwalls-1; j>=0; j--) /* j may be modified in loop */
|
||||
{
|
||||
vec2_t pint;
|
||||
|
@ -7616,6 +7619,9 @@ end_space_handling:
|
|||
|
||||
YAX_SKIPWALL(j);
|
||||
|
||||
if (wall[j].nextwall >= 0 && (touchedwall[wall[j].nextwall>>3] & pow2char[wall[j].nextwall&7]))
|
||||
continue;
|
||||
|
||||
if (!lineintersect2v((vec2_t *)&wall[j], (vec2_t *)&POINT2(j),
|
||||
&point[i], &point[i+1], &pint))
|
||||
continue;
|
||||
|
@ -7623,6 +7629,8 @@ end_space_handling:
|
|||
if (vec2eq(&pint, (vec2_t *)&wall[j]) || vec2eq(&pint, (vec2_t *)&POINT2(j)))
|
||||
continue;
|
||||
|
||||
touchedwall[j>>3] |= (1<<(j&7));
|
||||
|
||||
inspts = M32_InsertPoint(j, pint.x, pint.y, -1, &j); /* maybe modify j */
|
||||
|
||||
if (inspts==0)
|
||||
|
|
Loading…
Reference in a new issue