From 6fdb743a597546cb8aaeb27b2ef70af0eff0d41b Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 27 Aug 2018 01:07:44 -0400 Subject: [PATCH] Correct remaining instances where step up/down scales with the object instead of the map --- src/p_map.c | 4 ++-- src/p_mobj.c | 2 +- src/p_user.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index 5c3e7177..03a4dc34 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2793,7 +2793,7 @@ boolean P_SceneryTryMove(mobj_t *thing, fixed_t x, fixed_t y) if (!(thing->flags & MF_NOCLIP)) { - const fixed_t maxstep = MAXSTEPMOVE; + const fixed_t maxstep = FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale); if (tmceilingz - tmfloorz < thing->height) return false; // doesn't fit @@ -3276,7 +3276,7 @@ static boolean PTR_SlideTraverse(intercept_t *in) if (opentop - slidemo->z < slidemo->height) goto isblocking; // mobj is too high - if (openbottom - slidemo->z > FixedMul(MAXSTEPMOVE, slidemo->scale)) + if (openbottom - slidemo->z > FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale)) goto isblocking; // too big a step up // this line doesn't block movement diff --git a/src/p_mobj.c b/src/p_mobj.c index 6b01f0a8..1db178da 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -7913,7 +7913,7 @@ void P_MobjThinker(mobj_t *mobj) else { mobj->flags &= ~MF_NOGRAVITY; - if (mobj->z > mobj->watertop && mobj->z - mobj->watertop < FixedMul(MAXSTEPMOVE, mobj->scale)) + if (mobj->z > mobj->watertop && mobj->z - mobj->watertop < FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale)) mobj->z = mobj->watertop; } break; diff --git a/src/p_user.c b/src/p_user.c index 53faf8f3..fabce7ef 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2978,7 +2978,7 @@ static fixed_t teeteryl, teeteryh; static boolean PIT_CheckSolidsTeeter(mobj_t *thing) // SRB2kart - unused. { fixed_t blockdist; - fixed_t tiptop = FixedMul(MAXSTEPMOVE, teeterer->scale); + fixed_t tiptop = FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale); fixed_t thingtop = thing->z + thing->height; fixed_t teeterertop = teeterer->z + teeterer->height; @@ -3095,7 +3095,7 @@ static void P_DoTeeter(player_t *player) // SRB2kart - unused. boolean roverfloor; // solid 3d floors? fixed_t floorheight, ceilingheight; fixed_t topheight, bottomheight; // for 3d floor usage - const fixed_t tiptop = FixedMul(MAXSTEPMOVE, player->mo->scale); // Distance you have to be above the ground in order to teeter. + const fixed_t tiptop = FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale); // Distance you have to be above the ground in order to teeter. if (player->mo->standingslope && player->mo->standingslope->zdelta >= (FRACUNIT/2)) // Always teeter if the slope is too steep. teeter = true; @@ -7765,8 +7765,8 @@ boolean P_LookForEnemies(player_t *player) if (mo->type == MT_DETON) // Don't be STUPID, Sonic! continue; - if (((mo->z > player->mo->z+FixedMul(MAXSTEPMOVE, player->mo->scale)) && !(player->mo->eflags & MFE_VERTICALFLIP)) - || ((mo->z+mo->height < player->mo->z+player->mo->height-FixedMul(MAXSTEPMOVE, player->mo->scale)) && (player->mo->eflags & MFE_VERTICALFLIP))) // Reverse gravity check - Flame. + if (((mo->z > player->mo->z+FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale)) && !(player->mo->eflags & MFE_VERTICALFLIP)) + || ((mo->z+mo->height < player->mo->z+player->mo->height-FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale)) && (player->mo->eflags & MFE_VERTICALFLIP))) // Reverse gravity check - Flame. continue; // Don't home upwards! if (P_AproxDistance(P_AproxDistance(player->mo->x-mo->x, player->mo->y-mo->y),