Fix CCTV still working when destroyed

This commit is contained in:
Ryan Dwyer 2023-04-24 00:00:20 +10:00
parent 4b97a3845f
commit d74f0bce56
1 changed files with 4 additions and 0 deletions

View File

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