bravoserver / bravo

UNMAINTAINED: Reverse-engineered Minecraft stuff. Worked with 1.4.x protocol
http://bravoserver.org/
Other
206 stars 45 forks source link

Block Placement Inside Players #268

Closed emberian closed 11 years ago

emberian commented 13 years ago

Currently, you can place blocks "inside" yourself and other players (look down, place two blocks). From the little I've looked into it, it should be simple to modify bravo.plugins.build_hooks.Build to prevent placing a block inside your self (I have a patch in the works, needs slight refinement and tests). I didn't see an obvious solution to prevent placement of blocks inside other players. Thoughts?

dliverman commented 13 years ago

I had a fix for this a while ago. It needed to be cleaned up but I haven't gotten around to it. One of the things I noticed was that your location is stored as an int for (x,z) and a float for (y). So even with the patch you can still place boxes that clip if you stand at (1.99,1) and place a block at (2,1). However, after a lot of block spamming, it didn't happen THAT much, I'm not sure how wide the player is.

emberian commented 13 years ago

dliverman: I didn't notice anything different in build_hooks.py (where I am putting my fix), so is your fix not in your fork or is it long gone?

dliverman commented 13 years ago

KB1PKL: My branch got hosed. Was a plugin that checked if player x,y,z intersected block x,y,z then interrupted the build. Was player only. I haven't looked at how other entities are handled yet.