mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-16 17:51:27 +00:00
Colored boom
Not tested *yet*
This commit is contained in:
parent
0bdacde45e
commit
e516d09ae4
3 changed files with 11 additions and 3 deletions
|
@ -2171,7 +2171,7 @@ void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32
|
|||
}
|
||||
|
||||
// Spawns the purely visual explosion
|
||||
void K_SpawnBobombExplosion(mobj_t *source)
|
||||
void K_SpawnBobombExplosion(mobj_t *source, UINT8 color)
|
||||
{
|
||||
INT32 i, radius, height;
|
||||
mobj_t *smoldering = P_SpawnMobj(source->x, source->y, source->z, MT_SMOLDERING);
|
||||
|
@ -2183,6 +2183,9 @@ void K_SpawnBobombExplosion(mobj_t *source)
|
|||
radius = source->radius>>FRACBITS;
|
||||
height = source->height>>FRACBITS;
|
||||
|
||||
if (!color)
|
||||
color = SKINCOLOR_RED;
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
dust = P_SpawnMobj(source->x, source->y, source->z, MT_SMOKE);
|
||||
|
@ -2202,6 +2205,7 @@ void K_SpawnBobombExplosion(mobj_t *source)
|
|||
truc->momy = P_RandomRange(-speed, speed)*FRACUNIT;
|
||||
speed = FixedMul(20*FRACUNIT, source->scale)>>FRACBITS;
|
||||
truc->momz = P_RandomRange(-speed, speed)*FRACUNIT;
|
||||
truc->color = color;
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
|
@ -2228,6 +2232,7 @@ void K_SpawnBobombExplosion(mobj_t *source)
|
|||
if (P_RandomChance(FRACUNIT/2))
|
||||
truc->momz = -truc->momz;
|
||||
truc->tics = TICRATE*2;
|
||||
truc->color = color;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ void K_SquishPlayer(player_t *player, mobj_t *source);
|
|||
void K_ExplodePlayer(player_t *player, mobj_t *source);
|
||||
void K_StealBalloon(player_t *player, player_t *victim, boolean force);
|
||||
void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 number, mobjtype_t type, angle_t rotangle, boolean spawncenter, boolean ghostit, mobj_t *source);
|
||||
void K_SpawnBobombExplosion(mobj_t *source);
|
||||
void K_SpawnBobombExplosion(mobj_t *source, UINT8 color);
|
||||
void K_SpawnDriftTrail(player_t *player);
|
||||
void K_DoMushroom(player_t *player, boolean doPFlag, boolean startboost);
|
||||
void K_DoBouncePad(mobj_t *mo, fixed_t vertispeed);
|
||||
|
|
|
@ -8270,7 +8270,10 @@ void A_BobombExplode(mobj_t *actor)
|
|||
for (d = 0; d < 16; d++)
|
||||
K_SpawnKartExplosion(actor->x, actor->y, actor->z, actor->info->painchance + 32*FRACUNIT, 32, type, d*(ANGLE_45/4), true, false, actor->target); // 32 <-> 64
|
||||
|
||||
K_SpawnBobombExplosion(actor);
|
||||
if (actor->target->player)
|
||||
K_SpawnBobombExplosion(actor, actor->target->player->skincolor);
|
||||
else
|
||||
K_SpawnBobombExplosion(actor, SKINCOLOR_RED);
|
||||
|
||||
P_SpawnMobj(actor->x, actor->y, actor->z, MT_BOMBEXPLOSIONSOUND);
|
||||
|
||||
|
|
Loading…
Reference in a new issue