mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Award amps for kitchen sink
This commit is contained in:
parent
4a8723bba4
commit
9dbc6771c0
2 changed files with 6 additions and 0 deletions
|
|
@ -1121,6 +1121,9 @@ boolean K_KitchenSinkCollide(mobj_t *t1, mobj_t *t2)
|
|||
|
||||
S_StartSound(NULL, sfx_bsnipe); // let all players hear it.
|
||||
|
||||
if (t1->target && !P_MobjWasRemoved(t1->target) && t1->target->player)
|
||||
K_SpawnAmps(t1->target->player, 50, t2);
|
||||
|
||||
HU_SetCEchoFlags(0);
|
||||
HU_SetCEchoDuration(5);
|
||||
HU_DoCEcho(va("%s\\was hit by a kitchen sink.\\\\\\\\", player_names[t2->player-players]));
|
||||
|
|
|
|||
|
|
@ -4253,6 +4253,9 @@ void K_SpawnAmps(player_t *player, UINT8 amps, mobj_t *impact)
|
|||
if (amps == 0)
|
||||
return;
|
||||
|
||||
if (!player->mo && P_MobjWasRemoved(player->mo))
|
||||
return;
|
||||
|
||||
UINT32 itemdistance = min(FRACUNIT-1, K_GetItemRouletteDistance(player, D_NumPlayersInRace())); // cap this to FRACUNIT-1, so it doesn't wrap when turning it into fixed_t
|
||||
fixed_t itemdistmult = FRACUNIT + min(FRACUNIT, (itemdistance<<FRACBITS) / MAXAMPSCALINGDIST);
|
||||
UINT16 scaledamps = min(amps, amps * (10 + (9-player->kartspeed) - (9-player->kartweight)) / 10);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue