oops this gets directly called in one instance
also why do we keep checking for null mobj when P_MobjWasRemoved checks that anyways?
This commit is contained in:
1 parent
840aff38f2
commit
af9ba7ef41
2 files changed
+10
-9
No files matched your search
+9
-5
@@ -3357,6 +3357,12 @@ static void K_QuiteSaltyHop(player_t *p)
|
||||
#define SLOPEROLL_DIV 3
|
||||
void K_RollMobjBySlopes(mobj_t* mo, boolean usedistance)
|
||||
{
|
||||
if (P_MobjWasRemoved(mo))
|
||||
return;
|
||||
|
||||
I_Assert(mo->subsector != NULL);
|
||||
I_Assert(mo->subsector->sector != NULL);
|
||||
|
||||
// lifted from hw_md2
|
||||
if (mo->standingslope)
|
||||
{
|
||||
@@ -6762,7 +6768,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||
|
||||
K_KartDrift(player, onground);
|
||||
|
||||
if ((!player->kartstuff[k_aizdriftstrat])||(!P_IsObjectOnGround(player->mo))||(player->kartstuff[k_drift]))
|
||||
if ((!player->kartstuff[k_aizdriftstrat]) || (!P_IsObjectOnGround(player->mo)) || (player->kartstuff[k_drift]))
|
||||
{
|
||||
if (player->sliproll && (player->sliproll > 0))
|
||||
player->sliproll -= (4*ANG1);
|
||||
@@ -6776,10 +6782,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||
player->mo->spriteyscale = player->mo->realyscale;
|
||||
}
|
||||
|
||||
if (cv_spriteroll.value && cv_sloperoll.value)
|
||||
if (cv_sloperoll.value && !player->mo->salty_jump) // seeing a character rotate mid-hop looks really janky
|
||||
{
|
||||
if ((!player->mo->salty_jump)) // seeing a character rotate mid-hop looks really janky
|
||||
K_RollMobjBySlopes(player->mo, (cv_sloperolldist.value && !splitscreen));
|
||||
K_RollMobjBySlopes(player->mo, (cv_sloperolldist.value && !splitscreen));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6787,7 +6792,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||
player->mo->slopepitch = FixedAngle(0);
|
||||
}
|
||||
|
||||
|
||||
// Quick Turning
|
||||
// You can't turn your kart when you're not moving.
|
||||
// So now it's time to burn some rubber!
|
||||
|
||||
+1
-4
@@ -6073,12 +6073,9 @@ static void P_KoopaThinker(mobj_t *koopa)
|
||||
//
|
||||
void P_RollPitchMobj(mobj_t* mobj)
|
||||
{
|
||||
if (!mobj || P_MobjWasRemoved(mobj))
|
||||
if (P_MobjWasRemoved(mobj))
|
||||
return;
|
||||
|
||||
I_Assert(mo->subsector != NULL);
|
||||
I_Assert(mo->subsector->sector != NULL);
|
||||
|
||||
if (cv_sloperoll.value != 2)
|
||||
{
|
||||
mobj->sloperoll = FixedAngle(0);
|
||||
|
||||
Reference in new issue
Block a user