Remove logs

This commit is contained in:
Miloslav Číž 2019-10-22 12:14:45 +02:00
parent be8eacc7fa
commit 7841c518b2

11
main.c
View File

@ -1236,25 +1236,16 @@ RCL_Vector2D SFG_resolveCollisionWithElement(
RCL_Unit dx = RCL_absVal(elementPos.x - position.x); RCL_Unit dx = RCL_absVal(elementPos.x - position.x);
RCL_Unit dy = RCL_absVal(elementPos.y - position.y); RCL_Unit dy = RCL_absVal(elementPos.y - position.y);
RCL_logV2D(position);
RCL_logV2D(moveOffset);
RCL_logV2D(elementPos);
printf("%d %d\n",dx,dy);
if (dx > dy) if (dx > dy)
{ {
// colliding from left/right // colliding from left/right
printf("x\n");
if ((moveOffset.x > 0) == (position.x < elementPos.x)) if ((moveOffset.x > 0) == (position.x < elementPos.x))
moveOffset.x = 0; moveOffset.x = 0;
// ^ if heading towards element, // ^ only stop if heading towards element, to avoid getting stuck
} }
else else
{ {
printf("y\n");
// colliding from up/down // colliding from up/down
if ((moveOffset.y > 0) == (position.y < elementPos.y)) if ((moveOffset.y > 0) == (position.y < elementPos.y))