Voices for when you hit someone else

Not totally sure on them, but it's worth a try, would make it more obvious when you hit someone with a trap item in battle anyway
This commit is contained in:
Sryder13 2017-11-04 20:42:01 +00:00
parent 33beff0d5f
commit 51af54d0ff
3 changed files with 14 additions and 6 deletions

View File

@ -1662,7 +1662,6 @@ fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove
void K_SpinPlayer(player_t *player, mobj_t *source)
{
(void) source;
if (player->health <= 0)
return;
@ -1670,6 +1669,12 @@ void K_SpinPlayer(player_t *player, mobj_t *source)
|| player->kartstuff[k_startimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_bootaketimer] > 0)
return;
if (source && source->player && !source->player->kartstuff[k_sounds])
{
S_StartSound(source, sfx_hitem);
source->player->kartstuff[k_sounds] = 50;
}
player->kartstuff[k_mushroomtimer] = 0;
player->kartstuff[k_driftboost] = 0;

View File

@ -506,11 +506,12 @@ sfxinfo_t S_sfx[NUMSFX] =
// SRB2kart - Skin sounds
{"kwin", false, 64, 0, -1, NULL, 0, SKSWIN, -1, LUMPERROR},
{"klose", false, 64, 0, -1, NULL, 0, SKSLOSE, -1, LUMPERROR},
{"slow", false, 128, 0, -1, NULL, 0, SKSSLOW, -1, LUMPERROR},
{"taunt1", false, 64, 64, -1, NULL, 0, SKSPLTNT1, -1, LUMPERROR},
{"taunt2", false, 64, 64, -1, NULL, 0, SKSPLTNT2, -1, LUMPERROR},
{"taunt3", false, 64, 64, -1, NULL, 0, SKSPLTNT3, -1, LUMPERROR},
{"taunt4", false, 64, 64, -1, NULL, 0, SKSPLTNT4, -1, LUMPERROR},
{"slow", false, 128, 32, -1, NULL, 0, SKSSLOW, -1, LUMPERROR},
{"taunt1", false, 64, 96, -1, NULL, 0, SKSPLTNT1, -1, LUMPERROR},
{"taunt2", false, 64, 96, -1, NULL, 0, SKSPLTNT2, -1, LUMPERROR},
{"taunt3", false, 64, 96, -1, NULL, 0, SKSPLTNT3, -1, LUMPERROR},
{"taunt4", false, 64, 96, -1, NULL, 0, SKSPLTNT4, -1, LUMPERROR},
{"hitem", false, 64, 32, -1, NULL, 0, SKSHITEM, -1, LUMPERROR},
// skin sounds free slots to add sounds at run time (Boris HACK!!!)
// initialized to NULL

View File

@ -46,6 +46,7 @@ typedef enum
SKSPLTNT2,
SKSPLTNT3,
SKSPLTNT4,
SKSHITEM,
NUMSKINSOUNDS
} skinsound_t;
@ -583,6 +584,7 @@ typedef enum
sfx_taunt2,
sfx_taunt3,
sfx_taunt4,
sfx_hitem,
// free slots for S_AddSoundFx() at run-time --------------------
sfx_freeslot0,