Merge branch 'chengi-video' into 'master'

Chengi Video

See merge request KartKrew/Kart!2156
This commit is contained in:
James R. 2024-03-25 02:45:30 +00:00
commit 779108175f
3 changed files with 19 additions and 5 deletions

View file

@ -1171,7 +1171,7 @@ consvar_t cv_fov[MAXSPLITSCREENPLAYERS] = {
Player("fov4", "90").floating_point().min_max(60*FRACUNIT, 179*FRACUNIT).onchange(Fov_OnChange).dont_save(),
};
consvar_t cv_freecam_speed = Player("freecam_speed", "1").min_max(1, 10).dont_save();
consvar_t cv_freecam_speed = Player("freecam_speed", "1").min_max(-64, 10).dont_save();
void I_JoyScale(void);
void I_JoyScale2(void);

View file

@ -1279,6 +1279,11 @@ void F_GameEvaluationDrawer(void)
}
}
#ifdef DEVELOP
if (cv_soundtest.value > EVAL_MAX)
return;
#endif
V_DrawCenteredGamemodeString(
BASEVIDWIDTH/2,
15,

View file

@ -2948,10 +2948,15 @@ void P_DemoCameraMovement(camera_t *cam, UINT8 num)
cam->angle += turning;
// camera movement:
if (!cam->button_a_held)
if (!cam->button_a_held && cv_freecam_speed.value)
{
int dir = ((cmd->buttons & BT_ACCELERATE) ? 1 : 0) + ((cmd->buttons & BT_BRAKE) ? -1 : 0);
fixed_t spd = 32*mapobjectscale*cv_freecam_speed.value;
fixed_t spd = 32*mapobjectscale;
if (cv_freecam_speed.value > 1)
spd *= cv_freecam_speed.value;
else if (cv_freecam_speed.value < -1)
spd /= -cv_freecam_speed.value;
switch (dir)
{
@ -3029,9 +3034,13 @@ void P_DemoCameraMovement(camera_t *cam, UINT8 num)
cam->momx = cam->momy = cam->momz = 0;
if (cmd->forwardmove != 0)
if (cmd->forwardmove != 0 && cv_freecam_speed.value)
{
fixed_t spd = cmd->forwardmove*mapobjectscale*cv_freecam_speed.value;
fixed_t spd = cmd->forwardmove*mapobjectscale;
if (cv_freecam_speed.value > 1)
spd *= cv_freecam_speed.value;
else if (cv_freecam_speed.value < -1)
spd /= -cv_freecam_speed.value;
thrustangle = cam->angle >> ANGLETOFINESHIFT;