Browse Source

remove states/col at ant die

Bastien Sevajol 9 years ago
parent
commit
53bb5e5ef2
1 changed files with 8 additions and 0 deletions
  1. 8 0
      intelligine/synergy/object/ant/Ant.py

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

@@ -23,6 +23,14 @@ class Ant(Bug):
23 23
         self._brain.switch_to_mode(MOVE_MODE_EXPLO)
24 24
         context.metas.list.add(TYPE, self.get_id(), TYPE_ANT)
25 25
 
26
+    def die(self):
27
+        super().die()
28
+        self._remove_state(TRANSPORTER)
29
+        self._remove_state(ATTACKER)
30
+        self._remove_col(COL_TRANSPORTER)
31
+        self._remove_col(COL_TRANSPORTER_NOT_CARRYING)
32
+        self._remove_col(COL_FIGHTER)
33
+
26 34
     def _get_brain_instance(self):
27 35
         return AntBrain(self._context, self)
28 36