fogleman / Craft

A simple Minecraft clone written in C using modern OpenGL (shaders).
http://www.michaelfogleman.com/craft/
MIT License
10.44k stars 1.39k forks source link

Fixed Issue #209: Walking through blocks at a 45 degree angle #216

Open usernamefreaks opened 5 years ago

usernamefreaks commented 5 years ago

Link to the issue we fixed: https://github.com/fogleman/Craft/issues/209

The cause of the bug is that in the collide() function, it doesn't check whether the 4 diagonally neighboring blocks are obstacles. We added code that check for obstacles in these directions.