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

Load blocks and objects behind player when in third-persion front-view #13431

Merged
merged 2 commits into from
May 29, 2023

Conversation

lhofhansl
Copy link
Contributor

2nd attempt. This time send a bit to the server if the client is in 3rd person front mode. That setting is not stored in the player database.

An alternative would be to actually send the client's camera orientation to the server. That way in the future we can allow for alternate camera angles - although for that we have the camera API PR.

Also fixes: #12770

To do

This PR is Ready for Review.

How to test

Load any world. Go to 3rd person front view. Observer that blocks and objects behind the player are loaded.

@wsor4035 wsor4035 added the Bugfix 🐛 PRs that fix a bug label Apr 15, 2023
src/client/client.cpp Outdated Show resolved Hide resolved
src/client/client.cpp Outdated Show resolved Hide resolved
src/network/networkprotocol.h Show resolved Hide resolved
src/network/serverpackethandler.cpp Outdated Show resolved Hide resolved
src/network/serverpackethandler.cpp Outdated Show resolved Hide resolved
src/server/player_sao.h Outdated Show resolved Hide resolved
@lhofhansl
Copy link
Contributor Author

What do we think here in general? For complete correctness we should not only pass the player location and orientation but also the camera position and orientation so that the server can retrieve the correct blocks from the viewpoint of the camera. This is more of a quick fix for the most immediate problem.

@Desour
Copy link
Member

Desour commented May 28, 2023

What do we think here in general? For complete correctness we should not only pass the player location and orientation but also the camera position and orientation so that the server can retrieve the correct blocks from the viewpoint of the camera. This is more of a quick fix for the most immediate problem.

The server would also have to check if the camera pos is valid (i.e. reachable with the current set eye offset).

I feel like this quick fix is sufficient for now.

Copy link
Member

@Desour Desour left a comment

Choose a reason for hiding this comment

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

LGTM.

@lhofhansl lhofhansl merged commit a8ec609 into minetest:master May 29, 2023
13 checks passed
Andrey2470T pushed a commit to Andrey2470T/minetest that referenced this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants