Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix holograms not fixing renderbounds after fullupdate #1877

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

yingKatsu
Copy link
Contributor

#1876

i notice before that the existing code for setting render bounds didnt check for if the networkentitycreated ent was a hologram? is this hook in hologram cl_init also for custom props too?

Before creating pull request

  • Move all changes to separate branch (Don't use master of your fork).
  • Don't reuse branches.
  • Don't sync that branch after creating pull request unless it's really needed. (IE. upstream changed code structure).
  • Test it and try fixing bugs ahead.
  • If you know about any bugs, make sure to list them in PR message.
  • Make sure pull request message informs about ALL the changes.
  • Your pull request can be work-in-progress if you want others to help you with coding or give you opinions, just make sure to state it's not ready.
  • Try to avoid messing with whitespaces. (Setup your editor properly to follow our style).
  • If you find whitespaces that don't follow our style you can fix them in separate commit.
  • Read about github flow

Thank you

Thank you for contributing and helping StarfallEx community!

lua/entities/starfall_hologram/cl_init.lua Outdated Show resolved Hide resolved
lua/entities/starfall_hologram/cl_init.lua Outdated Show resolved Hide resolved
@yingKatsu
Copy link
Contributor Author

OnScaleChanged contains

		local mins, maxs = self:GetModelBounds()
		if mins then
			self:SetRenderBounds(mins * scale, maxs * scale)
		end

which is core to fixing #1876. I just took it from the ENT:Initialize function because it wasnt being called when holograms are destroyed and remade clientside due to fullupdates. I ran this current code live and it fixed the problem displayed in the video in the issue.

However, upon reading through OnScaleChanged, it does contain overlap with code already running in this hook. I will just call this specific excerpt then instead of the whole function.

@thegrb93 thegrb93 merged commit 3d35de4 into thegrb93:master Oct 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants