From 436f7cb7c6a5d106aaa657114a78e316a64578c7 Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Tue, 24 Oct 2017 20:59:09 +0100 Subject: [PATCH] Tossed and shell hitting player sound Made clash audiable from a bit further away --- src/info.c | 12 ++++++------ src/k_kart.c | 2 ++ src/p_map.c | 5 +++++ src/sounds.c | 4 +++- src/sounds.h | 2 ++ 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/info.c b/src/info.c index 8352e942..e1b6d861 100644 --- a/src/info.c +++ b/src/info.c @@ -14392,7 +14392,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_FAKEITEM1, // spawnstate 2, // spawnhealth S_NULL, // seestate - sfx_None, // seesound + sfx_tossed, // seesound 8, // reactiontime sfx_None, // attacksound S_NULL, // painstate @@ -14419,7 +14419,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_BANANAITEM, // spawnstate 1000, // spawnhealth S_NULL, // seestate - sfx_None, // seesound + sfx_tossed, // seesound 8, // reactiontime sfx_None, // attacksound S_NULL, // painstate @@ -14662,7 +14662,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_GREENITEM1, // spawnstate 7, // spawnhealth S_NULL, // seestate - sfx_None, // seesound + sfx_tossed, // seesound 8, // reactiontime sfx_tink, // attacksound S_NULL, // painstate @@ -14824,7 +14824,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_REDITEM1, // spawnstate 1, // spawnhealth S_NULL, // seestate - sfx_None, // seesound + sfx_tossed, // seesound 8, // reactiontime sfx_None, // attacksound S_NULL, // painstate @@ -14851,7 +14851,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_REDITEM1, // spawnstate 1, // spawnhealth S_NULL, // seestate - sfx_None, // seesound + sfx_tossed, // seesound 8, // reactiontime sfx_None, // attacksound S_NULL, // painstate @@ -14905,7 +14905,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_BOMBAIR, // spawnstate 105, // spawnhealth S_NULL, // seestate - sfx_None, // seesound + sfx_tossed, // seesound 8, // reactiontime sfx_None, // attacksound S_NULL, // painstate diff --git a/src/k_kart.c b/src/k_kart.c index 3e03c267..9af13ad2 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -2029,6 +2029,8 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map P_SetTarget(&mo->target, player->mo); + S_StartSound(player->mo, mo->info->seesound); + if (mo) { angle_t fa = player->mo->angle>>ANGLETOFINESHIFT; diff --git a/src/p_map.c b/src/p_map.c index 251151e8..520e2792 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -678,6 +678,8 @@ static boolean PIT_CheckThing(mobj_t *thing) // Player Damage P_DamageMobj(thing, tmthing, tmthing->target, 1); + if (tmthing->type == MT_GREENITEM || tmthing->type == MT_REDITEM || tmthing->type == MT_REDITEMDUD) + S_StartSound(thing, sfx_shelit); // This Item Damage if (tmthing->eflags & MFE_VERTICALFLIP) @@ -1095,6 +1097,9 @@ static boolean PIT_CheckThing(mobj_t *thing) // Player Damage P_DamageMobj(tmthing, thing, thing->target, 1); + if (thing->type == MT_GREENITEM || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD) + S_StartSound(tmthing, sfx_shelit); + // Other Item Damage if (thing->eflags & MFE_VERTICALFLIP) thing->z -= thing->height; diff --git a/src/sounds.c b/src/sounds.c index 81e5c689..b84c1828 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -497,7 +497,9 @@ sfxinfo_t S_sfx[NUMSFX] = {"mkitm7", true, 72, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"mkitm8", true, 72, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"mkitmF", true, 72, 0, -1, NULL, 0, -1, -1, LUMPERROR}, - {"clash", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, + {"clash", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, + {"tossed", false,150, 8, -1, NULL, 0, -1, -1, LUMPERROR}, + {"shelit", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // SRB2kart - Skin sounds {"kwin", false, 64, 0, -1, NULL, 0, SKSWIN, -1, LUMPERROR}, diff --git a/src/sounds.h b/src/sounds.h index 66038b0c..66a9b729 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -569,6 +569,8 @@ typedef enum sfx_mkitm8, sfx_mkitmF, sfx_clash, + sfx_tossed, + sfx_shelit, sfx_kwin, sfx_klose,