mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-01 19:26:11 +00:00
Fix springs giving you way too many
(Also removed a bunch of instances of PF_SPINNING since we haven't used it)
This commit is contained in:
parent
672c4fb763
commit
861cb8e144
6 changed files with 6 additions and 45 deletions
|
|
@ -5726,17 +5726,6 @@ void A_CrawlaCommanderThink(mobj_t *actor)
|
|||
|
||||
dist = P_AproxDistance(actor->x - actor->target->x, actor->y - actor->target->y);
|
||||
|
||||
if (actor->target->player && (!hovermode || actor->reactiontime <= 2*TICRATE))
|
||||
{
|
||||
if (dist < FixedMul(64<<(FRACBITS+(hovermode ? 1 : 0)), actor->scale)
|
||||
&& ((actor->target->player->pflags & PF_JUMPED) || (actor->target->player->pflags & PF_SPINNING)))
|
||||
{
|
||||
// Auugh! She's trying to kill you! Strafe! STRAAAAFFEEE!!
|
||||
P_InstaThrust(actor, actor->angle - ANGLE_180, FixedMul(20*FRACUNIT, actor->scale));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (locvar1)
|
||||
{
|
||||
if (actor->health < 2 && P_RandomChance(FRACUNIT/128))
|
||||
|
|
|
|||
|
|
@ -1277,7 +1277,7 @@ static void P_XYFriction(mobj_t *mo, fixed_t oldx, fixed_t oldy)
|
|||
player = mo->player;
|
||||
if (player) // valid only if player avatar
|
||||
{
|
||||
if (FixedHypot(player->rmomx, player->rmomy) < FixedMul(STOPSPEED, mo->scale) && K_GetForwardMove(player) == 0
|
||||
if (FixedHypot(player->rmomx, player->rmomy) < FixedMul(STOPSPEED, mo->scale) && (K_GetForwardMove(player) == 0)
|
||||
&& !(player->mo->standingslope && (!(player->mo->standingslope->flags & SL_NOPHYSICS)) /*&& (abs(player->mo->standingslope->zdelta) >= FRACUNIT/2)*/))
|
||||
{
|
||||
// if in a walking frame, stop moving
|
||||
|
|
@ -1289,7 +1289,7 @@ static void P_XYFriction(mobj_t *mo, fixed_t oldx, fixed_t oldy)
|
|||
mo->momx = player->cmomx;
|
||||
mo->momy = player->cmomy;
|
||||
}
|
||||
else if (!(mo->eflags & MFE_SPRUNG))
|
||||
else
|
||||
{
|
||||
mo->momx = FixedMul(mo->momx, mo->friction);
|
||||
mo->momy = FixedMul(mo->momy, mo->friction);
|
||||
|
|
@ -1628,8 +1628,6 @@ void P_XYMovement(mobj_t *mo)
|
|||
if (player)
|
||||
{
|
||||
player->powers[pw_justlaunched] = 2;
|
||||
if (player->pflags & PF_SPINNING)
|
||||
player->pflags |= PF_THOKKED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -844,13 +844,6 @@ static void Polyobj_slideThing(mobj_t *mo, fixed_t dx, fixed_t dy)
|
|||
dx = FixedMul(dx, FRACUNIT - mo->friction);
|
||||
dy = FixedMul(dy, FRACUNIT - mo->friction);
|
||||
|
||||
if (mo->player->pflags & PF_SPINNING && (mo->player->rmomx || mo->player->rmomy) && !(mo->player->pflags & PF_STARTDASH)) {
|
||||
#define SPINMULT 5184 // Consider this a substitute for properly calculating FRACUNIT-friction. I'm tired. -Red
|
||||
dx = FixedMul(dx, SPINMULT);
|
||||
dy = FixedMul(dy, SPINMULT);
|
||||
#undef SPINMULT
|
||||
}
|
||||
|
||||
mo->momx += dx;
|
||||
mo->momy += dy;
|
||||
|
||||
|
|
|
|||
|
|
@ -934,8 +934,8 @@ void P_ButteredSlope(mobj_t *mo)
|
|||
return;
|
||||
|
||||
// Changed in kart to only not apply physics on very slight slopes (I think about 4 degree angles)
|
||||
if (abs(mo->standingslope->zdelta) < FRACUNIT/21 && !(mo->player->pflags & PF_SPINNING))
|
||||
return; // Don't slide on non-steep slopes unless spinning
|
||||
if (abs(mo->standingslope->zdelta) < FRACUNIT/21)
|
||||
return; // Don't slide on non-steep slopes
|
||||
|
||||
// This only means you can be stopped on slopes that aren't steeper than 45 degrees
|
||||
if (abs(mo->standingslope->zdelta) < FRACUNIT/2 && !(mo->player->rmomx || mo->player->rmomy))
|
||||
|
|
|
|||
|
|
@ -7023,9 +7023,7 @@ static void P_DoScrollMove(mobj_t *thing, fixed_t dx, fixed_t dy, INT32 exclusiv
|
|||
}
|
||||
}
|
||||
|
||||
if (thing->player && (thing->player->pflags & PF_SPINNING) && (thing->player->rmomx || thing->player->rmomy) && !(thing->player->pflags & PF_STARTDASH))
|
||||
fuckaj = FixedDiv(549*ORIG_FRICTION,500*FRACUNIT);
|
||||
else if (thing->friction != ORIG_FRICTION)
|
||||
if (thing->friction != ORIG_FRICTION)
|
||||
fuckaj = thing->friction;
|
||||
|
||||
if (fuckaj) {
|
||||
|
|
|
|||
19
src/p_user.c
19
src/p_user.c
|
|
@ -286,9 +286,7 @@ boolean P_PlayerMoving(INT32 pnum)
|
|||
return gamestate == GS_LEVEL && p->mo && p->mo->health > 0
|
||||
&& (abs(p->rmomx) >= FixedMul(FRACUNIT/2, p->mo->scale)
|
||||
|| abs(p->rmomy) >= FixedMul(FRACUNIT/2, p->mo->scale)
|
||||
|| abs(p->mo->momz) >= FixedMul(FRACUNIT/2, p->mo->scale)
|
||||
|| p->climbing || p->powers[pw_tailsfly]
|
||||
|| (p->pflags & PF_JUMPED) || (p->pflags & PF_SPINNING));
|
||||
|| abs(p->mo->momz) >= FixedMul(FRACUNIT/2, p->mo->scale));
|
||||
}
|
||||
|
||||
// P_GetNextEmerald
|
||||
|
|
@ -1514,24 +1512,9 @@ static void P_CheckBustableBlocks(player_t *player)
|
|||
if (rover->flags & FF_SHATTER)
|
||||
goto bust;
|
||||
|
||||
// If it's an FF_SPINBUST, you can break it if you are in your spinning frames
|
||||
// (either from jumping or spindashing).
|
||||
if (rover->flags & FF_SPINBUST
|
||||
&& (((player->pflags & PF_SPINNING) && !(player->pflags & PF_STARTDASH))
|
||||
|| (player->pflags & PF_JUMPED && !(player->pflags & PF_NOJUMPDAMAGE))))
|
||||
goto bust;
|
||||
|
||||
if (rover->flags & FF_STRONGBUST)
|
||||
continue;
|
||||
|
||||
// If it's not an FF_STRONGBUST, you can break if you are spinning (and not jumping)
|
||||
// or you are super
|
||||
// or you are recording for Metal Sonic
|
||||
if (!((player->pflags & PF_SPINNING) && !(player->pflags & PF_JUMPED))
|
||||
&& !(player->powers[pw_super])
|
||||
&& !metalrecording)
|
||||
continue;
|
||||
|
||||
bust:
|
||||
topheight = P_GetFOFTopZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
||||
bottomheight = P_GetFOFBottomZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue