Have Minus rotate in mid-air

This commit is contained in:
lachwright 2019-11-24 22:29:26 +08:00
parent d99e3f8337
commit 9a7979d841
4 changed files with 23 additions and 25 deletions

View file

@ -4969,14 +4969,10 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_MINUS_BURST4",
"S_MINUS_BURST5",
"S_MINUS_POPUP",
"S_MINUS_UPWARD1",
"S_MINUS_UPWARD2",
"S_MINUS_UPWARD3",
"S_MINUS_UPWARD4",
"S_MINUS_DOWNWARD1",
"S_MINUS_DOWNWARD2",
"S_MINUS_DOWNWARD3",
"S_MINUS_DOWNWARD4",
"S_MINUS_AERIAL1",
"S_MINUS_AERIAL2",
"S_MINUS_AERIAL3",
"S_MINUS_AERIAL4",
// Minus dirt
"S_MINUSDIRT1",

View file

@ -1074,15 +1074,11 @@ state_t states[NUMSTATES] =
{SPR_MNUD, 2|FF_ANIMATE, 5, {NULL}, 1, 2, S_MINUS_BURST4}, // S_MINUS_BURST3
{SPR_MNUD, 3|FF_ANIMATE, 5, {NULL}, 1, 2, S_MINUS_BURST5}, // S_MINUS_BURST4
{SPR_MNUD, 4|FF_ANIMATE, 5, {NULL}, 1, 2, S_MINUSDIRT2}, // S_MINUS_BURST5
{SPR_MNUS, 3, 1, {A_MinusPopup}, 0, 0, S_MINUS_UPWARD1}, // S_MINUS_POPUP
{SPR_MNUS, 0, 1, {A_MinusCheck}, 0, 0, S_MINUS_UPWARD2}, // S_MINUS_UPWARD1
{SPR_MNUS, 1, 1, {A_MinusCheck}, 0, 0, S_MINUS_UPWARD3}, // S_MINUS_UPWARD2
{SPR_MNUS, 2, 1, {A_MinusCheck}, 0, 0, S_MINUS_UPWARD4}, // S_MINUS_UPWARD3
{SPR_MNUS, 3, 1, {A_MinusCheck}, 0, 0, S_MINUS_UPWARD1}, // S_MINUS_UPWARD4
{SPR_MNUS, 4, 1, {A_MinusCheck}, 0, 0, S_MINUS_DOWNWARD2}, // S_MINUS_DOWNWARD1
{SPR_MNUS, 5, 1, {A_MinusCheck}, 0, 0, S_MINUS_DOWNWARD3}, // S_MINUS_DOWNWARD2
{SPR_MNUS, 6, 1, {A_MinusCheck}, 0, 0, S_MINUS_DOWNWARD4}, // S_MINUS_DOWNWARD3
{SPR_MNUS, 7, 1, {A_MinusCheck}, 0, 0, S_MINUS_DOWNWARD1}, // S_MINUS_DOWNWARD4
{SPR_MNUS, 3, 1, {A_MinusPopup}, 0, 0, S_MINUS_AERIAL1}, // S_MINUS_POPUP
{SPR_MNUS, 0, 1, {A_MinusCheck}, 0, 0, S_MINUS_AERIAL2}, // S_MINUS_AERIAL1
{SPR_MNUS, 1, 1, {A_MinusCheck}, 0, 0, S_MINUS_AERIAL3}, // S_MINUS_AERIAL2
{SPR_MNUS, 2, 1, {A_MinusCheck}, 0, 0, S_MINUS_AERIAL4}, // S_MINUS_AERIAL3
{SPR_MNUS, 3, 1, {A_MinusCheck}, 0, 0, S_MINUS_AERIAL1}, // S_MINUS_AERIAL4
{SPR_MNUD, FF_ANIMATE, 6, {NULL}, 1, 5, S_MINUSDIRT2}, // S_MINUSDIRT1
{SPR_MNUD, 5, 8, {NULL}, 3, 5, S_MINUSDIRT3}, // S_MINUSDIRT2

View file

@ -1270,14 +1270,10 @@ typedef enum state
S_MINUS_BURST4,
S_MINUS_BURST5,
S_MINUS_POPUP,
S_MINUS_UPWARD1,
S_MINUS_UPWARD2,
S_MINUS_UPWARD3,
S_MINUS_UPWARD4,
S_MINUS_DOWNWARD1,
S_MINUS_DOWNWARD2,
S_MINUS_DOWNWARD3,
S_MINUS_DOWNWARD4,
S_MINUS_AERIAL1,
S_MINUS_AERIAL2,
S_MINUS_AERIAL3,
S_MINUS_AERIAL4,
// Minus dirt
S_MINUSDIRT1,

View file

@ -9709,6 +9709,16 @@ void P_MobjThinker(mobj_t *mobj)
#undef DRAGONTURNSPEED
}
break;
case MT_MINUS:
#ifdef ROTSPRITE
{
if (P_IsObjectOnGround(mobj))
mobj->rollangle = 0;
else
mobj->rollangle = R_PointToAngle2(0, 0, mobj->momz, (mobj->scale << 1) - min(abs(mobj->momz), mobj->scale << 1));
}
#endif
break;
case MT_SPINFIRE:
if (mobj->flags & MF_NOGRAVITY)
{