diff options
author | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-10-07 15:06:24 -0400 |
---|---|---|
committer | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-10-07 15:06:24 -0400 |
commit | 9cef5e64ddd1ef20369b25cc19b1980084ebaefe (patch) | |
tree | 3ec2a1f80dc7eed34d2859016e568d04c44565e1 /src/world.cpp | |
parent | 17ae15b41c5ec912c36956dbc38e5a95af0ac648 (diff) |
Added image based hitbox detection
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/world.cpp b/src/world.cpp index 8c15ccc..a3923fa 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -128,11 +128,12 @@ double World::getHeight(double x, double y, double z) int h = 0.0; for (auto b : l.hitbox[wx]) { - if (b) + if (b == true) Y = h; h++; } - return Y; + std::cout << l.drawLayer << "," << wx << "," << Y << std::endl; + return (Y/unitSize); } } return 0; |