mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Also center non-NiGHTS players on NiGHTS bumpers
This commit is contained in:
parent
6010822c84
commit
baa4c30e99
1 changed files with 12 additions and 14 deletions
26
src/p_user.c
26
src/p_user.c
|
|
@ -6174,20 +6174,6 @@ static void P_NiGHTSMovement(player_t *player)
|
||||||
// S_StartSound(NULL, sfx_timeup); // that creepy "out of time" music from NiGHTS. Dummied out, as some on the dev team thought it wasn't Sonic-y enough (Mystic, notably). Uncomment to restore. -SH
|
// S_StartSound(NULL, sfx_timeup); // that creepy "out of time" music from NiGHTS. Dummied out, as some on the dev team thought it wasn't Sonic-y enough (Mystic, notably). Uncomment to restore. -SH
|
||||||
S_ChangeMusicInternal((((maptol & TOL_NIGHTS) && !G_IsSpecialStage(gamemap)) ? "_ntime" : "_drown"), false);
|
S_ChangeMusicInternal((((maptol & TOL_NIGHTS) && !G_IsSpecialStage(gamemap)) ? "_ntime" : "_drown"), false);
|
||||||
|
|
||||||
|
|
||||||
if (player->bumpertime == TICRATE/2)
|
|
||||||
{
|
|
||||||
// Center player to bumper here because if you try to set player's position in P_TouchSpecialThing case MT_NIGHTSBUMPER,
|
|
||||||
// that position is fudged in the time between that routine in the previous tic
|
|
||||||
// and reaching here in the current tic
|
|
||||||
P_UnsetThingPosition(player->mo);
|
|
||||||
player->mo->x = player->mo->hnext->x;
|
|
||||||
player->mo->y = player->mo->hnext->y;
|
|
||||||
player->mo->z = player->mo->hnext->z + FixedMul(player->mo->hnext->height/4, player->mo->hnext->scale);
|
|
||||||
P_SetThingPosition(player->mo);
|
|
||||||
P_SetTarget(&player->mo->hnext, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player->mo->z < player->mo->floorz)
|
if (player->mo->z < player->mo->floorz)
|
||||||
player->mo->z = player->mo->floorz;
|
player->mo->z = player->mo->floorz;
|
||||||
|
|
||||||
|
|
@ -9821,7 +9807,19 @@ void P_PlayerThink(player_t *player)
|
||||||
P_ResetScore(player);
|
P_ResetScore(player);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (player->bumpertime == TICRATE/2 && player->mo->hnext)
|
||||||
|
{
|
||||||
|
// Center player to NiGHTS bumper here because if you try to set player's position in
|
||||||
|
// P_TouchSpecialThing case MT_NIGHTSBUMPER, that position is fudged in the time
|
||||||
|
// between that routine in the previous tic
|
||||||
|
// and reaching here in the current tic
|
||||||
|
P_TeleportMove(player->mo, player->mo->hnext->x, player->mo->hnext->y
|
||||||
|
, player->mo->hnext->z + FixedMul(player->mo->hnext->height/4, player->mo->hnext->scale));
|
||||||
|
P_SetTarget(&player->mo->hnext, NULL);
|
||||||
|
}
|
||||||
P_MovePlayer(player);
|
P_MovePlayer(player);
|
||||||
|
}
|
||||||
|
|
||||||
if (!player->mo)
|
if (!player->mo)
|
||||||
return; // P_MovePlayer removed player->mo.
|
return; // P_MovePlayer removed player->mo.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue