mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-17 23:21:05 +00:00
Merge branch 'wipeout-particle-tweak' into 'next'
Wipeout particle tweak See merge request KartKrew/Kart-Public!84
This commit is contained in:
commit
592ae58c79
1 changed files with 14 additions and 1 deletions
15
src/k_kart.c
15
src/k_kart.c
|
@ -2773,11 +2773,24 @@ void K_SpawnSparkleTrail(mobj_t *mo)
|
|||
void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent)
|
||||
{
|
||||
mobj_t *dust;
|
||||
angle_t aoff;
|
||||
|
||||
I_Assert(mo != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(mo));
|
||||
|
||||
dust = P_SpawnMobj(mo->x + (P_RandomRange(-25,25) * mo->scale), mo->y + (P_RandomRange(-25,25) * mo->scale), mo->z, MT_WIPEOUTTRAIL);
|
||||
if (mo->player)
|
||||
aoff = (mo->player->frameangle + ANGLE_180);
|
||||
else
|
||||
aoff = (mo->angle + ANGLE_180);
|
||||
|
||||
if ((leveltime / 2) & 1)
|
||||
aoff -= ANGLE_45;
|
||||
else
|
||||
aoff += ANGLE_45;
|
||||
|
||||
dust = P_SpawnMobj(mo->x + FixedMul(24*mo->scale, FINECOSINE(aoff>>ANGLETOFINESHIFT)) + (P_RandomRange(-8,8) << FRACBITS),
|
||||
mo->y + FixedMul(24*mo->scale, FINESINE(aoff>>ANGLETOFINESHIFT)) + (P_RandomRange(-8,8) << FRACBITS),
|
||||
mo->z, MT_WIPEOUTTRAIL);
|
||||
|
||||
P_SetTarget(&dust->target, mo);
|
||||
dust->angle = R_PointToAngle2(0,0,mo->momx,mo->momy);
|
||||
|
|
Loading…
Reference in a new issue