From 7c5adacc6f25b19474e56764553f3e6b4523e27d Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Sun, 14 Feb 2016 12:28:03 -0800 Subject: [PATCH] Fixed chain launching In the process, the stasis flags work like you'd expect them to. You can now set them in Lua or code and they'll actually do something. --- src/p_inter.c | 3 +++ src/p_user.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index 709e0e2b..55d36a1d 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1339,6 +1339,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) } else player->pflags |= PF_ITEMHANG; + + // Can't jump first frame + player->pflags |= PF_JUMPSTASIS; return; case MT_BIGMINE: case MT_BIGAIRMINE: diff --git a/src/p_user.c b/src/p_user.c index 96841d7e..da65b7cb 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -6340,8 +6340,7 @@ static void P_MovePlayer(player_t *player) if (!(player->powers[pw_nocontrol] & (1<<15))) player->pflags |= PF_JUMPSTASIS; } - else - player->pflags &= ~PF_FULLSTASIS; + // note: don't unset stasis here if (!player->spectator && G_TagGametype()) { @@ -8928,6 +8927,11 @@ void P_PlayerThink(player_t *player) if (!player->mo) return; // P_MovePlayer removed player->mo. + // Unset statis flags after moving. + // In other words, if you manually set stasis via code, + // it lasts for one tic. + player->pflags &= ~PF_FULLSTASIS; + #ifdef POLYOBJECTS if (player->onconveyor == 1) player->cmomy = player->cmomx = 0;