mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'tutorial-starposts' into 'master'
Fix checkpoint animation in Tutorial Closes #1483 See merge request kart-krew-dev/ring-racers-internal!2654
This commit is contained in:
commit
89fae73f0c
1 changed files with 8 additions and 8 deletions
|
|
@ -664,14 +664,6 @@ void Obj_CrossCheckpoints(player_t* player, fixed_t old_x, fixed_t old_y)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->position <= 1)
|
|
||||||
{
|
|
||||||
angle_t direction = R_PointToAngle2(old_x, old_y, player->mo->x, player->mo->y);
|
|
||||||
fixed_t speed_multiplier = FixedDiv(player->speed, K_GetKartSpeed(player, false, false));
|
|
||||||
chk->twirl(direction, speed_multiplier);
|
|
||||||
chk->other()->twirl(direction, speed_multiplier);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gametyperules & GTR_CHECKPOINTS)
|
if (gametyperules & GTR_CHECKPOINTS)
|
||||||
{
|
{
|
||||||
for (Checkpoint* chk : g_checkpoints)
|
for (Checkpoint* chk : g_checkpoints)
|
||||||
|
|
@ -684,6 +676,14 @@ void Obj_CrossCheckpoints(player_t* player, fixed_t old_x, fixed_t old_y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player->position <= 1)
|
||||||
|
{
|
||||||
|
angle_t direction = R_PointToAngle2(old_x, old_y, player->mo->x, player->mo->y);
|
||||||
|
fixed_t speed_multiplier = FixedDiv(player->speed, K_GetKartSpeed(player, false, false));
|
||||||
|
chk->twirl(direction, speed_multiplier);
|
||||||
|
chk->other()->twirl(direction, speed_multiplier);
|
||||||
|
}
|
||||||
|
|
||||||
S_StartSound(player->mo, sfx_s3k63);
|
S_StartSound(player->mo, sfx_s3k63);
|
||||||
|
|
||||||
player->checkpointId = chk->id();
|
player->checkpointId = chk->id();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue