-
-
Notifications
You must be signed in to change notification settings - Fork 189
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: Fel Highlight in Edge Case #2746
base: beta
Are you sure you want to change the base?
Conversation
@@ -83,7 +83,7 @@ object DungeonMobManager { | |||
fun onRenderWorld(event: LorenzRenderWorldEvent) { | |||
if (!fel.highlight.get()) return | |||
if (fel.line) { | |||
felOnTheGround.filter { it.canBeSeen() }.forEach { | |||
felOnTheGround.filter { it.canBeSeen() && it.distanceToPlayer() < 30 }.forEach { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the distance check really needed? since mob detection already has a distance limit in which it works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The canBeSeen logic gets sketchy at high distance in complex terrain like dungeons. I had at least two instances where it would be unrealistic to see fels (1 to 2 pixels where only visible).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue happens when the mob gets detected in range and then you move away from the mob. Since then distances can go up to 60 blocks. The 30 is just a value I find appropriate since it is the usable view distance. Sure there are some cases where it is oversensitive (mostly at vertical rooms). Btw. 24 is the Range for the detection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add support for distance check inside the canBeSeen function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is 80 blocks. And it is no Problem for anything else. Just the line inside dungeons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what 80 blocks do you mean? is this a reply to my message above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah.
What
Mobs may become only later on invisble. So I added the check on each render call. Very much a detriment to performance but ok.
Also added a Invisible Info for \shcopyentities.
Changelog Fixes