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: Fel Highlight in Edge Case #2746

Open
wants to merge 1 commit into
base: beta
Choose a base branch
from

Conversation

Thunderblade73
Copy link
Contributor

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

  • Fixed a rare case where invisible fels where highlighted even though the shouldn't. - Thunderblade73

@github-actions github-actions bot added the Bug Fix Bug fixes label Oct 16, 2024
@@ -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 {
Copy link
Contributor

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

Copy link
Contributor Author

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).

Copy link
Contributor Author

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.

Copy link
Owner

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

Copy link
Contributor Author

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.

Copy link
Owner

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah.

@hannibal002 hannibal002 added this to the Version 0.28 milestone Oct 16, 2024
@hannibal002 hannibal002 added the Soon This Pull Request will be merged within the next couple of betas label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Bug fixes Soon This Pull Request will be merged within the next couple of betas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants