mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Merge branch 'i-hate-stupid-speedrun-tricks' into 'next'
Fix chain launching Basically you're not allowed to launch off a chain the frame you touch it anymore. Coincidentally the changes here allow you to actually use PF_*STASIS in a Lua script now and have it work as you'd expect it to (it lasts for a tic). See merge request !49
This commit is contained in:
commit
1e15ed2f7b
2 changed files with 9 additions and 2 deletions
|
@ -1339,6 +1339,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
player->pflags |= PF_ITEMHANG;
|
player->pflags |= PF_ITEMHANG;
|
||||||
|
|
||||||
|
// Can't jump first frame
|
||||||
|
player->pflags |= PF_JUMPSTASIS;
|
||||||
return;
|
return;
|
||||||
case MT_BIGMINE:
|
case MT_BIGMINE:
|
||||||
case MT_BIGAIRMINE:
|
case MT_BIGAIRMINE:
|
||||||
|
|
|
@ -6340,8 +6340,7 @@ static void P_MovePlayer(player_t *player)
|
||||||
if (!(player->powers[pw_nocontrol] & (1<<15)))
|
if (!(player->powers[pw_nocontrol] & (1<<15)))
|
||||||
player->pflags |= PF_JUMPSTASIS;
|
player->pflags |= PF_JUMPSTASIS;
|
||||||
}
|
}
|
||||||
else
|
// note: don't unset stasis here
|
||||||
player->pflags &= ~PF_FULLSTASIS;
|
|
||||||
|
|
||||||
if (!player->spectator && G_TagGametype())
|
if (!player->spectator && G_TagGametype())
|
||||||
{
|
{
|
||||||
|
@ -8928,6 +8927,11 @@ void P_PlayerThink(player_t *player)
|
||||||
if (!player->mo)
|
if (!player->mo)
|
||||||
return; // P_MovePlayer removed 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
|
#ifdef POLYOBJECTS
|
||||||
if (player->onconveyor == 1)
|
if (player->onconveyor == 1)
|
||||||
player->cmomy = player->cmomx = 0;
|
player->cmomy = player->cmomx = 0;
|
||||||
|
|
Loading…
Reference in a new issue