summaryrefslogtreecommitdiff
path: root/entities
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-06-20 15:33:39 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-06-20 15:33:39 -0400
commite879c365577b0cc51c48bace7cd5fb52cdc26eaa (patch)
tree822a52cf38efd6815f2b7483cf6369e68c3dab23 /entities
parentf797cbe348dd52b51da4cd4812cfa291d1434095 (diff)
downloadgmstranded-master.tar.gz
gmstranded-master.tar.bz2
gmstranded-master.zip
Re-syncing last updated copyHEADmaster
Diffstat (limited to 'entities')
-rw-r--r--entities/entities/gms_base_entity.lua4
-rw-r--r--entities/entities/gms_buildsite.lua1
-rw-r--r--entities/entities/gms_generic_structure.lua5
3 files changed, 7 insertions, 3 deletions
diff --git a/entities/entities/gms_base_entity.lua b/entities/entities/gms_base_entity.lua
index eff03cb..ee44f99 100644
--- a/entities/entities/gms_base_entity.lua
+++ b/entities/entities/gms_base_entity.lua
@@ -18,7 +18,9 @@ function ENT:Initialize()
self:SetSolid( SOLID_VPHYSICS )
end
- self:onInitialize()
+ if self.OnInitialize then
+ self:OnInitialize()
+ end
end
function ENT:Draw()
diff --git a/entities/entities/gms_buildsite.lua b/entities/entities/gms_buildsite.lua
index a0f8199..a2b7b82 100644
--- a/entities/entities/gms_buildsite.lua
+++ b/entities/entities/gms_buildsite.lua
@@ -72,6 +72,7 @@ function ENT:Finish()
end
function ENT:OnUse( ply )
+ if(!self.LastUsed) then self.LastUsed = 0 end
if ( CurTime() - self.LastUsed < 0.5 ) then return end
self.LastUsed = CurTime()
diff --git a/entities/entities/gms_generic_structure.lua b/entities/entities/gms_generic_structure.lua
index d76ed30..fdc584d 100644
--- a/entities/entities/gms_generic_structure.lua
+++ b/entities/entities/gms_generic_structure.lua
@@ -5,9 +5,10 @@ ENT.Type = "anim"
ENT.Base = "gms_base_entity"
function ENT:Initialize()
- print("Initalize called!")
+ --print("Initalize called!")
util.PrecacheModel(self.Model)
- if self.Model then self:SetModel(self.Model) end
+ --For some reason this bugs out if run client side
+ if SERVER then if self.Model then self:SetModel(self.Model) end end
if self.onInitialize then self:onInitialize() end
if CLIENT then return end
self:PhysicsInit( SOLID_VPHYSICS )