mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
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:
parent
fc0d6e5195
commit
55bb716c1e
1 changed files with 24 additions and 6 deletions
30
src/p_spec.c
30
src/p_spec.c
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue