From 6c13ddca01d32489367b5182995400a35c47d8f0 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Fri, 24 Dec 2021 13:00:12 -0500 Subject: [PATCH] Rename PitchRoll stuff back I did a find+replace because I realized the functions I added were named too similar to other ones & to make the purpose more obvious ... but it ended up changing them too anyway! Gah! --- src/k_kart.c | 2 +- src/p_local.h | 4 ++-- src/p_map.c | 4 ++-- src/p_mobj.c | 14 +++++++------- src/p_slopes.c | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 4bc39f590..2dacce0ef 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -5877,7 +5877,7 @@ static void K_CalculateBananaSlope(mobj_t *mobj, fixed_t x, fixed_t y, fixed_t z } //mobj->standingslope = slope; - P_InitPitchRollFromSlope(mobj, slope); + P_SetPitchRollFromSlope(mobj, slope); } // Move the hnext chain! diff --git a/src/p_local.h b/src/p_local.h index 0b71554da..51a43b639 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -527,8 +527,8 @@ boolean P_CheckMissileSpawn(mobj_t *th); void P_Thrust(mobj_t *mo, angle_t angle, fixed_t move); void P_ExplodeMissile(mobj_t *mo); void P_CheckGravity(mobj_t *mo, boolean affect); -void P_InitPitchRollFromSlope(mobj_t *mo, pslope_t *slope); -void P_InitPitchRoll(mobj_t *mo, angle_t pitch, angle_t yaw); +void P_SetPitchRollFromSlope(mobj_t *mo, pslope_t *slope); +void P_SetPitchRoll(mobj_t *mo, angle_t pitch, angle_t yaw); fixed_t P_ScaleFromMap(fixed_t n, fixed_t scale); fixed_t P_GetMobjHead(const mobj_t *); fixed_t P_GetMobjFeet(const mobj_t *); diff --git a/src/p_map.c b/src/p_map.c index 883eac52a..7899a0964 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2686,7 +2686,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) if (thing->momz <= 0) { thing->standingslope = tmfloorslope; - P_InitPitchRollFromSlope(thing, thing->standingslope); + P_SetPitchRollFromSlope(thing, thing->standingslope); if (thing->momz == 0 && thing->player && !startingonground) P_PlayerHitFloor(thing->player, true); @@ -2699,7 +2699,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) if (thing->momz >= 0) { thing->standingslope = tmceilingslope; - P_InitPitchRollFromSlope(thing, thing->standingslope); + P_SetPitchRollFromSlope(thing, thing->standingslope); if (thing->momz == 0 && thing->player && !startingonground) P_PlayerHitFloor(thing->player, true); diff --git a/src/p_mobj.c b/src/p_mobj.c index 7bba60fa3..c8b1ca4d0 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1231,9 +1231,9 @@ void P_CheckGravity(mobj_t *mo, boolean affect) } // -// P_InitPitchRollFromSlope +// P_SetPitchRollFromSlope // -void P_InitPitchRollFromSlope(mobj_t *mo, pslope_t *slope) +void P_SetPitchRollFromSlope(mobj_t *mo, pslope_t *slope) { if (slope) { @@ -1251,9 +1251,9 @@ void P_InitPitchRollFromSlope(mobj_t *mo, pslope_t *slope) } // -// P_InitPitchRoll +// P_SetPitchRoll // -void P_InitPitchRoll(mobj_t *mo, angle_t pitch, angle_t yaw) +void P_SetPitchRoll(mobj_t *mo, angle_t pitch, angle_t yaw) { pitch = InvAngle(pitch); yaw >>= ANGLETOFINESHIFT; @@ -1671,7 +1671,7 @@ void P_XYMovement(mobj_t *mo) { mo->momz = transfermomz; mo->standingslope = NULL; - P_InitPitchRoll(mo, ANGLE_90, + P_SetPitchRoll(mo, ANGLE_90, transferslope->xydirection + (transferslope->zangle & ANGLE_180)); @@ -1753,7 +1753,7 @@ void P_XYMovement(mobj_t *mo) // Now compare the Zs of the different quantizations if (oldangle-newangle > ANG30 && oldangle-newangle < ANGLE_180) { // Allow for a bit of sticking - this value can be adjusted later mo->standingslope = oldslope; - P_InitPitchRollFromSlope(mo, mo->standingslope); + P_SetPitchRollFromSlope(mo, mo->standingslope); P_SlopeLaunch(mo); //CONS_Printf("launched off of slope - "); @@ -2277,7 +2277,7 @@ boolean P_ZMovement(mobj_t *mo) if (((mo->eflags & MFE_VERTICALFLIP) ? tmceilingslope : tmfloorslope) && (mo->type != MT_STEAM)) { mo->standingslope = (mo->eflags & MFE_VERTICALFLIP) ? tmceilingslope : tmfloorslope; - P_InitPitchRollFromSlope(mo, mo->standingslope); + P_SetPitchRollFromSlope(mo, mo->standingslope); P_ReverseQuantizeMomentumToSlope(&mom, mo->standingslope); } diff --git a/src/p_slopes.c b/src/p_slopes.c index b60e5e348..1bde8f4ee 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -898,7 +898,7 @@ void P_HandleSlopeLanding(mobj_t *thing, pslope_t *slope) if (P_MobjFlip(thing)*(thing->momz) < 0) // falling, land on slope { thing->standingslope = slope; - P_InitPitchRollFromSlope(thing, slope); + P_SetPitchRollFromSlope(thing, slope); thing->momz = -P_MobjFlip(thing); } return; @@ -914,7 +914,7 @@ void P_HandleSlopeLanding(mobj_t *thing, pslope_t *slope) thing->momx = mom.x; thing->momy = mom.y; thing->standingslope = slope; - P_InitPitchRollFromSlope(thing, slope); + P_SetPitchRollFromSlope(thing, slope); thing->momz = -P_MobjFlip(thing); } }