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

Draw distance is not working properly #23

Closed
michak89 opened this issue Sep 6, 2024 · 2 comments
Closed

Draw distance is not working properly #23

michak89 opened this issue Sep 6, 2024 · 2 comments

Comments

@michak89
Copy link

michak89 commented Sep 6, 2024

Hello there,
in entities/base_streamradio_gui.lua around line 1060, within this block:

if not self:CheckDistanceToEntity(ply, StreamRadioLib.GetDrawDistance(), nil, StreamRadioLib.GetCameraViewPos(ply)) then
	return 
end

For some reason, ply is not always me.
I haven't yet verified why this occurs, but it results in display rendering issues.

Initially, for about 2 minutes after joining the server, there are no issues with rendering and ply correctly refers to me.
However, after a while, another player on the server goes into this variable (bots also can), causing funny rendering problems.
Here is a video showing it:

https://youtu.be/G3uskHVfFzw

Adding ply = LocalPlayer() one line before the check seems to resolve it.
Sometimes ply can be even nil and draw distance works fine, stops rendering after set distance.
In singleplayer ply can only be one so it works perfect as it is there.

@Grocel
Copy link
Owner

Grocel commented Sep 6, 2024

Looks like there has been a global ply somewhere that gets inserted. Usually ply is nil and will resolve to LocalPlayer(). It is a bug, I will add the LocalPlayer() call as requested. The bug got visible after another addon added the ply global, likely by accident too. Thanks for reporting.

Grocel added a commit that referenced this issue Sep 6, 2024
- Fixed draw distance not working properly (#23)
- Removed broken community playlists. GG-Radio has been taken offline.
- Fixed Noise-fm playlist
- Fixed stream title output
@Grocel
Copy link
Owner

Grocel commented Sep 6, 2024

Fixed in today's update.

@Grocel Grocel closed this as completed Sep 6, 2024
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

No branches or pull requests

2 participants