mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
On request, swapped out MT_PARTICLE dust for MT_SPINDUST dust.
This commit is contained in:
parent
1e64b096fd
commit
caeb515783
1 changed files with 17 additions and 14 deletions
31
src/p_user.c
31
src/p_user.c
|
|
@ -6541,16 +6541,18 @@ static void P_SkidStuff(player_t *player)
|
||||||
// Spawn a particle every 3 tics.
|
// Spawn a particle every 3 tics.
|
||||||
else if (!(player->skidtime % 3))
|
else if (!(player->skidtime % 3))
|
||||||
{
|
{
|
||||||
mobj_t *particle = P_SpawnMobj(player->mo->x + P_RandomRange(-player->mo->radius, player->mo->radius), player->mo->y + P_RandomRange(-player->mo->radius, player->mo->radius),
|
mobj_t *particle = P_SpawnMobjFromMobj(player->mo, P_RandomRange(-player->mo->radius, player->mo->radius), P_RandomRange(-player->mo->radius, player->mo->radius), 0, MT_SPINDUST);
|
||||||
player->mo->z + (player->mo->eflags & MFE_VERTICALFLIP ? player->mo->height - mobjinfo[MT_PARTICLE].height : 0),
|
|
||||||
MT_PARTICLE);
|
|
||||||
particle->tics = 10;
|
particle->tics = 10;
|
||||||
|
|
||||||
particle->eflags |= player->mo->eflags & MFE_VERTICALFLIP;
|
particle->destscale = (2*player->mo->scale)/3;
|
||||||
P_SetScale(particle, player->mo->scale >> 2);
|
P_SetScale(particle, particle->destscale);
|
||||||
particle->destscale = player->mo->scale << 2;
|
|
||||||
particle->scalespeed = FixedMul(particle->scalespeed, player->mo->scale); // scale the scaling speed!
|
|
||||||
P_SetObjectMomZ(particle, FRACUNIT, false);
|
P_SetObjectMomZ(particle, FRACUNIT, false);
|
||||||
|
|
||||||
|
if (player->mo->eflags & (MFE_TOUCHWATER|MFE_UNDERWATER)) // overrides fire version
|
||||||
|
P_SetMobjState(particle, S_SPINDUST_BUBBLE1);
|
||||||
|
else if (player->powers[pw_shield] == SH_ELEMENTAL)
|
||||||
|
P_SetMobjState(particle, S_SPINDUST_FIRE1);
|
||||||
|
|
||||||
S_StartSound(player->mo, sfx_s3k7e); // the proper "Knuckles eats dirt" sfx.
|
S_StartSound(player->mo, sfx_s3k7e); // the proper "Knuckles eats dirt" sfx.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -6562,16 +6564,17 @@ static void P_SkidStuff(player_t *player)
|
||||||
// Spawn a particle every 3 tics.
|
// Spawn a particle every 3 tics.
|
||||||
if (!(player->skidtime % 3))
|
if (!(player->skidtime % 3))
|
||||||
{
|
{
|
||||||
mobj_t *particle = P_SpawnMobj(player->mo->x, player->mo->y,
|
mobj_t *particle = P_SpawnMobjFromMobj(player->mo, 0, 0, 0, MT_SPINDUST);
|
||||||
player->mo->z + (player->mo->eflags & MFE_VERTICALFLIP ? player->mo->height - mobjinfo[MT_PARTICLE].height : 0),
|
|
||||||
MT_PARTICLE);
|
|
||||||
particle->tics = 10;
|
particle->tics = 10;
|
||||||
|
|
||||||
particle->eflags |= player->mo->eflags & MFE_VERTICALFLIP;
|
particle->destscale = (2*player->mo->scale)/3;
|
||||||
P_SetScale(particle, player->mo->scale >> 2);
|
P_SetScale(particle, particle->destscale);
|
||||||
particle->destscale = player->mo->scale << 2;
|
|
||||||
particle->scalespeed = FixedMul(particle->scalespeed, player->mo->scale); // scale the scaling speed!
|
|
||||||
P_SetObjectMomZ(particle, FRACUNIT, false);
|
P_SetObjectMomZ(particle, FRACUNIT, false);
|
||||||
|
|
||||||
|
if (player->mo->eflags & (MFE_TOUCHWATER|MFE_UNDERWATER)) // overrides fire version
|
||||||
|
P_SetMobjState(particle, S_SPINDUST_BUBBLE1);
|
||||||
|
else if (player->powers[pw_shield] == SH_ELEMENTAL)
|
||||||
|
P_SetMobjState(particle, S_SPINDUST_FIRE1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (P_AproxDistance(pmx, pmy) >= FixedMul(player->runspeed/2, player->mo->scale) // if you were moving faster than half your run speed last frame
|
else if (P_AproxDistance(pmx, pmy) >= FixedMul(player->runspeed/2, player->mo->scale) // if you were moving faster than half your run speed last frame
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue