mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-24 21:02:14 +00:00
SERVER: Add support for specifying custom Barricade health
This commit is contained in:
parent
6a2375416b
commit
2fa7e60a0d
1 changed files with 4 additions and 1 deletions
|
@ -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..
|
||||||
|
|
Loading…
Reference in a new issue