Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @registerEvent(Vehicle, 'onHealthChanged')
- def onHealthChanged(self, newHealth, attackerID, attackReasonID):
- global on_fire
- if self.isPlayerVehicle and data.data['isAlive']:
- data.onHealthChanged(self, newHealth, attackerID, attackReasonID)
- if (newHealth <= 0):
- on_fire = 0
- as_event('ON_FIRE')
- elif hasattr(BigWorld.player().inputHandler.ctrl, 'curVehicleID'):
- vId = BigWorld.player().inputHandler.ctrl.curVehicleID
- v = vId if isinstance(vId, Vehicle) else BigWorld.entity(vId)
- if (v is not None) and ((self.id == v.id) and not v.isAlive()):
- on_fire = 0
- as_event('ON_FIRE')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement