mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-21 16:35:08 -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 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)
|
||||
{
|
||||
// colliding from left/right
|
||||
|
||||
printf("x\n");
|
||||
|
||||
if ((moveOffset.x > 0) == (position.x < elementPos.x))
|
||||
moveOffset.x = 0;
|
||||
// ^ if heading towards element,
|
||||
// ^ only stop if heading towards element, to avoid getting stuck
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("y\n");
|
||||
// colliding from up/down
|
||||
|
||||
if ((moveOffset.y > 0) == (position.y < elementPos.y))
|
||||
moveOffset.y = 0;
|
||||
moveOffset.y = 0;
|
||||
}
|
||||
|
||||
return moveOffset;
|
||||
|
Loading…
Reference in New Issue
Block a user