Skip to content

Commit

Permalink
Remove references to bone jiggle and scale
Browse files Browse the repository at this point in the history
  • Loading branch information
Denneisk committed Oct 28, 2023
1 parent f1a017a commit 0b769b7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 35 deletions.
14 changes: 0 additions & 14 deletions lua/entities/gmod_wire_expression2/core/bone.lua
Original file line number Diff line number Diff line change
Expand Up @@ -291,20 +291,6 @@ e2function vector bone:inertia()
return this:GetInertia()
end

__e2setcost(5)

e2function number bone:getJiggle()
local ent, index = isValidBone(this)
if not ent then return self:throw("Invalid bone!", 0) end
return ent:GetManipulateBoneJiggle(index) or 0
end

e2function vector bone:getScale()
local ent, index = isValidBone(this)
if not ent then return self:throw("Invalid bone!", Vector(0, 0, 0)) end
return ent:GetManipulateBoneScale(index)
end

--[[************************************************************************]]--
__e2setcost(30)

Expand Down
19 changes: 0 additions & 19 deletions lua/entities/gmod_wire_expression2/core/custom/prop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -578,25 +578,6 @@ e2function void bone:setAngVelocityInstant(vector velocity)
ent:PhysWake()
end

--[[
__e2setcost(5000)
-- Apparently these functions are expensive
e2function void bone:setJiggle(weight)
local ent, index = boneVerify(self, this)
if not ValidAction(self, ent, "heavybone") then return end
weight = math.Clamp(weight, 0, 255)
ent:ManipulateBoneJiggle(index, weight)
end
e2function void bone:setScale(vector scale)
local ent, index = boneVerify(self, this)
if ent:GetPhysicsObjectCount() <= 1 then return self:throw("Entity is not a ragdoll!") end
if not ValidAction(self, ent, "heavybone") then return end
ent:ManipulateBoneScale(index, scale)
end
]]

__e2setcost(5000)

-- This code was leveraged from Garry's Mod. Perhaps it would be a bit cleaner with a slight rewrite.
Expand Down
2 changes: 0 additions & 2 deletions lua/wire/client/e2descriptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,6 @@ E2Helper.Descriptions["boneCount(e:)"] = "Returns Es number of bones"
E2Helper.Descriptions["nobone()"] = "Returns an invalid bone"
E2Helper.Descriptions["aimBone(e:)"] = "Returns the bone the player is currently aiming at"
E2Helper.Descriptions["entity(b:)"] = "Returns the entity B belongs to"
E2Helper.Descriptions["getJiggle(b:)"] = "Returns the jiggle amount of the bone"
E2Helper.Descriptions["getScale(b:)"] = "Returns the visual scale of the bone"
E2Helper.Descriptions["index(b:)"] = "Returns Bs index in the entity it belongs to. Returns -1 if the bone is invalid or an error occured"
E2Helper.Descriptions["pos(b:)"] = "Returns Bs position"
E2Helper.Descriptions["forward(b:)"] = "Returns a vector describing Bs forward direction"
Expand Down

0 comments on commit 0b769b7

Please sign in to comment.