mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-27 10:22:32 +00:00
Gachabom fixups
This commit is contained in:
parent
9c585e35de
commit
31fbb29b88
3 changed files with 21 additions and 1 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include "../p_local.h"
|
||||
#include "../r_main.h"
|
||||
#include "../tables.h"
|
||||
#include "../s_sound.h"
|
||||
|
||||
/* An object may not be visible on the same tic:
|
||||
1) that it spawned
|
||||
|
|
@ -16,6 +17,7 @@
|
|||
#define rebound_target(o) ((o)->target)
|
||||
#define rebound_mode(o) ((o)->threshold)
|
||||
#define rebound_timer(o) ((o)->reactiontime)
|
||||
#define played_rebound_sound(o) ((o)->movefactor)
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
@ -65,7 +67,7 @@ bool award_target(mobj_t* mobj)
|
|||
return true;
|
||||
}
|
||||
|
||||
if ((player->itemtype == KITEM_GACHABOM || player->itemtype == KITEM_NONE) && !player->itemRoulette.active)
|
||||
if ((player->itemtype == KITEM_GACHABOM || player->itemtype == KITEM_NONE) && !player->itemRoulette.active && !player->instaWhipCharge)
|
||||
{
|
||||
rebound_timer(mobj)--;
|
||||
|
||||
|
|
@ -75,6 +77,9 @@ bool award_target(mobj_t* mobj)
|
|||
player->itemamount++;
|
||||
if (player->roundconditions.gachabom_miser == 1)
|
||||
player->roundconditions.gachabom_miser = 0;
|
||||
|
||||
//S_StartSoundAtVolume(target, sfx_grbnd3, 255/3);
|
||||
S_StartSound(target, sfx_itpick);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -93,6 +98,7 @@ void chase_rebound_target(mobj_t* mobj)
|
|||
if (distance <= travelDistance)
|
||||
{
|
||||
rebound_mode(mobj) = static_cast<int>(Mode::kOrbit);
|
||||
S_StartSoundAtVolume(mobj, sfx_grbnd2, 255/2);
|
||||
|
||||
// Freeze
|
||||
mobj->momx = 0;
|
||||
|
|
@ -116,6 +122,10 @@ void chase_rebound_target(mobj_t* mobj)
|
|||
{
|
||||
mobj->scalespeed = newSpeed;
|
||||
}
|
||||
|
||||
if (!played_rebound_sound(mobj))
|
||||
S_StartSoundAtVolume(mobj, sfx_grbnd1, 255/2);
|
||||
played_rebound_sound(mobj) = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1113,6 +1113,11 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"slot04", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Seven"},
|
||||
{"slot05", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "JACKPOT!"},
|
||||
|
||||
// RR - Gachabom rebound
|
||||
{"grbnd1", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Gachabom returning"},
|
||||
{"grbnd2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Gachabom orbiting"},
|
||||
{"grbnd3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Gachabom re-collected"},
|
||||
|
||||
// SRB2Kart - Drop target sounds
|
||||
{"kdtrg1", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Low energy, SF_X8AWAYSOUND
|
||||
{"kdtrg2", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Medium energy, SF_X8AWAYSOUND
|
||||
|
|
|
|||
|
|
@ -1181,6 +1181,11 @@ typedef enum
|
|||
sfx_slot04,
|
||||
sfx_slot05,
|
||||
|
||||
// RR - Gachabom rebound
|
||||
sfx_grbnd1,
|
||||
sfx_grbnd2,
|
||||
sfx_grbnd3,
|
||||
|
||||
// SRB2Kart - Drop target sounds
|
||||
sfx_kdtrg1,
|
||||
sfx_kdtrg2,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue