From c56cf009e7e6c1c535e93678b578829ab861d339 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 5 Oct 2020 23:30:10 -0700 Subject: [PATCH] Use SDL_abs() instead of libc abs() in Logic.cpp There are other instances where SDL_abs() should be used, but I'm fine with at least fixing these for now. --- desktop_version/src/Logic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index 9f220312..ea294eab 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -890,7 +890,7 @@ void gamelogic() { if (obj.entities[i].isplatform) { - if(abs(obj.entities[i].vx) < 0.000001f) + if(SDL_abs(obj.entities[i].vx) < 0.000001f) { obj.removeblockat(obj.entities[i].xp, obj.entities[i].yp); @@ -916,7 +916,7 @@ void gamelogic() { if (obj.entities[ie].isplatform) { - if(abs(obj.entities[ie].vy) < 0.000001f) + if(SDL_abs(obj.entities[ie].vy) < 0.000001f) { obj.removeblockat(obj.entities[ie].xp, obj.entities[ie].yp);