Browse Source

remove al intention to a killed soldier

Bastien Sevajol 6 years ago
parent
commit
586f6f5e45
1 changed files with 2 additions and 0 deletions
  1. 2 0
      opencombat/simulation/behaviour.py

+ 2 - 0
opencombat/simulation/behaviour.py View File

@@ -120,11 +120,13 @@ class EngageOpponent(AliveSubjectBehaviour):
120 120
 
121 121
         # Must be check if target is not already dead (killed same cycle)
122 122
         if kill and COLLECTION_ALIVE in target_subject.collections:
123
+            # TODO: refact ? All in same place for dead ?
123 124
             target_subject.collections.remove(COLLECTION_ALIVE)
124 125
             # FIXME: Must be automatic when manipulate subject collections !
125 126
             self.simulation.collections[COLLECTION_ALIVE].remove(target_subject_id)
126 127
             self.simulation.collections[COLLECTION_ALIVE] = self.simulation.collections[COLLECTION_ALIVE]
127 128
             events.append(DieEvent(shooter_subject_id=self.subject.id, shoot_subject_id=target_subject_id))
129
+            target_subject.intentions.remove_all()
128 130
 
129 131
         return events
130 132