mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-31 20:22:40 +00:00
Faster z speed in the air
This commit is contained in:
parent
4004bffa5d
commit
7e8a42c4a0
3 changed files with 41 additions and 1 deletions
|
|
@ -310,6 +310,7 @@ typedef enum
|
|||
khud_boostcam, // Camera push forward on boost
|
||||
khud_destboostcam, // Ditto
|
||||
khud_timeovercam, // Camera timer for leaving behind or not
|
||||
khud_aircam, // Camera follows vertically better in the air
|
||||
|
||||
// Sounds
|
||||
khud_enginesnd, // Engine sound offset this player is using.
|
||||
|
|
|
|||
29
src/k_kart.c
29
src/k_kart.c
|
|
@ -8537,6 +8537,35 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
//CONS_Printf("cam: %d, dest: %d\n", player->karthud[khud_boostcam], player->karthud[khud_destboostcam]);
|
||||
}
|
||||
|
||||
if (onground)
|
||||
{
|
||||
if (player->karthud[khud_aircam] > 0)
|
||||
{
|
||||
player->karthud[khud_aircam] -= FRACUNIT / 5;
|
||||
|
||||
if (player->karthud[khud_aircam] < 0)
|
||||
{
|
||||
player->karthud[khud_aircam] = 0;
|
||||
}
|
||||
|
||||
//CONS_Printf("cam: %f\n", FixedToFloat(player->karthud[khud_aircam]));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->karthud[khud_aircam] < FRACUNIT)
|
||||
{
|
||||
player->karthud[khud_aircam] += FRACUNIT / TICRATE;
|
||||
|
||||
if (player->karthud[khud_aircam] > FRACUNIT)
|
||||
{
|
||||
player->karthud[khud_aircam] = FRACUNIT;
|
||||
}
|
||||
|
||||
//CONS_Printf("cam: %f\n", FixedToFloat(player->karthud[khud_aircam]));
|
||||
}
|
||||
}
|
||||
|
||||
// Make ABSOLUTELY SURE that your flashing tics don't get set WHILE you're still in hit animations.
|
||||
if (player->spinouttimer != 0)
|
||||
{
|
||||
|
|
|
|||
12
src/p_user.c
12
src/p_user.c
|
|
@ -70,6 +70,7 @@
|
|||
#include "k_endcam.h"
|
||||
#include "k_credits.h"
|
||||
#include "k_hud.h" // K_AddMessage
|
||||
#include "m_easing.h"
|
||||
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_light.h"
|
||||
|
|
@ -3458,6 +3459,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
if (mo->standingslope)
|
||||
{
|
||||
pitch = (angle_t)FixedMul(P_ReturnThrustX(mo, thiscam->angle - mo->standingslope->xydirection, FRACUNIT), (fixed_t)mo->standingslope->zangle);
|
||||
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
{
|
||||
if (pitch >= ANGLE_180)
|
||||
|
|
@ -3469,6 +3471,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
pitch = 0;
|
||||
}
|
||||
}
|
||||
|
||||
pitch = thiscam->pitch + (angle_t)FixedMul(pitch - thiscam->pitch, camspeed/4);
|
||||
|
||||
if (rendermode == render_opengl && !cv_glshearing.value)
|
||||
|
|
@ -3559,7 +3562,14 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
{
|
||||
thiscam->momx = x - thiscam->x;
|
||||
thiscam->momy = y - thiscam->y;
|
||||
thiscam->momz = FixedMul(z - thiscam->z, camspeed*3/5);
|
||||
|
||||
fixed_t z_speed = Easing_Linear(
|
||||
player->karthud[khud_aircam],
|
||||
camspeed * 3 / 5,
|
||||
camspeed
|
||||
);
|
||||
|
||||
thiscam->momz = FixedMul(z - thiscam->z, z_speed);
|
||||
}
|
||||
|
||||
thiscam->pan = pan;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue