mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-18 11:32:24 +00:00
Make sneaker panels push you in spinout AGAIN LOL
The old condition for player movement was... 1. player hasn't finished 2. player not in pain, or player in pain but on the ground The else condition to this is therefore player has finished or player in pain and in the air. I believe K_MomentumToFacing (prior to bots) was only for letting the player turn around after crossing the finish line, to face the camera. (K_MomentumToFacing also does nothing in the air.)
This commit is contained in:
parent
e5a9bfc968
commit
88a8a09516
3 changed files with 15 additions and 19 deletions
|
|
@ -2309,7 +2309,7 @@ SINT8 K_GetForwardMove(player_t *player)
|
|||
return forwardmove;
|
||||
}
|
||||
|
||||
fixed_t K_3dKartMovement(player_t *player, boolean onground)
|
||||
fixed_t K_3dKartMovement(player_t *player)
|
||||
{
|
||||
const fixed_t accelmax = 4000;
|
||||
const fixed_t p_speed = K_GetKartSpeed(player, true);
|
||||
|
|
@ -2319,8 +2319,6 @@ fixed_t K_3dKartMovement(player_t *player, boolean onground)
|
|||
fixed_t orig = ORIG_FRICTION;
|
||||
SINT8 forwardmove = K_GetForwardMove(player);
|
||||
|
||||
if (!onground) return 0; // If the player isn't on the ground, there is no change in speed
|
||||
|
||||
if (K_PlayerUsesBotMovement(player))
|
||||
{
|
||||
orig = K_BotFrictionRubberband(player, ORIG_FRICTION);
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower);
|
|||
fixed_t K_GetKartAccel(player_t *player);
|
||||
UINT16 K_GetKartFlashing(player_t *player);
|
||||
SINT8 K_GetForwardMove(player_t *player);
|
||||
fixed_t K_3dKartMovement(player_t *player, boolean onground);
|
||||
fixed_t K_3dKartMovement(player_t *player);
|
||||
boolean K_PlayerEBrake(player_t *player);
|
||||
void K_AdjustPlayerFriction(player_t *player);
|
||||
void K_MoveKartPlayer(player_t *player, boolean onground);
|
||||
|
|
|
|||
28
src/p_user.c
28
src/p_user.c
|
|
@ -1930,26 +1930,24 @@ static void P_3dMovement(player_t *player)
|
|||
K_AdjustPlayerFriction(player);
|
||||
|
||||
// Forward movement
|
||||
if (!P_PlayerInPain(player))
|
||||
// If the player isn't on the ground, there is no change in speed
|
||||
// Smiley Face
|
||||
if (onground)
|
||||
{
|
||||
if (onground)
|
||||
movepushforward = K_3dKartMovement(player);
|
||||
|
||||
if (player->mo->movefactor != FRACUNIT) // Friction-scaled acceleration...
|
||||
movepushforward = FixedMul(movepushforward, player->mo->movefactor);
|
||||
|
||||
totalthrust.x += P_ReturnThrustX(player->mo, movepushangle, movepushforward);
|
||||
totalthrust.y += P_ReturnThrustY(player->mo, movepushangle, movepushforward);
|
||||
|
||||
if (K_PlayerUsesBotMovement(player) == true)
|
||||
{
|
||||
movepushforward = K_3dKartMovement(player, onground);
|
||||
|
||||
if (player->mo->movefactor != FRACUNIT) // Friction-scaled acceleration...
|
||||
movepushforward = FixedMul(movepushforward, player->mo->movefactor);
|
||||
|
||||
totalthrust.x += P_ReturnThrustX(player->mo, movepushangle, movepushforward);
|
||||
totalthrust.y += P_ReturnThrustY(player->mo, movepushangle, movepushforward);
|
||||
K_MomentumToFacing(player);
|
||||
}
|
||||
}
|
||||
|
||||
if ((!P_PlayerInPain(player) && !onground)
|
||||
|| (K_PlayerUsesBotMovement(player) == true))
|
||||
{
|
||||
K_MomentumToFacing(player);
|
||||
}
|
||||
|
||||
if ((totalthrust.x || totalthrust.y)
|
||||
&& player->mo->standingslope && (!(player->mo->standingslope->flags & SL_NOPHYSICS)) && abs(player->mo->standingslope->zdelta) > FRACUNIT/2) {
|
||||
// Factor thrust to slope, but only for the part pushing up it!
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue