mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-tiregrease-offroad' into 'master'
Apply tiregrease exception to offroad TERRAIN See merge request KartKrew/Kart!866
This commit is contained in:
commit
9a1c377e30
1 changed files with 11 additions and 11 deletions
22
src/k_kart.c
22
src/k_kart.c
|
|
@ -1045,10 +1045,6 @@ static fixed_t K_CheckOffroadCollide(mobj_t *mo)
|
|||
I_Assert(mo != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(mo));
|
||||
|
||||
// If tiregrease is active, don't
|
||||
if (mo->player && mo->player->tiregrease)
|
||||
return 0;
|
||||
|
||||
for (node = mo->touching_sectorlist; node; node = node->m_sectorlist_next)
|
||||
{
|
||||
if (!node->m_sector)
|
||||
|
|
@ -1103,14 +1099,18 @@ static void K_UpdateOffroad(player_t *player)
|
|||
terrain_t *terrain = player->mo->terrain;
|
||||
fixed_t offroadstrength = 0;
|
||||
|
||||
// TODO: Make this use actual special touch code.
|
||||
if (terrain != NULL && terrain->offroad > 0)
|
||||
// If tiregrease is active, don't
|
||||
if (player->tiregrease == 0)
|
||||
{
|
||||
offroadstrength = (terrain->offroad << FRACBITS);
|
||||
}
|
||||
else
|
||||
{
|
||||
offroadstrength = K_CheckOffroadCollide(player->mo);
|
||||
// TODO: Make this use actual special touch code.
|
||||
if (terrain != NULL && terrain->offroad > 0)
|
||||
{
|
||||
offroadstrength = (terrain->offroad << FRACBITS);
|
||||
}
|
||||
else
|
||||
{
|
||||
offroadstrength = K_CheckOffroadCollide(player->mo);
|
||||
}
|
||||
}
|
||||
|
||||
// If you are in offroad, a timer starts.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue