mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Merge branch 'pw-justlaunched' into 'next'
Add pw_justlaunched to tell modders when a player launches from a slope See merge request STJr/SRB2!792
This commit is contained in:
commit
26825a2b4c
4 changed files with 13 additions and 3 deletions
|
@ -278,6 +278,7 @@ typedef enum
|
|||
pw_nights_linkfreeze,
|
||||
|
||||
pw_nocontrol, //for linedef exec 427
|
||||
pw_justlaunched, // Launched off a slope this tic (0=none, 1=standard launch, 2=half-pipe launch)
|
||||
|
||||
NUMPOWERS
|
||||
} powertype_t;
|
||||
|
|
|
@ -9134,7 +9134,8 @@ static const char *const POWERS_LIST[] = {
|
|||
"NIGHTS_LINKFREEZE",
|
||||
|
||||
//for linedef exec 427
|
||||
"NOCONTROL"
|
||||
"NOCONTROL",
|
||||
"JUSTLAUNCHED",
|
||||
};
|
||||
|
||||
static const char *const HUDITEMS_LIST[] = {
|
||||
|
|
|
@ -1997,8 +1997,12 @@ void P_XYMovement(mobj_t *mo)
|
|||
{
|
||||
mo->momz = transfermomz;
|
||||
mo->standingslope = NULL;
|
||||
if (player && (player->pflags & PF_SPINNING))
|
||||
player->pflags |= PF_THOKKED;
|
||||
if (player)
|
||||
{
|
||||
player->powers[pw_justlaunched] = 2;
|
||||
if (player->pflags & PF_SPINNING)
|
||||
player->pflags |= PF_THOKKED;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -3922,6 +3926,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
|||
// Needed for gravity boots
|
||||
P_CheckGravity(mobj, false);
|
||||
|
||||
mobj->player->powers[pw_justlaunched] = 0;
|
||||
if (mobj->momx || mobj->momy)
|
||||
{
|
||||
P_XYMovement(mobj);
|
||||
|
|
|
@ -726,6 +726,9 @@ void P_SlopeLaunch(mobj_t *mo)
|
|||
|
||||
//CONS_Printf("Launched off of slope.\n");
|
||||
mo->standingslope = NULL;
|
||||
|
||||
if (mo->player)
|
||||
mo->player->powers[pw_justlaunched] = 1;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue