Reduce wall transfer tilting and make it only affect the player

This commit is contained in:
NepDisk 2025-04-09 20:03:24 -04:00
parent 036a87f0a2
commit dede660e89
4 changed files with 35 additions and 18 deletions

View file

@ -3387,7 +3387,7 @@ void K_DoBoost(player_t *player, fixed_t speedboost, fixed_t accelboost, boolean
player->boostinfo.nonstackspeedboost = max(player->boostinfo.nonstackspeedboost, speedboost);
if (cv_kartstacking_accelstack.value)
if (cv_kartstacking_accelstack.value && stackingactive)
{
player->boostinfo.accelboost += accelboost;
}

View file

@ -1733,10 +1733,6 @@ void P_XYMovement(mobj_t *mo)
mo->momz = transfermomz;
mo->standingslope = NULL;
mo->terrain = NULL;
P_SetPitchRoll(mo, ANGLE_90,
transferslope->xydirection
+ (transferslope->zangle
& ANGLE_180));
}
}
}

View file

@ -3668,15 +3668,26 @@ Quaketilt (player_t *player)
static angle_t P_GetCameraPitchRollAngle(mobj_t *mobj, player_t *viewPlayer)
{
angle_t viewingAngle = R_PointToAnglePlayer(viewPlayer, mobj->x, mobj->y);
fixed_t pitchMul = -FINESINE(viewingAngle >> ANGLETOFINESHIFT);
fixed_t rollMul = FINECOSINE(viewingAngle >> ANGLETOFINESHIFT);
angle_t viewingAngle, rollOrPitch;
angle_t sloperolll = mobj->slopepitch;
angle_t slopepitch = mobj->sloperoll;
fixed_t pitchMul, rollMul;
angle_t rollOrPitch = FixedMul(mobj->pitch + sloperolll, pitchMul) + FixedMul(mobj->roll + slopepitch, rollMul);
if (mobj->player && cv_sloperoll.value)
{
// We are the player, use camera for air tilting.
viewingAngle = R_PointToAnglePlayer(viewPlayer, mobj->x, mobj->y);
}
else
{
// Regular Mobjs don't air tilt.
viewingAngle = mobj->angle;
}
pitchMul = -FINESINE(viewingAngle >> ANGLETOFINESHIFT);
rollMul = FINECOSINE(viewingAngle >> ANGLETOFINESHIFT);
rollOrPitch = FixedMul(mobj->pitch + sloperolll, pitchMul) + FixedMul(mobj->roll + slopepitch, rollMul);
return rollOrPitch;
}

View file

@ -23,13 +23,24 @@ fixed_t rollsinang[ROTANGLES];
angle_t R_GetPitchRollAngle(mobj_t *mobj, player_t *viewPlayer)
{
angle_t viewingAngle = R_PointToAnglePlayer(viewPlayer, mobj->x, mobj->y);
fixed_t pitchMul = -FINESINE(viewingAngle >> ANGLETOFINESHIFT);
fixed_t rollMul = FINECOSINE(viewingAngle >> ANGLETOFINESHIFT);
angle_t viewingAngle, rollOrPitch;
angle_t sloperolll = mobj->slopepitch;
angle_t slopepitch = mobj->sloperoll;
fixed_t pitchMul, rollMul;
if (mobj->player)
{
// We are the player, use camera for air tilting.
viewingAngle = R_PointToAnglePlayer(viewPlayer, mobj->x, mobj->y);
}
else
{
// Regular Mobjs don't air tilt.
viewingAngle = mobj->angle;
}
pitchMul = -FINESINE(viewingAngle >> ANGLETOFINESHIFT);
rollMul = FINECOSINE(viewingAngle >> ANGLETOFINESHIFT);
if (!cv_sloperoll.value || (mobj->player && (mobj->player->pogospring > 0)))
{
@ -37,7 +48,7 @@ angle_t R_GetPitchRollAngle(mobj_t *mobj, player_t *viewPlayer)
slopepitch = 0;
}
angle_t rollOrPitch = FixedMul(mobj->pitch + sloperolll, pitchMul) + FixedMul(mobj->roll + slopepitch, rollMul);
rollOrPitch = FixedMul(mobj->pitch + sloperolll, pitchMul) + FixedMul(mobj->roll + slopepitch, rollMul);
return rollOrPitch;
}
@ -65,7 +76,6 @@ static angle_t R_PlayerSpriteRotation(player_t *player, player_t *viewPlayer)
rollAngle = 0;
}
return rollAngle;
}