Skip to content

Commit

Permalink
Fix serverside hologram position getting set to origin when parented (#…
Browse files Browse the repository at this point in the history
…1975)

* Fix serverside hologram position getting set to origin when parented

* Add back hack
  • Loading branch information
thegrb93 authored Jan 14, 2025
1 parent 552e0e3 commit 4aeb156
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/entities/starfall_hologram/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ function ENT:Initialize()

if self:EntIndex() == -1 then
self:SetPlayerColorInternal(VECTOR_PLAYER_COLOR_DISABLED)
-- Hack to fix parenting issues
self:SetParent(Entity(0))
self:SetParent()
else
self:OnPlayerColorChanged(nil, nil, self:GetPlayerColorInternal())
end

-- Fixes future SetParent calls not keeping offset from the parent
self:SetParent(Entity(0))
self:SetParent()
self.renderstack = HoloRenderStack:create(self)
end

Expand Down

0 comments on commit 4aeb156

Please sign in to comment.