spsquared / BattleBoxes_Multiplayer

BattleBoxes, but it's multiplayer! Large maps and free-for-all playing! Be sure to read README.md!
https://www.youtube.com/channel/UChK4S12w_jjJs_c-jQh8WMQ/
GNU General Public License v3.0
3 stars 4 forks source link

BUG - Collision rebound in wierd ways #150

Closed spsquared closed 3 years ago

spsquared commented 3 years ago

Describe the bug Upon fallign really fast and moving, hitting a flat surface will place you shifted to fit inside a tile. If you look at It in slow motion, you can see that you fall into a block, and then on the next tick you end up on top but in the wrong place

To Reproduce Steps to reproduce the behavior:

  1. Lower TPS to 1
  2. spawn bot that is moving at top left (or use TEST_BOT)
  3. rubber band wierdness

Expected behavior Should check for a collision in the other block

Screenshots image image

Environment

Additional context Add any other context about the problem here.

spsquared commented 3 years ago

The "px" and "py" variables are not updated after collisions so the code still does not know that the previous check has moved the player and still thinks it is inside a block.

spsquared commented 3 years ago

And placing the "center" collision check at the top will help to reduce these glitches