Fixed nails not being created

Gave defaults as initialize doesn't seem to be working as it should do.
This commit is contained in:
Ben Clark 2014-12-20 02:42:55 +00:00
parent 11c4a73414
commit 3f1e80110a

View file

@ -51,8 +51,8 @@ function ENT:AttachTo(baseent, attachent, physbone, physbone2)
if baseent:GetBarricadeHealth() == 0 then if baseent:GetBarricadeHealth() == 0 then
local health = baseent:GetDefaultBarricadeHealth() local health = baseent:GetDefaultBarricadeHealth()
if self.HealthOveride > 0 then health = self.HealthOveride end if self.HealthOveride and self.HealthOveride > 0 then health = self.HealthOveride end
health = health * self.HealthMultiplier health = health * (self.HealthMultiplier or 1)
baseent:SetMaxBarricadeHealth(health) baseent:SetMaxBarricadeHealth(health)
baseent:SetBarricadeHealth(health) baseent:SetBarricadeHealth(health)
baseent:SetBarricadeRepairs(baseent:GetMaxBarricadeRepairs()) baseent:SetBarricadeRepairs(baseent:GetMaxBarricadeRepairs())