mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Sound effects
source from the bail vfx object, so they should cancel if the effect ends early also audible to other players
This commit is contained in:
parent
fffe84fd18
commit
3cd254d947
2 changed files with 9 additions and 0 deletions
|
|
@ -13965,6 +13965,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
if ((P_PlayerInPain(player) && player->bailcharge == 1) || (grounded && P_PlayerInPain(player) && player->bailcharge == 2)) // this is brittle ..
|
||||
{
|
||||
mobj_t *bail = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + player->mo->height/2, MT_BAILCHARGE);
|
||||
S_StartSound(bail, sfx_gshb9);
|
||||
P_SetTarget(&bail->target, player->mo);
|
||||
bail->renderflags |= RF_FULLBRIGHT; // set fullbright here, were gonna animate frames in the thinker and it saves us from setting FF_FULLBRIGHT every frame
|
||||
}
|
||||
|
|
@ -13979,6 +13980,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
player->bailcharge = 0;
|
||||
|
||||
mobj_t *bail = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + player->mo->height/2, MT_BAIL);
|
||||
S_StartSound(bail, sfx_kc33);
|
||||
P_SetTarget(&bail->target, player->mo);
|
||||
|
||||
UINT32 debtrings = 20;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include "../info.h"
|
||||
#include "../k_kart.h"
|
||||
#include "../p_local.h"
|
||||
#include "../s_sound.h"
|
||||
|
||||
void Obj_BailThink (mobj_t *aura)
|
||||
{
|
||||
|
|
@ -56,6 +57,12 @@ void Obj_BailChargeThink (mobj_t *aura)
|
|||
mobj_t *mo = aura->target;
|
||||
player_t *player = mo->player;
|
||||
|
||||
// play sound
|
||||
if (aura->target->player->bailcharge == 34 || aura->target->player->bailcharge == 34)
|
||||
{
|
||||
S_StartSound(aura, sfx_kc4e);
|
||||
}
|
||||
|
||||
// Follow player
|
||||
aura->flags &= ~(MF_NOCLIPTHING);
|
||||
P_MoveOrigin(aura, mo->x, mo->y, mo->z + mo->height/2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue