mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Merge branch 'gachabom-rebound-noise' into 'master'
Gachabom fixups See merge request KartKrew/Kart!1577
This commit is contained in:
commit
a90d6d38c5
3 changed files with 22 additions and 1 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
#include "../p_local.h"
|
#include "../p_local.h"
|
||||||
#include "../r_main.h"
|
#include "../r_main.h"
|
||||||
#include "../tables.h"
|
#include "../tables.h"
|
||||||
|
#include "../s_sound.h"
|
||||||
|
|
||||||
/* An object may not be visible on the same tic:
|
/* An object may not be visible on the same tic:
|
||||||
1) that it spawned
|
1) that it spawned
|
||||||
|
|
@ -16,6 +17,7 @@
|
||||||
#define rebound_target(o) ((o)->target)
|
#define rebound_target(o) ((o)->target)
|
||||||
#define rebound_mode(o) ((o)->threshold)
|
#define rebound_mode(o) ((o)->threshold)
|
||||||
#define rebound_timer(o) ((o)->reactiontime)
|
#define rebound_timer(o) ((o)->reactiontime)
|
||||||
|
#define played_rebound_sound(o) ((o)->movefactor)
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
@ -65,7 +67,7 @@ bool award_target(mobj_t* mobj)
|
||||||
return true;
|
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)--;
|
rebound_timer(mobj)--;
|
||||||
|
|
||||||
|
|
@ -76,6 +78,9 @@ bool award_target(mobj_t* mobj)
|
||||||
if (player->roundconditions.gachabom_miser == 1)
|
if (player->roundconditions.gachabom_miser == 1)
|
||||||
player->roundconditions.gachabom_miser = 0;
|
player->roundconditions.gachabom_miser = 0;
|
||||||
|
|
||||||
|
//S_StartSoundAtVolume(target, sfx_grbnd3, 255/3);
|
||||||
|
S_StartSound(target, sfx_itpick);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -93,6 +98,7 @@ void chase_rebound_target(mobj_t* mobj)
|
||||||
if (distance <= travelDistance)
|
if (distance <= travelDistance)
|
||||||
{
|
{
|
||||||
rebound_mode(mobj) = static_cast<int>(Mode::kOrbit);
|
rebound_mode(mobj) = static_cast<int>(Mode::kOrbit);
|
||||||
|
S_StartSoundAtVolume(mobj, sfx_grbnd2, 255/2);
|
||||||
|
|
||||||
// Freeze
|
// Freeze
|
||||||
mobj->momx = 0;
|
mobj->momx = 0;
|
||||||
|
|
@ -116,6 +122,10 @@ void chase_rebound_target(mobj_t* mobj)
|
||||||
{
|
{
|
||||||
mobj->scalespeed = newSpeed;
|
mobj->scalespeed = newSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!played_rebound_sound(mobj))
|
||||||
|
S_StartSoundAtVolume(mobj, sfx_grbnd1, 255/2);
|
||||||
|
played_rebound_sound(mobj) = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -224,6 +234,7 @@ void Obj_SpawnGachaBomRebound(mobj_t* source, mobj_t* target)
|
||||||
|
|
||||||
rebound_mode(x) = static_cast<int>(mode);
|
rebound_mode(x) = static_cast<int>(mode);
|
||||||
rebound_timer(x) = kReboundAcceptPause;
|
rebound_timer(x) = kReboundAcceptPause;
|
||||||
|
played_rebound_sound(x) = false;
|
||||||
|
|
||||||
P_SetTarget(&rebound_target(x), target);
|
P_SetTarget(&rebound_target(x), target);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1113,6 +1113,11 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"slot04", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Seven"},
|
{"slot04", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Seven"},
|
||||||
{"slot05", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "JACKPOT!"},
|
{"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
|
// SRB2Kart - Drop target sounds
|
||||||
{"kdtrg1", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Low energy, SF_X8AWAYSOUND
|
{"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
|
{"kdtrg2", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Medium energy, SF_X8AWAYSOUND
|
||||||
|
|
|
||||||
|
|
@ -1181,6 +1181,11 @@ typedef enum
|
||||||
sfx_slot04,
|
sfx_slot04,
|
||||||
sfx_slot05,
|
sfx_slot05,
|
||||||
|
|
||||||
|
// RR - Gachabom rebound
|
||||||
|
sfx_grbnd1,
|
||||||
|
sfx_grbnd2,
|
||||||
|
sfx_grbnd3,
|
||||||
|
|
||||||
// SRB2Kart - Drop target sounds
|
// SRB2Kart - Drop target sounds
|
||||||
sfx_kdtrg1,
|
sfx_kdtrg1,
|
||||||
sfx_kdtrg2,
|
sfx_kdtrg2,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue