mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-12 21:01:00 +00:00
Merge branch 'jimita-unfuck-awayview' into 'next'
unfuck awayview See merge request STJr/SRB2!493
This commit is contained in:
commit
2c906e9c29
2 changed files with 2 additions and 11 deletions
|
@ -6033,7 +6033,7 @@ void P_RunOverlays(void)
|
||||||
{
|
{
|
||||||
angle_t viewingangle;
|
angle_t viewingangle;
|
||||||
|
|
||||||
if (players[displayplayer].awayviewtics)
|
if (players[displayplayer].awayviewtics && players[displayplayer].awayviewmobj != NULL && !P_MobjWasRemoved(players[displayplayer].awayviewmobj))
|
||||||
viewingangle = R_PointToAngle2(mo->target->x, mo->target->y, players[displayplayer].awayviewmobj->x, players[displayplayer].awayviewmobj->y);
|
viewingangle = R_PointToAngle2(mo->target->x, mo->target->y, players[displayplayer].awayviewmobj->x, players[displayplayer].awayviewmobj->y);
|
||||||
else if (!camera.chase && players[displayplayer].mo)
|
else if (!camera.chase && players[displayplayer].mo)
|
||||||
viewingangle = R_PointToAngle2(mo->target->x, mo->target->y, players[displayplayer].mo->x, players[displayplayer].mo->y);
|
viewingangle = R_PointToAngle2(mo->target->x, mo->target->y, players[displayplayer].mo->x, players[displayplayer].mo->y);
|
||||||
|
|
11
src/p_user.c
11
src/p_user.c
|
@ -8741,14 +8741,8 @@ void P_PlayerThink(player_t *player)
|
||||||
if (player->flashcount)
|
if (player->flashcount)
|
||||||
player->flashcount--;
|
player->flashcount--;
|
||||||
|
|
||||||
// Re-fixed by Jimita (11-12-2018)
|
if (player->awayviewtics && player->awayviewtics != -1)
|
||||||
if (player->awayviewtics)
|
|
||||||
{
|
|
||||||
player->awayviewtics--;
|
player->awayviewtics--;
|
||||||
if (!player->awayviewtics)
|
|
||||||
player->awayviewtics = -1;
|
|
||||||
// The timer might've reached zero, but we'll run the remote view camera anyway by setting it to -1.
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \note do this in the cheat code
|
/// \note do this in the cheat code
|
||||||
if (player->pflags & PF_NOCLIP)
|
if (player->pflags & PF_NOCLIP)
|
||||||
|
@ -9564,9 +9558,6 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->awayviewtics < 0)
|
|
||||||
player->awayviewtics = 0;
|
|
||||||
|
|
||||||
// spectator invisibility and nogravity.
|
// spectator invisibility and nogravity.
|
||||||
if ((netgame || multiplayer) && player->spectator)
|
if ((netgame || multiplayer) && player->spectator)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue