mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-22 00:42:16 -05:00
Remove logs
This commit is contained in:
parent
be8eacc7fa
commit
7841c518b2
13
main.c
13
main.c
@ -1236,29 +1236,20 @@ 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))
|
||||||
moveOffset.y = 0;
|
moveOffset.y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return moveOffset;
|
return moveOffset;
|
||||||
|
Loading…
Reference in New Issue
Block a user