SERVER: Add support for specifying custom Barricade health

This commit is contained in:
MotoLegacy 2023-12-09 10:41:12 -05:00
parent 6a2375416b
commit 2fa7e60a0d

View file

@ -395,12 +395,15 @@ void() item_barricade =
// Starting Health (-1 = start none, needs to be this way for compatibility) // Starting Health (-1 = start none, needs to be this way for compatibility)
if (!self.health || self.health > 6 || self.health < -1) if (!self.health || self.health > 6 || self.health < -1)
self.health = 6; self.health = -1;
// Max Health // Max Health
if (!self.health_delay || self.health_delay > 6 || self.health_delay < 0) if (!self.health_delay || self.health_delay > 6 || self.health_delay < 0)
self.health_delay = 6; 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 // 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 // than max here, but i figured someone might want to make a weird ass
// challenge map where barricades become irreperable after destruction.. // challenge map where barricades become irreperable after destruction..