From 2fa7e60a0dd6badc2cb62a8f29ad33f5977a87ce Mon Sep 17 00:00:00 2001 From: MotoLegacy Date: Sat, 9 Dec 2023 10:41:12 -0500 Subject: [PATCH] SERVER: Add support for specifying custom Barricade health --- source/server/entities/window.qc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/server/entities/window.qc b/source/server/entities/window.qc index 10c2735..ab381fb 100644 --- a/source/server/entities/window.qc +++ b/source/server/entities/window.qc @@ -395,12 +395,15 @@ void() item_barricade = // Starting Health (-1 = start none, needs to be this way for compatibility) if (!self.health || self.health > 6 || self.health < -1) - self.health = 6; + self.health = -1; // Max Health if (!self.health_delay || self.health_delay > 6 || self.health_delay < 0) self.health_delay = 6; + // Restore health state if using compatibility hack + if (self.health == -1) self.health = 0; + // cypress -- i was going to add a check if the start health was greater // than max here, but i figured someone might want to make a weird ass // challenge map where barricades become irreperable after destruction..