Monitor damage sounds

This commit is contained in:
AJ Martinez 2024-01-06 02:03:40 -07:00
parent dd71c81b24
commit a982b3bf63

View file

@ -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);