mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +00:00
Fireworks carry momentum, UFOs spawn fireworks
This commit is contained in:
parent
ac64290cc7
commit
15b05f6e75
1 changed files with 15 additions and 0 deletions
|
@ -504,6 +504,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
mobj_t *firework = P_SpawnMobj(special->x, special->y, special->z, MT_KARMAFIREWORK);
|
||||
firework->momx = (special->target->momx + toucher->momx) / 2;
|
||||
firework->momy = (special->target->momy + toucher->momy) / 2;
|
||||
firework->momz = (special->target->momz + toucher->momz) / 2;
|
||||
P_Thrust(firework, FixedAngle((72*i)<<FRACBITS), P_RandomRange(1,8)*special->scale);
|
||||
P_SetObjectMomZ(firework, P_RandomRange(1,8)*special->scale, false);
|
||||
firework->color = special->target->color;
|
||||
|
@ -638,6 +641,18 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
player->kartstuff[k_itemroulette] = 1;
|
||||
player->kartstuff[k_roulettetype] = 1;
|
||||
|
||||
// Karma fireworks
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
mobj_t *firework = P_SpawnMobj(special->x, special->y, special->z, MT_KARMAFIREWORK);
|
||||
firework->momx = toucher->momx;
|
||||
firework->momy = toucher->momy;
|
||||
firework->momz = toucher->momz;
|
||||
P_Thrust(firework, FixedAngle((72*i)<<FRACBITS), P_RandomRange(1,8)*special->scale);
|
||||
P_SetObjectMomZ(firework, P_RandomRange(1,8)*special->scale, false);
|
||||
firework->color = special->target->color;
|
||||
}
|
||||
|
||||
S_StartSound(toucher, sfx_cdfm73); // they don't make this sound in the original game but it's nice to have a "reward" for good play
|
||||
|
||||
//special->momx = special->momy = special->momz = 0;
|
||||
|
|
Loading…
Reference in a new issue