diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-29 16:53:33 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-29 16:53:33 +0100 |
| commit | 04024078984bbaf84f34352061da2a224ecdb0b0 (patch) | |
| tree | e576cdd0451e06d96c71131c551b1bc32d633f0d /src/math_helper.c | |
| parent | 61c5fb1e253f31d2faa3a0fc970ce4e18f32b205 (diff) | |
fix throwable collision
Diffstat (limited to 'src/math_helper.c')
| -rw-r--r-- | src/math_helper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/math_helper.c b/src/math_helper.c index b795fe2..51db867 100644 --- a/src/math_helper.c +++ b/src/math_helper.c @@ -30,11 +30,11 @@ vec2f get_dir_of_line(vec2f p1, vec2f p2) { } bool neg2(float p1, float p2) { - return p1 < 0.0f && p2 < 0.0f || abs(p1-p2) < 1.0f; + return p1 < 0.0f && p2 < 0.0f || abs(p1-p2) < 1.5f; } bool pos2(float p1, float p2) { - return (p1 >= 0.0f && p2 >= 0.0f) || abs(p1-p2) < 1.0f; + return (p1 >= 0.0f && p2 >= 0.0f) || abs(p1-p2) < 1.5f; } vec3f get_center_of_square(vec3f position, vec3f size) { @@ -68,7 +68,7 @@ bool lines_intersect(vec2f p1, vec2f q1, vec2f p2, vec2f q2) // p2, q2 and q1 are collinear and q1 lies on segment p2q2 if (o4 == 0 && onSegment(p2, q1, q2)) return true; - + return false; // Doesn't fall in any of the above cases } |
