mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add Tyron's invinc/grow blocked hit sfx
This commit is contained in:
parent
9ddf10c9a5
commit
d496e0f298
3 changed files with 32 additions and 1 deletions
|
|
@ -2083,6 +2083,9 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
// If not, then spawn the instashield effect instead.
|
||||
if (!force)
|
||||
{
|
||||
boolean invincible = true;
|
||||
sfxenum_t sfx = sfx_None;
|
||||
|
||||
if (gametyperules & GTR_BUMPERS)
|
||||
{
|
||||
if (player->bumpers <= 0 && player->karmadelay)
|
||||
|
|
@ -2102,7 +2105,22 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
}
|
||||
}
|
||||
|
||||
if (player->invincibilitytimer > 0 || K_IsBigger(target, inflictor) == true || player->hyudorotimer > 0)
|
||||
if (player->invincibilitytimer > 0)
|
||||
{
|
||||
sfx= sfx_invind;
|
||||
}
|
||||
else if (K_IsBigger(target, inflictor) == true)
|
||||
{
|
||||
sfx = sfx_grownd;
|
||||
}
|
||||
else if (player->hyudorotimer > 0)
|
||||
;
|
||||
else
|
||||
{
|
||||
invincible = false;
|
||||
}
|
||||
|
||||
if (invincible)
|
||||
{
|
||||
const INT32 oldhitlag = target->hitlag;
|
||||
|
||||
|
|
@ -2111,6 +2129,11 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
|
||||
player->invulnhitlag += (target->hitlag - oldhitlag);
|
||||
|
||||
if (player->timeshit > player->timeshitprev)
|
||||
{
|
||||
S_StartSound(target, sfx);
|
||||
}
|
||||
|
||||
// Full invulnerability
|
||||
K_DoInstashield(player);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1148,6 +1148,10 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"pass15", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass16", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
|
||||
// SRB2Kart - Blocked damage
|
||||
{"grownd", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // SF_X8AWAYSOUND
|
||||
{"invind", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // SF_X8AWAYSOUND
|
||||
|
||||
// SRB2Kart - Engine sounds
|
||||
// Engine class A
|
||||
{"krta00", false, 48, 65, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
|
|
|
|||
|
|
@ -1212,6 +1212,10 @@ typedef enum
|
|||
sfx_pass15,
|
||||
sfx_pass16,
|
||||
|
||||
// Blocked damage SFX
|
||||
sfx_grownd,
|
||||
sfx_invind,
|
||||
|
||||
// Next up: UNIQUE ENGINE SOUNDS! Hoooooo boy...
|
||||
// Engine class A - Low Speed, Low Weight
|
||||
sfx_krta00,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue