diff options
| author | Dennis Felsing <dennis.felsing@sap.com> | 2017-06-22 09:47:18 +0200 |
|---|---|---|
| committer | Dennis Felsing <dennis.felsing@sap.com> | 2017-06-22 09:47:18 +0200 |
| commit | fc6d8b4d154049e6e3d6df9039669580f8ff747c (patch) | |
| tree | 5e64f811b7c3076126ea6772cbe3cc572b17b773 /src/game/collision.h | |
| parent | c1eed6e1776f48409e9d7372948e2c941dcad459 (diff) | |
| download | zcatch-fc6d8b4d154049e6e3d6df9039669580f8ff747c.tar.gz zcatch-fc6d8b4d154049e6e3d6df9039669580f8ff747c.zip | |
Use round_to_int because of collision with std::round
Diffstat (limited to 'src/game/collision.h')
| -rw-r--r-- | src/game/collision.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/collision.h b/src/game/collision.h index d16f2d56..cad75bb4 100644 --- a/src/game/collision.h +++ b/src/game/collision.h @@ -25,9 +25,9 @@ public: CCollision(); void Init(class CLayers *pLayers); - bool CheckPoint(float x, float y) { return IsTileSolid(round(x), round(y)); } + bool CheckPoint(float x, float y) { return IsTileSolid(round_to_int(x), round_to_int(y)); } bool CheckPoint(vec2 Pos) { return CheckPoint(Pos.x, Pos.y); } - int GetCollisionAt(float x, float y) { return GetTile(round(x), round(y)); } + int GetCollisionAt(float x, float y) { return GetTile(round_to_int(x), round_to_int(y)); } int GetWidth() { return m_Width; }; int GetHeight() { return m_Height; }; int IntersectLine(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision); |