aboutsummaryrefslogtreecommitdiff
path: root/entities
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-11-06 21:13:46 -0500
committerAlexander Pickering <alexandermpickering@gmail.com>2017-11-06 21:13:46 -0500
commitb9c323a705caa324cebfea994cf7b69294f9eebe (patch)
treed9b647acea06ddf1dd61936da6beed9c6f1b9ce3 /entities
parentf53052a063b73e92c4e92b214e439b446600fe8a (diff)
downloadartery-b9c323a705caa324cebfea994cf7b69294f9eebe.tar.gz
artery-b9c323a705caa324cebfea994cf7b69294f9eebe.tar.bz2
artery-b9c323a705caa324cebfea994cf7b69294f9eebe.zip
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
Diffstat (limited to 'entities')
-rw-r--r--entities/entities/art_droppeditem/cl_init.lua62
-rw-r--r--entities/entities/art_droppeditem/init.lua6
2 files changed, 9 insertions, 59 deletions
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))