Cubyz icon indicating copy to clipboard operation
Cubyz copied to clipboard

Reject block updates that are too far away from the player

Open OneAvargeCoder193 opened this issue 2 months ago • 2 comments

Description

Right now clients are able to modify any block in the world that they have loaded. We should reject block updates that are further than the expected client side reach. (Note, this can be easily bypassed for now by just teleporting the client, but that will be impossible once we have server side physics validation).

OneAvargeCoder193 avatar Nov 17 '25 15:11 OneAvargeCoder193

When implementing this, it should be the closest from all the block's vertices, not just the center of the block.

OneAvargeCoder193 avatar Nov 17 '25 15:11 OneAvargeCoder193

IMO it would be enough to just stop client from reaching beyond hand_reach + 1 and ignore the rest. Unless you want to implement whole ray casting on server side, so ppl can't reach through walls.

Argmaster avatar Nov 22 '25 05:11 Argmaster