mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-09 00:12:56 +00:00
Merge branch 'fix-skybox-change-after-finish' into 'master'
Do not change skybox for players after they finish the race See merge request KartKrew/Kart!1115
This commit is contained in:
commit
4e149d04cf
1 changed files with 12 additions and 2 deletions
14
src/p_spec.c
14
src/p_spec.c
|
|
@ -2415,6 +2415,16 @@ static mobj_t *P_GetObjectTypeInSectorNum(mobjtype_t type, size_t s)
|
||||||
|
|
||||||
static void P_SwitchSkybox(INT32 args, player_t *player, skybox_t *skybox)
|
static void P_SwitchSkybox(INT32 args, player_t *player, skybox_t *skybox)
|
||||||
{
|
{
|
||||||
|
// After a player finishes, their camera is locked at the
|
||||||
|
// finish line. If bot behavior drives them through the
|
||||||
|
// circuit and changes the skybox, that can look very
|
||||||
|
// strange if the skybox change is intended to be
|
||||||
|
// localized to a certain section of the level.
|
||||||
|
if (player->exiting)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (args != TMS_CENTERPOINT) // Only viewpoint, or both.
|
if (args != TMS_CENTERPOINT) // Only viewpoint, or both.
|
||||||
{
|
{
|
||||||
P_SetTarget(&player->skybox.viewpoint, skybox->viewpoint);
|
P_SetTarget(&player->skybox.viewpoint, skybox->viewpoint);
|
||||||
|
|
@ -3707,7 +3717,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
||||||
else
|
else
|
||||||
set = NULL;
|
set = NULL;
|
||||||
|
|
||||||
P_SetTarget(&skybox.viewpoint, set);
|
skybox.viewpoint = set;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set centerpoint mobj
|
// set centerpoint mobj
|
||||||
|
|
@ -3718,7 +3728,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
||||||
else
|
else
|
||||||
set = NULL;
|
set = NULL;
|
||||||
|
|
||||||
P_SetTarget(&skybox.centerpoint, set);
|
skybox.centerpoint = set;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args[3]) // Applies to all players
|
if (args[3]) // Applies to all players
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue