Skip to content

Commit

Permalink
Merge pull request #1584 from wiremod/fix/1583/missing-dummytrace
Browse files Browse the repository at this point in the history
Make WireLib.dummytrace a shared function
  • Loading branch information
AbigailBuccaneer authored Mar 1, 2018
2 parents 6a6f38a + 6358157 commit 8b1a981
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 0 additions & 20 deletions lua/wire/server/wirelib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -994,26 +994,6 @@ function WireLib.GetOwner(ent)
return E2Lib.getOwner({}, ent)
end

function WireLib.dummytrace(ent)
local pos = ent:GetPos()
return {
FractionLeftSolid = 0,
HitNonWorld = true,
Fraction = 0,
Entity = ent,
HitPos = pos,
HitNormal = Vector(0,0,0),
HitBox = 0,
Normal = Vector(1,0,0),
Hit = true,
HitGroup = 0,
MatType = 0,
StartPos = pos,
PhysicsBone = 0,
WorldToLocal = Vector(0,0,0),
}
end

function WireLib.NumModelSkins(model)
if NumModelSkins then
return NumModelSkins(model)
Expand Down
20 changes: 20 additions & 0 deletions lua/wire/wireshared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,26 @@ end

-- end extra table functions

function WireLib.dummytrace(ent)
local pos = ent:GetPos()
return {
FractionLeftSolid = 0,
HitNonWorld = true,
Fraction = 0,
Entity = ent,
HitPos = pos,
HitNormal = Vector(0,0,0),
HitBox = 0,
Normal = Vector(1,0,0),
Hit = true,
HitGroup = 0,
MatType = 0,
StartPos = pos,
PhysicsBone = 0,
WorldToLocal = Vector(0,0,0),
}
end

local table = table
local pairs_sortvalues = pairs_sortvalues
local ipairs_map = ipairs_map
Expand Down

0 comments on commit 8b1a981

Please sign in to comment.