diff options
| -rw-r--r-- | entities/entities/art_droppeditem/cl_init.lua | 62 | ||||
| -rw-r--r-- | entities/entities/art_droppeditem/init.lua | 6 | ||||
| -rw-r--r-- | gamemode/core/inventory/inventory.lua | 4 | ||||
| -rw-r--r-- | gamemode/core/inventory/sv_invtracker.lua | 4 | ||||
| -rw-r--r-- | gamemode/inventorysystem/shapedinventory/sh_shaped.lua | 2 | ||||
| -rw-r--r-- | gamemode/inventorysystem/skills/sh_skillcommon.lua | 2 | ||||
| -rw-r--r-- | gamemode/zones.lua | 3 | ||||
| -rw-r--r-- | logo.png | bin | 40880 -> 41002 bytes |
8 files changed, 19 insertions, 64 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)) diff --git a/gamemode/core/inventory/inventory.lua b/gamemode/core/inventory/inventory.lua index c9bf6da..4624819 100644 --- a/gamemode/core/inventory/inventory.lua +++ b/gamemode/core/inventory/inventory.lua @@ -90,13 +90,13 @@ local function SetDefaultObservers(tbl) --PrintTable(v) v:Put(position,item) end - oldput(self,position,item) + return oldput(self,position,item) end tbl.Remove = function(self,position) for k,v in pairs(self.observers) do v:Remove(position) end - oldremove(self,position) + return oldremove(self,position) end end diff --git a/gamemode/core/inventory/sv_invtracker.lua b/gamemode/core/inventory/sv_invtracker.lua index f1f3c3d..310af0f 100644 --- a/gamemode/core/inventory/sv_invtracker.lua +++ b/gamemode/core/inventory/sv_invtracker.lua @@ -217,7 +217,9 @@ function plymeta:RemoveItem(tbl) local pos = tbl[2] print("Self inventory was") PrintTable(self.data.inventories[nid]) - self.data.inventories[nid]:Remove(pos) + local item = self.data.inventories[nid]:Remove(pos) + print("sv_invtracker's item was", item) + return item end function plymeta:GiveItem(tbl) diff --git a/gamemode/inventorysystem/shapedinventory/sh_shaped.lua b/gamemode/inventorysystem/shapedinventory/sh_shaped.lua index 1b53d43..e9b2e91 100644 --- a/gamemode/inventorysystem/shapedinventory/sh_shaped.lua +++ b/gamemode/inventorysystem/shapedinventory/sh_shaped.lua @@ -104,6 +104,8 @@ function inv:Remove(tbl) end end end + print("shaped is returning",item) + return item end function inv:Get(tbl) diff --git a/gamemode/inventorysystem/skills/sh_skillcommon.lua b/gamemode/inventorysystem/skills/sh_skillcommon.lua index d48fb98..fd05eaa 100644 --- a/gamemode/inventorysystem/skills/sh_skillcommon.lua +++ b/gamemode/inventorysystem/skills/sh_skillcommon.lua @@ -2,7 +2,7 @@ Common functions since skills are a special inventory, adding skills need to be a special item ]] local itm = nrequire("item.lua") - +local log = nrequire("log.lua") --Common things --Make sure items have a "name" and "ammt" attribute local item = {} diff --git a/gamemode/zones.lua b/gamemode/zones.lua index f95d6f2..5d6d781 100644 --- a/gamemode/zones.lua +++ b/gamemode/zones.lua @@ -1,3 +1,4 @@ +do return end local version = 1.20 -- Older versions will not run if a newer version is used in another script. --[[ ZONES - by Bobbleheadbob with help from Zeh Matt @@ -608,4 +609,4 @@ function zones.PointInPoly(point,poly) //True if point is within a polygon. end return inside -end
\ No newline at end of file +end Binary files differ |
