From d74f0bce561e21f0eeb7c28741fcecc13c2ae890 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 24 Apr 2023 00:00:20 +1000 Subject: [PATCH] Fix CCTV still working when destroyed --- src/game/propobj.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/propobj.c b/src/game/propobj.c index 55b0e2355..54e95473f 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -13658,6 +13658,10 @@ void objDamage(struct defaultobj *obj, f32 damage, struct coord *pos, s32 weapon } else if (obj->type == OBJTYPE_AUTOGUN) { obj->flags |= OBJFLAG_AUTOGUN_DAMAGED; + if (objGetDestroyedLevel(obj) == 1) { + obj->flags |= OBJFLAG_DEACTIVATED; + } + } else if (obj->type == OBJTYPE_CCTV) { if (objGetDestroyedLevel(obj) == 1) { obj->flags |= OBJFLAG_DEACTIVATED; }