mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +00:00
Offroad effect fixes
- Make dust retain some of your speed so it's more visible - Only play effect when moving and on the ground
This commit is contained in:
parent
4590d5c5cf
commit
555deddb6a
1 changed files with 8 additions and 1 deletions
|
@ -1626,7 +1626,7 @@ static void K_GetKartBoostPower(player_t *player)
|
||||||
boostpower = 4*boostpower/5;
|
boostpower = 4*boostpower/5;
|
||||||
|
|
||||||
// Banana drag/offroad dust
|
// Banana drag/offroad dust
|
||||||
if (boostpower < FRACUNIT)
|
if (boostpower < FRACUNIT && player->mo && P_IsObjectOnGround(player->mo) && player->speed > 0)
|
||||||
{
|
{
|
||||||
K_SpawnWipeoutTrail(player->mo, true);
|
K_SpawnWipeoutTrail(player->mo, true);
|
||||||
if (leveltime % 6 == 0)
|
if (leveltime % 6 == 0)
|
||||||
|
@ -2660,6 +2660,13 @@ void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent)
|
||||||
P_SetScale(dust, mo->scale);
|
P_SetScale(dust, mo->scale);
|
||||||
dust->eflags = (dust->eflags & ~MFE_VERTICALFLIP)|(mo->eflags & MFE_VERTICALFLIP); // not K_MatchGenericExtraFlags because hyudoro shouldn't be able to wipeout
|
dust->eflags = (dust->eflags & ~MFE_VERTICALFLIP)|(mo->eflags & MFE_VERTICALFLIP); // not K_MatchGenericExtraFlags because hyudoro shouldn't be able to wipeout
|
||||||
|
|
||||||
|
if (translucent) // offroad effect
|
||||||
|
{
|
||||||
|
dust->momx = mo->momx/2;
|
||||||
|
dust->momy = mo->momy/2;
|
||||||
|
dust->momz = mo->momz/2;
|
||||||
|
}
|
||||||
|
|
||||||
if (translucent)
|
if (translucent)
|
||||||
dust->flags2 |= MF2_SHADOW;
|
dust->flags2 |= MF2_SHADOW;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue