Cubyz
Cubyz copied to clipboard
Reject block updates that are too far away from the player
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).
When implementing this, it should be the closest from all the block's vertices, not just the center of the block.
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.