mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +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
|
// Grab speed and sequence values
|
||||||
speed = abs(lines[lineindex].dx)/8;
|
speed = abs(sides[lines[lineindex].sidenum[0]].textureoffset)/8;
|
||||||
sequence = abs(lines[lineindex].dy)>>FRACBITS;
|
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
|
// scan the thinkers
|
||||||
// to find the first waypoint
|
// to find the first waypoint
|
||||||
|
|
@ -3963,8 +3969,14 @@ DoneSection2:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grab speed and sequence values
|
// Grab speed and sequence values
|
||||||
speed = -(abs(lines[lineindex].dx)/8); // Negative means reverse
|
speed = -abs(sides[lines[lineindex].sidenum[0]].textureoffset)/8; // Negative means reverse
|
||||||
sequence = abs(lines[lineindex].dy)>>FRACBITS;
|
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
|
// scan the thinkers
|
||||||
// to find the last waypoint
|
// to find the last waypoint
|
||||||
|
|
@ -4101,8 +4113,14 @@ DoneSection2:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grab speed and sequence values
|
// Grab speed and sequence values
|
||||||
speed = abs(lines[lineindex].dx)/8;
|
speed = abs(sides[lines[lineindex].sidenum[0]].textureoffset)/8;
|
||||||
sequence = abs(lines[lineindex].dy)>>FRACBITS;
|
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 closest waypoint
|
||||||
// Find the preceding waypoint
|
// Find the preceding waypoint
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue