Browse Source

Signal host moved when set position

Bastien Sevajol 9 years ago
parent
commit
33e2887895

+ 0 - 1
intelligine/synergy/event/move/MoveAction.py View File

@@ -118,7 +118,6 @@ class MoveAction(Action):
118 118
     @staticmethod
119 119
     def _appose_pheromone(obj, context):
120 120
         # TODO: Cette action de pheromone doit etre une surcharge de Move afin d'avoir une Action Move generique.
121
-        obj.get_brain().host_moved()  # TODO: Auto quand set_position ? (test iit)
122 121
         try:
123 122
             DirectionPheromone.appose(context,
124 123
                                       obj.get_position(),

+ 2 - 0
intelligine/synergy/object/ant/Ant.py View File

@@ -55,6 +55,8 @@ class Ant(Bug):
55 55
 
56 56
     # TODO: Est-ce ici que doit etre ce code ?
57 57
     def set_position(self, position):
58
+        if self._position is not None:
59
+            self._brain.host_moved()
58 60
         super().set_position(position)
59 61
         if self.is_carrying():
60 62
             for obj_carried in self._carried: