* Make autobrake scaled to low-friction surfaces.

* Make rope hangs change how they handle the player's angle a little more organically.
This commit is contained in:
toasterbabe 2017-09-15 20:34:46 +01:00
parent 725e015a19
commit d44a36c8fe
1 changed files with 11 additions and 5 deletions

View File

@ -9756,12 +9756,14 @@ void P_PlayerThink(player_t *player)
case CR_PLAYER: case CR_PLAYER:
player->drawangle = (player->mo->tracer->player ? player->mo->tracer->player->drawangle : player->mo->tracer->angle); player->drawangle = (player->mo->tracer->player ? player->mo->tracer->player->drawangle : player->mo->tracer->angle);
break; break;
/* -- in case we wanted to have the camera freely movable during zoom tube style stuff /* -- in case we wanted to have the camera freely movable during zoom tubes
case CR_ZOOMTUBE: case CR_ZOOMTUBE:*/
case CR_ROPEHANG: case CR_ROPEHANG:
player->drawangle = R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy); if (player->mo->momx || player->mo->momy)
break; {
*/ player->drawangle = R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy);
break;
}
default: default:
player->drawangle = player->mo->angle; player->drawangle = player->mo->angle;
break; break;
@ -9831,6 +9833,9 @@ void P_PlayerThink(player_t *player)
if (!currentlyonground) if (!currentlyonground)
acceleration /= 2; acceleration /= 2;
if (player->mo->movefactor != FRACUNIT) // Friction-scaled acceleration...
acceleration = FixedMul(acceleration<<FRACBITS, player->mo->movefactor)>>FRACBITS;
P_Thrust(player->mo, moveAngle, -acceleration); P_Thrust(player->mo, moveAngle, -acceleration);
} }
@ -9847,6 +9852,7 @@ void P_PlayerThink(player_t *player)
if (player->powers[pw_pushing]) if (player->powers[pw_pushing])
player->powers[pw_pushing]--; player->powers[pw_pushing]--;
player->mo->movefactor = FRACUNIT; // We're not going to do any more with this, so let's change it back for the next frame. player->mo->movefactor = FRACUNIT; // We're not going to do any more with this, so let's change it back for the next frame.
// Unset statis flags after moving. // Unset statis flags after moving.