diff --git a/src/collision.h b/src/collision.h index b0bb803..de61eda 100644 --- a/src/collision.h +++ b/src/collision.h @@ -6,7 +6,7 @@ #include "format.h" struct Collision { - enum Side { NONE, LEFT, RIGHT, FRONT, TOP, BOTTOM } side; + enum Side { NONE, LEFT, RIGHT, FRONT, BACK, TOP, BOTTOM } side; struct Info { int room, roomAbove, roomBelow, floor, ceiling; @@ -67,7 +67,7 @@ struct Collision { } else return; - pos += vec3(d.x, 0.0f, d.y); + pos += vec3(d.x, -velocity.y, d.y); } inline bool checkHeight(TR::Level *level, int roomIndex, const vec3 &pos, const vec2 &offset, int height, int maxAscent, int maxDescent, Side side) {