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.
This commit is contained in:
toaster 2018-10-01 13:25:13 +01:00
parent 14a5ffbfd8
commit 379772e5aa
2 changed files with 5 additions and 4 deletions

View file

@ -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;

View file

@ -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