mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-30 16:11:01 +00:00
NiGHTS drone loop: Change flyangle comparison to fix detection from vertical angles
Use > 90 && < 270 instead of >= 90 && <= 270. Fixes a bug where if you fly directly up (flyangle 90) or directly down (flyangle 270), that registers as a backwards direction, so you trigger the loop detection by flying BACKWARDS, not FORWARDS. This edge case (only possible via JUMPTOAXIS) should default to FORWARDS looping.
(cherry picked from commit ce215195f8
)
This commit is contained in:
parent
ba7d97733d
commit
25361713dc
1 changed files with 2 additions and 2 deletions
|
@ -777,8 +777,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
// not (your direction) xor (stored direction)
|
// not (your direction) xor (stored direction)
|
||||||
// In other words, you can't u-turn and respawn rings near the drone.
|
// In other words, you can't u-turn and respawn rings near the drone.
|
||||||
if (pl->bonustime && (pl->pflags & PF_NIGHTSMODE) && (INT32)leveltime > droneobj->extravalue2 && (
|
if (pl->bonustime && (pl->pflags & PF_NIGHTSMODE) && (INT32)leveltime > droneobj->extravalue2 && (
|
||||||
!(pl->flyangle >= 90 && pl->flyangle <= 270)
|
!(pl->flyangle > 90 && pl->flyangle < 270)
|
||||||
^ (droneobj->extravalue1 >= 90 && droneobj->extravalue1 <= 270)
|
^ (droneobj->extravalue1 > 90 && droneobj->extravalue1 < 270)
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
// Reload all the fancy ring stuff!
|
// Reload all the fancy ring stuff!
|
||||||
|
|
Loading…
Reference in a new issue