From 3f1e80110a6809572a4f779feb4ddfbc51188604 Mon Sep 17 00:00:00 2001 From: Ben Clark Date: Sat, 20 Dec 2014 02:42:55 +0000 Subject: [PATCH] Fixed nails not being created Gave defaults as initialize doesn't seem to be working as it should do. --- gamemodes/zombiesurvival/entities/entities/prop_nail/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gamemodes/zombiesurvival/entities/entities/prop_nail/init.lua b/gamemodes/zombiesurvival/entities/entities/prop_nail/init.lua index 4542e68..9440aae 100644 --- a/gamemodes/zombiesurvival/entities/entities/prop_nail/init.lua +++ b/gamemodes/zombiesurvival/entities/entities/prop_nail/init.lua @@ -51,8 +51,8 @@ function ENT:AttachTo(baseent, attachent, physbone, physbone2) if baseent:GetBarricadeHealth() == 0 then local health = baseent:GetDefaultBarricadeHealth() - if self.HealthOveride > 0 then health = self.HealthOveride end - health = health * self.HealthMultiplier + if self.HealthOveride and self.HealthOveride > 0 then health = self.HealthOveride end + health = health * (self.HealthMultiplier or 1) baseent:SetMaxBarricadeHealth(health) baseent:SetBarricadeHealth(health) baseent:SetBarricadeRepairs(baseent:GetMaxBarricadeRepairs())