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!
This commit is contained in:
Sally Coolatta 2021-12-24 13:00:12 -05:00 committed by SinnamonLat
parent bfaefe4ee5
commit b9cc482c53
5 changed files with 14 additions and 14 deletions

View file

@ -5877,7 +5877,7 @@ static void K_CalculateBananaSlope(mobj_t *mobj, fixed_t x, fixed_t y, fixed_t z
} }
//mobj->standingslope = slope; //mobj->standingslope = slope;
P_InitPitchRollFromSlope(mobj, slope); P_SetPitchRollFromSlope(mobj, slope);
} }
// Move the hnext chain! // Move the hnext chain!

View file

@ -527,8 +527,8 @@ boolean P_CheckMissileSpawn(mobj_t *th);
void P_Thrust(mobj_t *mo, angle_t angle, fixed_t move); void P_Thrust(mobj_t *mo, angle_t angle, fixed_t move);
void P_ExplodeMissile(mobj_t *mo); void P_ExplodeMissile(mobj_t *mo);
void P_CheckGravity(mobj_t *mo, boolean affect); void P_CheckGravity(mobj_t *mo, boolean affect);
void P_InitPitchRollFromSlope(mobj_t *mo, pslope_t *slope); void P_SetPitchRollFromSlope(mobj_t *mo, pslope_t *slope);
void P_InitPitchRoll(mobj_t *mo, angle_t pitch, angle_t yaw); 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_ScaleFromMap(fixed_t n, fixed_t scale);
fixed_t P_GetMobjHead(const mobj_t *); fixed_t P_GetMobjHead(const mobj_t *);
fixed_t P_GetMobjFeet(const mobj_t *); fixed_t P_GetMobjFeet(const mobj_t *);

View file

@ -2686,7 +2686,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
if (thing->momz <= 0) if (thing->momz <= 0)
{ {
thing->standingslope = tmfloorslope; thing->standingslope = tmfloorslope;
P_InitPitchRollFromSlope(thing, thing->standingslope); P_SetPitchRollFromSlope(thing, thing->standingslope);
if (thing->momz == 0 && thing->player && !startingonground) if (thing->momz == 0 && thing->player && !startingonground)
P_PlayerHitFloor(thing->player, true); 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) if (thing->momz >= 0)
{ {
thing->standingslope = tmceilingslope; thing->standingslope = tmceilingslope;
P_InitPitchRollFromSlope(thing, thing->standingslope); P_SetPitchRollFromSlope(thing, thing->standingslope);
if (thing->momz == 0 && thing->player && !startingonground) if (thing->momz == 0 && thing->player && !startingonground)
P_PlayerHitFloor(thing->player, true); P_PlayerHitFloor(thing->player, true);

View file

@ -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) 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); pitch = InvAngle(pitch);
yaw >>= ANGLETOFINESHIFT; yaw >>= ANGLETOFINESHIFT;
@ -1671,7 +1671,7 @@ void P_XYMovement(mobj_t *mo)
{ {
mo->momz = transfermomz; mo->momz = transfermomz;
mo->standingslope = NULL; mo->standingslope = NULL;
P_InitPitchRoll(mo, ANGLE_90, P_SetPitchRoll(mo, ANGLE_90,
transferslope->xydirection transferslope->xydirection
+ (transferslope->zangle + (transferslope->zangle
& ANGLE_180)); & ANGLE_180));
@ -1753,7 +1753,7 @@ void P_XYMovement(mobj_t *mo)
// Now compare the Zs of the different quantizations // 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 if (oldangle-newangle > ANG30 && oldangle-newangle < ANGLE_180) { // Allow for a bit of sticking - this value can be adjusted later
mo->standingslope = oldslope; mo->standingslope = oldslope;
P_InitPitchRollFromSlope(mo, mo->standingslope); P_SetPitchRollFromSlope(mo, mo->standingslope);
P_SlopeLaunch(mo); P_SlopeLaunch(mo);
//CONS_Printf("launched off of slope - "); //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)) if (((mo->eflags & MFE_VERTICALFLIP) ? tmceilingslope : tmfloorslope) && (mo->type != MT_STEAM))
{ {
mo->standingslope = (mo->eflags & MFE_VERTICALFLIP) ? tmceilingslope : tmfloorslope; mo->standingslope = (mo->eflags & MFE_VERTICALFLIP) ? tmceilingslope : tmfloorslope;
P_InitPitchRollFromSlope(mo, mo->standingslope); P_SetPitchRollFromSlope(mo, mo->standingslope);
P_ReverseQuantizeMomentumToSlope(&mom, mo->standingslope); P_ReverseQuantizeMomentumToSlope(&mom, mo->standingslope);
} }

View file

@ -898,7 +898,7 @@ void P_HandleSlopeLanding(mobj_t *thing, pslope_t *slope)
if (P_MobjFlip(thing)*(thing->momz) < 0) // falling, land on slope if (P_MobjFlip(thing)*(thing->momz) < 0) // falling, land on slope
{ {
thing->standingslope = slope; thing->standingslope = slope;
P_InitPitchRollFromSlope(thing, slope); P_SetPitchRollFromSlope(thing, slope);
thing->momz = -P_MobjFlip(thing); thing->momz = -P_MobjFlip(thing);
} }
return; return;
@ -914,7 +914,7 @@ void P_HandleSlopeLanding(mobj_t *thing, pslope_t *slope)
thing->momx = mom.x; thing->momx = mom.x;
thing->momy = mom.y; thing->momy = mom.y;
thing->standingslope = slope; thing->standingslope = slope;
P_InitPitchRollFromSlope(thing, slope); P_SetPitchRollFromSlope(thing, slope);
thing->momz = -P_MobjFlip(thing); thing->momz = -P_MobjFlip(thing);
} }
} }