summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rwxr-xr-xsrc/modules/modAI.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/modAI.c b/src/modules/modAI.c
index ccd444a..372e8cb 100755
--- a/src/modules/modAI.c
+++ b/src/modules/modAI.c
@@ -209,10 +209,6 @@ static void eventTuxAI(tux_t *tux)
int countLimit = 0;
int countDo = 0;
- listAlternative = newList();
- listDst = newList();
- listFork = newList();
-
export_fce->fce_getTuxProportion(tux, &x, &y, &w, &h);
//printf("tux AI %d %d\n", x, y);
@@ -225,6 +221,10 @@ static void eventTuxAI(tux_t *tux)
return;
}
+ listAlternative = newList();
+ listDst = newList();
+ listFork = newList();
+
shotTux(arena, tux, rivalTux);
export_fce->fce_getTuxProportion(rivalTux, &rival_x, &rival_y, NULL, NULL);
@@ -330,6 +330,7 @@ static void eventTuxAI(tux_t *tux)
export_fce->fce_actionTux(tux, recRoute);
}
+ destroyListItem(listFork, destroyAlternative);
destroyListItem(listAlternative, destroyAlternative);
destroyListItem(listDst, destroyAlternative);
/*