From a982b3bf6321ede2276568a0e60aa2ec585742d7 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Sat, 6 Jan 2024 02:03:40 -0700 Subject: [PATCH] Monitor damage sounds --- src/objects/monitor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/objects/monitor.c b/src/objects/monitor.c index 86a4d0d71..359210d8e 100644 --- a/src/objects/monitor.c +++ b/src/objects/monitor.c @@ -8,6 +8,7 @@ #include "../k_battle.h" #include "../m_random.h" #include "../r_main.h" +#include "../s_sound.h" #define FINE90 (FINEANGLES/4) #define FINE180 (FINEANGLES/2) @@ -665,6 +666,7 @@ Obj_MonitorOnDamage ? FixedDiv(FixedHypot(inflictor->momx, inflictor->momy), 4 * inflictor->radius) : 0; monitor->hitlag = 3 * get_damage_multiplier(monitor) / FRACUNIT; + S_StartSound(monitor, sfx_kc40); } void @@ -707,6 +709,8 @@ Obj_MonitorOnDeath (mobj_t *monitor) spawn_monitor_explosion(monitor); + S_StartSound(monitor, sfx_gshcc); + // There is hitlag from being damaged, so remove // tangibility RIGHT NOW. monitor->flags &= ~(MF_SOLID);