From b9c323a705caa324cebfea994cf7b69294f9eebe Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Mon, 6 Nov 2017 21:13:46 -0500 Subject: Several additions * Minor bugfix / feature addition for dropped entities * Major bugfix for inventories * Adjusted logo * ADded some more skills * Stoped bundeling bobbleheadbob's zones api --- entities/entities/art_droppeditem/cl_init.lua | 62 +++------------------------ entities/entities/art_droppeditem/init.lua | 6 ++- 2 files changed, 9 insertions(+), 59 deletions(-) (limited to 'entities') diff --git a/entities/entities/art_droppeditem/cl_init.lua b/entities/entities/art_droppeditem/cl_init.lua index 12c369c..eaea39b 100644 --- a/entities/entities/art_droppeditem/cl_init.lua +++ b/entities/entities/art_droppeditem/cl_init.lua @@ -6,8 +6,10 @@ ENT.RenderGroup = RENDERGROUP_BOTH Name: Draw Desc: Draw it! ---------------------------------------------------------*/ +local rs = {} function ENT:Draw() - self:SetAngles(Angle(180,(CurTime() * 200) % 360,0)) + local p = self:GetAngles().p + self:SetAngles(Angle(p,(CurTime() * 200) % 360,0)) if self:GetColor().a == 255 then self:DrawModel() end @@ -27,7 +29,7 @@ hook.Add("Tick","pickupitemstick",function() net.WriteUInt(ei,16) net.SendToServer() sentrequests[ei] = true - timer.Simple(5,function() + timer.Simple(0.5,function() sentrequests[ei] = nil end) end @@ -40,61 +42,7 @@ net.Receive("art_informmodel",function() local ei = net.ReadUInt(16) local m = net.ReadString() local e = Entity(ei) + print(m) e:SetModel(m) e.newmodel = m end) - -/*--------------------------------------------------------- - Name: DrawTranslucent - Desc: Draw translucent ----------------------------------------------------------*/ -function ENT:DrawTranslucent() - - // This is here just to make it backwards compatible. - // You shouldn't really be drawing your model here unless it's translucent - - self:Draw() - -end - -/*--------------------------------------------------------- - Name: BuildBonePositions - Desc: ----------------------------------------------------------*/ -function ENT:BuildBonePositions( NumBones, NumPhysBones ) - - // You can use this section to position the bones of - // any animated model using self:SetBonePosition( BoneNum, Pos, Angle ) - - // This will override any animation data and isn't meant as a - // replacement for animations. We're using this to position the limbs - // of ragdolls. - -end - - - -/*--------------------------------------------------------- - Name: SetRagdollBones - Desc: ----------------------------------------------------------*/ -function ENT:SetRagdollBones( bIn ) - - // If this is set to true then the engine will call - // DoRagdollBone (below) for each ragdoll bone. - // It will then automatically fill in the rest of the bones - - self.m_bRagdollSetup = bIn - -end - - -/*--------------------------------------------------------- - Name: DoRagdollBone - Desc: ----------------------------------------------------------*/ -function ENT:DoRagdollBone( PhysBoneNum, BoneNum ) - - // self:SetBonePosition( BoneNum, Pos, Angle ) - -end diff --git a/entities/entities/art_droppeditem/init.lua b/entities/entities/art_droppeditem/init.lua index 6c66ac8..1ebb9c8 100644 --- a/entities/entities/art_droppeditem/init.lua +++ b/entities/entities/art_droppeditem/init.lua @@ -19,9 +19,11 @@ function ENT:Initialize() print("About to check for onDropped",phoney,phoney.onDropped) PrintTable(phoney) if phoney.onDropped ~= nil then - timer.Simple(1,function() + timer.Simple(1,function() --Can't be 0, because pac needs to know about the entity phoney:onDropped(self) - self:SetColor(Color(0,0,0,0)) + print("After doing phoney's ondropped, model is",self:GetModel()) + print("After ondropped, angles are",self:GetAngles(),"and color is", self:GetColor()) + --self:SetColor(Color(0,0,0,0)) end) -- print("Item had onDropped") -- self:SetColor(Color(0,0,0,0)) -- cgit v1.2.3-70-g09d2