From 379772e5aa941c17e7105d953413b2d09365a7d8 Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 1 Oct 2018 13:25:13 +0100 Subject: [PATCH] Allow respawning spectators before starttime is up because they no longer spawn in a condition that allows them to get an unfair advantage (drop dash or its ghetto 2.0-esque predecessor) Also, some camera tweaks: * Force chasecam when exiting, just like it's forced when you're dead and not a spectator. * Force a horizontal camera angle aiming when spectator and dead, to avoid skybox bugs. --- src/p_user.c | 7 ++++--- src/r_main.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index d3407bd6..7646ca6d 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -7915,7 +7915,7 @@ static void P_DeathThink(player_t *player) /*if (player->deadtimer > 30*TICRATE && !G_RaceGametype()) player->playerstate = PST_REBORN; else if (player->lives > 0 && !G_IsSpecialStage(gamemap)*/ - if (player->lives > 0 && leveltime >= starttime) // *could* you respawn? + if (player->lives > 0 /*&& leveltime >= starttime*/) // *could* you respawn? { // SRB2kart - spawn automatically after 1 second if (player->deadtimer > ((netgame || multiplayer) @@ -8681,9 +8681,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall { // Don't let the camera match your movement. thiscam->momz = 0; - + if (player->spectator) + thiscam->aiming = 0; // Only let the camera go a little bit downwards. - if (!(mo->eflags & MFE_VERTICALFLIP) && thiscam->aiming < ANGLE_337h && thiscam->aiming > ANGLE_180) + else if (!(mo->eflags & MFE_VERTICALFLIP) && thiscam->aiming < ANGLE_337h && thiscam->aiming > ANGLE_180) thiscam->aiming = ANGLE_337h; else if (mo->eflags & MFE_VERTICALFLIP && thiscam->aiming > ANGLE_22h && thiscam->aiming < ANGLE_180) thiscam->aiming = ANGLE_22h; diff --git a/src/r_main.c b/src/r_main.c index 5990224c..5da98c8e 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1094,7 +1094,7 @@ void R_SetupFrame(player_t *player, boolean skybox) chasecam = (cv_chasecam.value != 0); } - if (player->climbing || (player->pflags & PF_NIGHTSMODE) || player->playerstate == PST_DEAD) + if (player->playerstate == PST_DEAD || player->exiting) chasecam = true; // force chasecam on else if (player->spectator) // no spectator chasecam chasecam = false; // force chasecam off