![]() |
|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Developer
|
Edit 3: See post #3 for fix number 3, I'm pretty much done with it.
This bug has been around since forever, still in 2.1, but NiGHTS' position should really be reset to the Drone's position when touching the Drone in order to make time attacks consistent, end-of-level presentation, to name two things. Illustration of the bug Expected: NiGHTS Sonic spawns at Ideya Drone's coordinates ![]() Actual: NiGHTS Sonic spawns at player's coordinates upon touching Drone hitbox ![]() Spoiler: Irrelevant stuff Last edited by Digiku; 03-12-2018 at 11:54 AM. Reason: Fix #3 |
![]() |
![]() |
![]() |
#2 |
cornstar
|
He has RETURNED TO US
__________________
http://funkvessel.tumblr.com/ |
![]() |
![]() |
![]() |
#3 |
Developer
|
:V Post edited for clarity; it helps to have a GIF of the actual behavior in question.
Spoiler: Edit 3: Fix #3 posted, https://github.com/STJr/SRB2/compare...ights-dronepos I'm pretty much done -- I decoupled all the Drone visual elements from the hitbox, so it's made of MT_NIGHTSDRONE, MT_NIGHTSGOAL, MT_NIGHTSDRONESPARKLE, and MT_NIGHTSDRONEMAN. MT_NIGHTSDRONE is always invisible and has no gravity, so its collision is constant. The other three's visibility are toggled as appropriate. The player's position is corrected during its thinker. A player->drone flag triggers the position correction in P_MoveNiGHTSToDrone and prevents P_NiGHTSMovement from running (which causes player's X/Y position to bug out if run.) Come to think of it, you could remove player->drone and P_MoveNiGHTSToDrone by just creating a new flag PF_NIGHTSERIZE and checking it before P_NiGHTSMovement. If it's there, unflag it and return early. That way, player's position can be set directly in P_TouchSpecialMobj without needing a new function, as I attempted here. But: if you wanted momentum, you'll need the separate function. I decided I liked the direct player positioning however. Last edited by Digiku; 03-12-2018 at 11:53 AM. Reason: Patch attempt #3 |
![]() |
![]() |