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
|
@ -278,6 +278,7 @@ typedef enum
|
||||||
pw_nights_linkfreeze,
|
pw_nights_linkfreeze,
|
||||||
|
|
||||||
pw_nocontrol, //for linedef exec 427
|
pw_nocontrol, //for linedef exec 427
|
||||||
|
pw_justlaunched, // Launched off a slope this tic (0=none, 1=standard launch, 2=half-pipe launch)
|
||||||
|
|
||||||
NUMPOWERS
|
NUMPOWERS
|
||||||
} powertype_t;
|
} powertype_t;
|
||||||
|
|
|
@ -9134,7 +9134,8 @@ static const char *const POWERS_LIST[] = {
|
||||||
"NIGHTS_LINKFREEZE",
|
"NIGHTS_LINKFREEZE",
|
||||||
|
|
||||||
//for linedef exec 427
|
//for linedef exec 427
|
||||||
"NOCONTROL"
|
"NOCONTROL",
|
||||||
|
"JUSTLAUNCHED",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *const HUDITEMS_LIST[] = {
|
static const char *const HUDITEMS_LIST[] = {
|
||||||
|
|
|
@ -1997,10 +1997,14 @@ void P_XYMovement(mobj_t *mo)
|
||||||
{
|
{
|
||||||
mo->momz = transfermomz;
|
mo->momz = transfermomz;
|
||||||
mo->standingslope = NULL;
|
mo->standingslope = NULL;
|
||||||
if (player && (player->pflags & PF_SPINNING))
|
if (player)
|
||||||
|
{
|
||||||
|
player->powers[pw_justlaunched] = 2;
|
||||||
|
if (player->pflags & PF_SPINNING)
|
||||||
player->pflags |= PF_THOKKED;
|
player->pflags |= PF_THOKKED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (mo->type == MT_SPINFIRE)
|
else if (mo->type == MT_SPINFIRE)
|
||||||
|
@ -3922,6 +3926,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
||||||
// Needed for gravity boots
|
// Needed for gravity boots
|
||||||
P_CheckGravity(mobj, false);
|
P_CheckGravity(mobj, false);
|
||||||
|
|
||||||
|
mobj->player->powers[pw_justlaunched] = 0;
|
||||||
if (mobj->momx || mobj->momy)
|
if (mobj->momx || mobj->momy)
|
||||||
{
|
{
|
||||||
P_XYMovement(mobj);
|
P_XYMovement(mobj);
|
||||||
|
|
|
@ -726,6 +726,9 @@ void P_SlopeLaunch(mobj_t *mo)
|
||||||
|
|
||||||
//CONS_Printf("Launched off of slope.\n");
|
//CONS_Printf("Launched off of slope.\n");
|
||||||
mo->standingslope = NULL;
|
mo->standingslope = NULL;
|
||||||
|
|
||||||
|
if (mo->player)
|
||||||
|
mo->player->powers[pw_justlaunched] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue