Ejemplo n.º 1
0
    def monitorHealth(self, task):
        if not hasattr(self, 'battle') or hasattr(
                self, 'battle') and self.battle is None:
            return task.done

        if self.isDead():
            self.battle.suitHPAtZero(self.doId)
        return DistributedSuitAI.monitorHealth(self, task)
Ejemplo n.º 2
0
 def monitorHealth(self, task):
     ret = DistributedSuitAI.monitorHealth(self, task)
     if self.isDead():
         try:
             self.vp.suitDie()
         except:
             pass
         return task.done
     return ret
Ejemplo n.º 3
0
    def monitorHealth(self, task):
        if self.isDead():
            # No! I'm dead! I lost my building!
            self.bldg.takenBySuit = False

            self.sendUpdate('interruptTakeOver')
            if self.takeOverTrack:
                self.takeOverTrack.pause()
                self.takeOverTrack = None
        return DistributedSuitAI.monitorHealth(self, task)
Ejemplo n.º 4
0
 def monitorHealth(self, task):
     ret = DistributedSuitAI.monitorHealth(self, task)
     if self.isDead():
         self.dispatchOutput("OnDie")
         return task.done
     return ret