fix eggbox crap
:chaosleep:
This commit is contained in:
1 parent
2ea14f6b79
commit
da81a0c0c2
2 files changed
+40
-35
No files matched your search
@@ -3568,27 +3568,6 @@ static INT32 K_StairJankFlip(INT32 value)
|
||||
return K_AltFlip(value, 2);
|
||||
}
|
||||
|
||||
// reset banan and eggbox rollangle when they´re on the ground
|
||||
// if not cv_bananthrowroll option "+Onground"
|
||||
static void K_ResetBananaRollangle(mobj_t* mo)
|
||||
{
|
||||
if (!mo->rollangle)
|
||||
return;
|
||||
|
||||
if (mo->type != MT_BANANA && mo->type != MT_EGGMANITEM) // always reset eggboxes
|
||||
return;
|
||||
|
||||
// keep banans "rotated" if we want them to
|
||||
if (mo->type == MT_BANANA && cv_bananthrowroll.value == 2)
|
||||
return;
|
||||
|
||||
// only reset if on ground
|
||||
if (!P_IsObjectOnGround(mo))
|
||||
return;
|
||||
|
||||
mo->rollangle = 0;
|
||||
}
|
||||
|
||||
#define SLOPEROLL_DIV 3
|
||||
void K_RollMobjBySlopes(mobj_t* mo, pslope_t *slope)
|
||||
{
|
||||
@@ -3602,9 +3581,6 @@ void K_RollMobjBySlopes(mobj_t* mo, pslope_t *slope)
|
||||
I_Assert(mo->subsector != NULL);
|
||||
I_Assert(mo->subsector->sector != NULL);
|
||||
|
||||
// kinda stupid but idk where else to put this
|
||||
K_ResetBananaRollangle(mo);
|
||||
|
||||
if (!K_ShouldSlopeRoll(mo))
|
||||
{
|
||||
mo->pitch_sprite = mo->roll_sprite = 0;
|
||||
|
||||
+40
-11
@@ -767,6 +767,45 @@ void R_UpdateMobjInterpolators(void)
|
||||
}
|
||||
}
|
||||
|
||||
// reset banan and eggbox rollangle when they´re on the ground
|
||||
// if not cv_bananthrowroll option "+Onground"
|
||||
static void R_ResetBananaRollangle(mobj_t* mobj)
|
||||
{
|
||||
if (!mobj->rollangle)
|
||||
return;
|
||||
|
||||
if (mobj->type != MT_BANANA && mobj->type != MT_EGGMANITEM) // always reset eggboxes
|
||||
return;
|
||||
|
||||
// keep banans "rotated" if we want them to
|
||||
if (mobj->type == MT_BANANA && cv_bananthrowroll.value == 2)
|
||||
return;
|
||||
|
||||
// only reset if on ground
|
||||
if (!P_IsObjectOnGround(mobj))
|
||||
return;
|
||||
|
||||
mobj->rollangle = 0;
|
||||
}
|
||||
|
||||
// Reset our Sprite scales and offsets
|
||||
// at the start of the tic
|
||||
// this is just to make things simpler
|
||||
// as we dont have to reset it ourselves after use
|
||||
// done at the start so lua can still overwrite everything
|
||||
static void R_ResetMobjSpriteStuff(mobj_t *mobj)
|
||||
{
|
||||
mobj->spritexscale = mobj->realxscale;
|
||||
mobj->spriteyscale = mobj->realyscale;
|
||||
mobj->spritexoffset = mobj->realxoffset;
|
||||
mobj->spriteyoffset = mobj->realyoffset;
|
||||
|
||||
mobj->temprollangle = 0;
|
||||
|
||||
// kinda stupid but idk where else to put this
|
||||
R_ResetBananaRollangle(mobj);
|
||||
}
|
||||
|
||||
//
|
||||
// P_ResetMobjInterpolationState
|
||||
//
|
||||
@@ -805,19 +844,9 @@ void R_ResetMobjInterpolationState(mobj_t *mobj)
|
||||
mobj->player->old_frameangle = mobj->player->frameangle;
|
||||
}
|
||||
|
||||
// Reset our Sprite scales and offsets
|
||||
// at the start of the tic
|
||||
// this is just to make things simpler
|
||||
// as we dont have to reset it ourselves after use
|
||||
// done at the start so lua can still overwrite everything
|
||||
|
||||
// technically not interpolation related
|
||||
// but this saves us another thinkerloop and multiple checks lel
|
||||
mobj->spritexscale = mobj->realxscale;
|
||||
mobj->spriteyscale = mobj->realyscale;
|
||||
mobj->spritexoffset = mobj->realxoffset;
|
||||
mobj->spriteyoffset = mobj->realyoffset;
|
||||
mobj->temprollangle = 0;
|
||||
R_ResetMobjSpriteStuff(mobj);
|
||||
|
||||
mobj->resetinterp = false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user