mirror of
https://github.com/HaodongMo/ARC-9.git
synced 2025-03-04 03:02:58 -05:00
fix weird offsets
This commit is contained in:
parent
51a861dc32
commit
db0da5e375
@ -123,9 +123,9 @@ function SWEP:GetAttachmentPos(slottbl, wm, idle, nomodeloffset, custompos, cust
|
|||||||
bang = customang or a0
|
bang = customang or a0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local cust = self:GetCustomize()
|
||||||
local possiblecache = self.AttPosCache[slottbl.Address] -- att pos cache
|
local possiblecache = self.AttPosCache[slottbl.Address] -- att pos cache
|
||||||
if possiblecache then
|
if !cust and possiblecache then
|
||||||
if (possiblecache[4] or 0) > CurTime() then
|
if (possiblecache[4] or 0) > CurTime() then
|
||||||
local qpos, qang = llLocalToWorld(possiblecache[1], possiblecache[2], bpos, bang)
|
local qpos, qang = llLocalToWorld(possiblecache[1], possiblecache[2], bpos, bang)
|
||||||
return qpos, qang, possiblecache[3]
|
return qpos, qang, possiblecache[3]
|
||||||
@ -202,7 +202,7 @@ function SWEP:GetAttachmentPos(slottbl, wm, idle, nomodeloffset, custompos, cust
|
|||||||
apos = data.pos or apos
|
apos = data.pos or apos
|
||||||
aang = data.ang or aang
|
aang = data.ang or aang
|
||||||
|
|
||||||
if slottbl.Address then -- att pos cache
|
if slottbl.Address and !cust then -- att pos cache
|
||||||
local ypos, yang = wwWorldToLocal(apos, aang, bpos, bang)
|
local ypos, yang = wwWorldToLocal(apos, aang, bpos, bang)
|
||||||
self.AttPosCache[slottbl.Address] = {ypos, yang, icon_offset, CurTime() + 5}
|
self.AttPosCache[slottbl.Address] = {ypos, yang, icon_offset, CurTime() + 5}
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user