void TestIfPlayerTouchesCustomElement(int x, int y)
{
+ static boolean check_changing = FALSE;
static int xy[4][2] =
{
{ 0, -1 },
boolean center_is_player = (IS_PLAYER(x, y));
int i;
+ /* prevent TestIfPlayerTouchesCustomElement() from looping */
+ if (check_changing)
+ return;
+
+ check_changing = TRUE;
+
for (i=0; i<4; i++)
{
int xx = x + xy[i][0];
break;
}
}
+
+ check_changing = FALSE;
}
void TestIfElementTouchesCustomElement(int x, int y)
{
+ static boolean check_changing = FALSE;
static int xy[4][2] =
{
{ 0, -1 },
boolean center_is_custom = (IS_CUSTOM_ELEMENT(Feld[x][y]));
int i;
+ /* prevent TestIfElementTouchesCustomElement() from looping */
+ if (check_changing)
+ return;
+
+ check_changing = TRUE;
+
for (i=0; i<4; i++)
{
int xx = x + xy[i][0];
CheckElementChange(xx, yy, Feld[xx][yy], CE_OTHER_IS_TOUCHING);
}
}
+
+ check_changing = FALSE;
}
void TestIfGoodThingHitsBadThing(int good_x, int good_y, int good_move_dir)