diff options
-rw-r--r-- | src/transform_system.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/transform_system.cpp b/src/transform_system.cpp index 8a09c20..6ed6210 100644 --- a/src/transform_system.cpp +++ b/src/transform_system.cpp | |||
@@ -141,9 +141,9 @@ CollisionResult TransformSystem::checkCollision(int spriteId, vec2i newLoc, Dire | |||
141 | newColUL.x() <= it->second.upper) { | 141 | newColUL.x() <= it->second.upper) { |
142 | int colliderSpriteId = std::get<1>(it->first); | 142 | int colliderSpriteId = std::get<1>(it->first); |
143 | Sprite& collider = game_.getSprite(colliderSpriteId); | 143 | Sprite& collider = game_.getSprite(colliderSpriteId); |
144 | result.horiz.blocked = collider.solid; | 144 | result.vert.blocked = collider.solid; |
145 | result.horiz.dir = Direction::down; | 145 | result.vert.dir = Direction::down; |
146 | result.horiz.colliderSprite = colliderSpriteId; | 146 | result.vert.colliderSprite = colliderSpriteId; |
147 | 147 | ||
148 | break; | 148 | break; |
149 | } | 149 | } |
@@ -173,9 +173,9 @@ CollisionResult TransformSystem::checkCollision(int spriteId, vec2i newLoc, Dire | |||
173 | newColUL.x() <= it->second.upper) { | 173 | newColUL.x() <= it->second.upper) { |
174 | int colliderSpriteId = std::get<1>(it->first); | 174 | int colliderSpriteId = std::get<1>(it->first); |
175 | Sprite& collider = game_.getSprite(colliderSpriteId); | 175 | Sprite& collider = game_.getSprite(colliderSpriteId); |
176 | result.horiz.blocked = collider.solid; | 176 | result.vert.blocked = collider.solid; |
177 | result.horiz.dir = Direction::up; | 177 | result.vert.dir = Direction::up; |
178 | result.horiz.colliderSprite = colliderSpriteId; | 178 | result.vert.colliderSprite = colliderSpriteId; |
179 | 179 | ||
180 | break; | 180 | break; |
181 | } | 181 | } |