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.
This commit is contained in:
Misa
2020-10-05 23:30:10 -07:00
committed by Ethan Lee
parent 71c8c54313
commit c56cf009e7

View File

@@ -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);