Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- run:
- Correct entity width: 0.59375
- *** First we move an entity around the way vanilla code does and see the problem...
- Starting out at some place in the world:
- Xmin=1.8,Xmax=2.39375,w=0.5937499999999998
- Xcenter=2.096875
- Have the entity get shoved around for a while...
- Shifting Xmin and Xmax both by:
- +0.01562500000000011
- +0.015625000000000114
- +0.01562500000000011
- +0.015625000000000114
- +0.01562500000000011
- +0.015625000000000114
- +0.01562500000000011
- +0.015625000000000114
- +0.01562500000000011
- +0.015625000000000114
- +0.01562500000000011
- +0.015625000000000114
- +0.015625000000000003
- +0.015625000000000222
- Finally ended up at:
- Xmin=2.0187500000000034,Xmax=2.6125,w=0.5937499999999964
- Xcenter=2.3156250000000016
- new width is 0.5937499999999964, 3.552713678800501E-15 smaller than it should be
- Imagine it got shoved one last time, against a wall to the west:
- New bounding box and computed center:
- Xmin=2.0,Xmax=2.5937499999999964,w=0.5937499999999964
- Xcenter=2.2968749999999982
- Only the center is saved to disk. When reloaded, we get this:
- Reloaded center and computed faces:
- Xcenter=2.2968749999999982
- Xmin=1.9999999999999982,Xmax=2.5937499999999982,w=0.59375
- The west face now intersects the wall by -1.7763568394002505E-15
- Imagine instead it got shoved one last time, against a wall to the east:
- New bounding box and computed center:
- Xmin=2.4062500000000036,Xmax=3.0,w=0.5937499999999964
- Xcenter=2.7031250000000018
- Only the center is saved to disk. When reloaded, we get this:
- Reloaded center and computed faces:
- Xcenter=2.7031250000000018
- Xmin=2.4062500000000018,Xmax=3.0000000000000018,w=0.59375
- The east face now intersects the wall by 1.7763568394002505E-15
- *** Now try again with code that maintains consistency between bounds and center...
- Starting out at some place in the world:
- Xmin=1.8,Xmax=2.39375,w=0.5937499999999998
- Xcenter=2.096875
- Have the entity get shoved around for a while...
- Shifting Xmin and Xmax both by:
- +0.01562500000000011
- +0.015625000000000114
- +0.015625000000000114
- +0.015625000000000114
- +0.015625000000000114
- +0.015625000000000114
- +0.015625000000000114
- +0.015625000000000114
- +0.015625000000000114
- +0.015625000000000114
- +0.015625000000000114
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- -0.015625000000000226
- +0.015625000000000114
- -0.015625000000000222
- +0.015625000000000114
- Finally ended up at:
- Xmin=1.9874999999999803,Xmax=2.5812499999999803,w=0.59375
- Xcenter=2.2843749999999803
- new width is 0.59375, 0.0 smaller than it should be
- Imagine it got shoved one last time, against a wall to the west:
- New bounding box and computed center:
- Xmin=1.0,Xmax=1.59375,w=0.59375
- Xcenter=1.296875
- Only the center is saved to disk. When reloaded, we get this:
- Reloaded center and computed faces:
- Xcenter=1.296875
- Xmin=1.0,Xmax=1.59375,w=0.59375
- The west face now intersects the wall by 0.0
- Imagine instead it got shoved one last time, against a wall to the east:
- New bounding box and computed center:
- Xmin=2.40625,Xmax=3.0,w=0.59375
- Xcenter=2.703125
- Only the center is saved to disk. When reloaded, we get this:
- Reloaded center and computed faces:
- Xcenter=2.703125
- Xmin=2.40625,Xmax=3.0,w=0.59375
- The east face now intersects the wall by 0.0
- BUILD SUCCESSFUL (total time: 0 seconds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement