On FuriousFox's request: All waypoint sequences now use linedef frontside texture offset for speed and row offset for sequence, ending what is a very long reign of clusterfuck.

This commit is contained in:
toasterbabe 2016-06-03 01:30:07 +01:00
parent fc0d6e5195
commit 55bb716c1e

View file

@ -3890,8 +3890,14 @@ DoneSection2:
}
// Grab speed and sequence values
speed = abs(lines[lineindex].dx)/8;
sequence = abs(lines[lineindex].dy)>>FRACBITS;
speed = abs(sides[lines[lineindex].sidenum[0]].textureoffset)/8;
sequence = abs(sides[lines[lineindex].sidenum[0]].rowoffset)>>FRACBITS;
if (speed == 0)
{
CONS_Debug(DBG_GAMELOGIC, "ERROR: Waypoint sequence %d at zero speed.\n", sequence);
break;
}
// scan the thinkers
// to find the first waypoint
@ -3963,8 +3969,14 @@ DoneSection2:
}
// Grab speed and sequence values
speed = -(abs(lines[lineindex].dx)/8); // Negative means reverse
sequence = abs(lines[lineindex].dy)>>FRACBITS;
speed = -abs(sides[lines[lineindex].sidenum[0]].textureoffset)/8; // Negative means reverse
sequence = abs(sides[lines[lineindex].sidenum[0]].rowoffset)>>FRACBITS;
if (speed == 0)
{
CONS_Debug(DBG_GAMELOGIC, "ERROR: Waypoint sequence %d at zero speed.\n", sequence);
break;
}
// scan the thinkers
// to find the last waypoint
@ -4101,8 +4113,14 @@ DoneSection2:
}
// Grab speed and sequence values
speed = abs(lines[lineindex].dx)/8;
sequence = abs(lines[lineindex].dy)>>FRACBITS;
speed = abs(sides[lines[lineindex].sidenum[0]].textureoffset)/8;
sequence = abs(sides[lines[lineindex].sidenum[0]].rowoffset)>>FRACBITS;
if (speed == 0)
{
CONS_Debug(DBG_GAMELOGIC, "ERROR: Waypoint sequence %d at zero speed.\n", sequence);
break;
}
// Find the closest waypoint
// Find the preceding waypoint