Beispiel #1
0
 def startVisual(self):
     assert not self.isStarted
     avatar = BigWorld.player()
     self.appearance.preStart(self.typeDescriptor)
     self.appearance.start(self, self.__prereqs)
     self.__prereqs = None
     self.appearance.changeEngineMode(self.engineMode)
     self.appearance.onVehicleHealthChanged()
     if self.isPlayer:
         if self.isAlive():
             BigWorld.wgAddEdgeDetectEntity(self, 0, 1, True)
             self.appearance.setupGunMatrixTargets(avatar.gunRotator)
     if hasattr(self.filter, 'allowStrafeCompensation'):
         self.filter.allowStrafeCompensation = not self.isPlayer
     self.isStarted = True
     self.set_publicStateModifiers()
     self.set_damageStickers()
     g_sessionProvider.getFeedback().startVehicleVisual(self.proxy)
     if not self.isAlive():
         self.__onVehicleDeath(True)
     if self.isTurretMarkedForDetachment:
         self.confirmTurretDetachment()
     self.__startWGPhysics()
     if self is BigWorld.player().getVehicleAttached():
         nationId = self.typeDescriptor.type.id[0]
         SoundGroups.g_instance.soundModes.setCurrentNation(
             nations.NAMES[nationId])
Beispiel #2
0
 def startVisual(self):
     if not not self.isStarted:
         raise AssertionError
         avatar = BigWorld.player()
         self.appearance.preStart(self.typeDescriptor, self.physicsMode == VEHICLE_PHYSICS_MODE.DETAILED)
         self.appearance.start(self, self.__prereqs)
         self.assembler.constructAppearance(self.__prereqs)
         del self.assembler
         self.appearance.startSystems()
         self.__prereqs = None
         self.appearance.changeEngineMode(self.engineMode)
         self.appearance.onVehicleHealthChanged()
         if self.isPlayerVehicle:
             if self.isAlive():
                 self.appearance.setupGunMatrixTargets(avatar.gunRotator)
         if hasattr(self.filter, 'allowStrafeCompensation'):
             self.filter.allowStrafeCompensation = not self.isPlayerVehicle
         self.isStarted = True
         self.set_publicStateModifiers()
         self.set_damageStickers()
         g_sessionProvider.getFeedback().startVehicleVisual(self.proxy, True)
         if not self.isAlive():
             self.__onVehicleDeath(True)
         if self.isTurretMarkedForDetachment:
             self.confirmTurretDetachment()
         self.__startWGPhysics()
         nationId = self is BigWorld.player().getVehicleAttached() and self.typeDescriptor.type.id[0]
         SoundGroups.g_instance.soundModes.setCurrentNation(nations.NAMES[nationId])
     return
Beispiel #3
0
    def showDamageFromShot(self, attackerID, points, effectsIndex):
        if not self.isStarted:
            return
        effectsDescr = vehicles.g_cache.shotEffects[effectsIndex]
        maxHitEffectCode, decodedPoints = DamageFromShotDecoder.decodeHitPoints(points, self.typeDescriptor)
        hasPiercedHit = DamageFromShotDecoder.hasDamaged(maxHitEffectCode)
        for shotPoint in decodedPoints:
            showFullscreenEffs = self.isPlayer and self.isAlive()
            keyPoints, effects, _ = effectsDescr[shotPoint.hitEffectGroup]
            self.appearance.modelsDesc[shotPoint.componentName]['boundEffects'].addNew(shotPoint.matrix, effects, keyPoints, isPlayer=self.isPlayer, showShockWave=showFullscreenEffs, showFlashBang=showFullscreenEffs, entity_id=self.id)

        if decodedPoints:
            firstHitPoint = decodedPoints[0]
            compMatrix = Math.Matrix(self.appearance.modelsDesc[firstHitPoint.componentName]['model'].matrix)
            firstHitDirLocal = firstHitPoint.matrix.applyToAxis(2)
            firstHitDir = compMatrix.applyVector(firstHitDirLocal)
            self.appearance.receiveShotImpulse(firstHitDir, effectsDescr['targetImpulse'])
            self.appearance.executeHitVibrations(maxHitEffectCode)
            player = BigWorld.player()
            player.inputHandler.onVehicleShaken(self, compMatrix.translation, firstHitDir, effectsDescr['caliber'], ShakeReason.HIT if hasPiercedHit else ShakeReason.HIT_NO_DAMAGE)
        if not self.isAlive():
            return
        if attackerID == BigWorld.player().playerVehicleID and maxHitEffectCode is not None and not self.isPlayer:
            if hasPiercedHit:
                eventID = _GUI_EVENT_ID.VEHICLE_ARMOR_PIERCED
            else:
                eventID = _GUI_EVENT_ID.VEHICLE_HIT
            g_sessionProvider.getFeedback().setVehicleState(self.id, eventID)
Beispiel #4
0
 def set_isCrewActive(self, prev):
     if self.isStarted:
         self.appearance.onVehicleHealthChanged()
         if not self.isPlayer:
             g_sessionProvider.getFeedback().setVehicleNewHealth(self.id, self.health)
         if not self.isCrewActive and self.health > 0:
             self.__onVehicleDeath()
Beispiel #5
0
 def startVisual(self):
     assert not self.isStarted
     avatar = BigWorld.player()
     self.appearance.preStart(self.typeDescriptor)
     self.appearance.start(self, self.__prereqs)
     self.__prereqs = None
     self.appearance.changeEngineMode(self.engineMode)
     self.appearance.onVehicleHealthChanged()
     if self.isPlayer:
         if self.isAlive():
             BigWorld.wgAddEdgeDetectEntity(self, 0, 1, True)
             self.appearance.setupGunMatrixTargets(avatar.gunRotator)
     if hasattr(self.filter, 'allowStrafeCompensation'):
         self.filter.allowStrafeCompensation = not self.isPlayer
     self.isStarted = True
     self.set_publicStateModifiers()
     self.set_damageStickers()
     g_sessionProvider.getFeedback().startVehicleVisual(self.proxy)
     if not self.isAlive():
         self.__onVehicleDeath(True)
     if self.isTurretMarkedForDetachment:
         self.confirmTurretDetachment()
     self.__startWGPhysics()
     if self is BigWorld.player().getVehicleAttached():
         nationId = self.typeDescriptor.type.id[0]
         SoundGroups.g_instance.soundModes.setCurrentNation(nations.NAMES[nationId])
Beispiel #6
0
 def set_isCrewActive(self, prev):
     if self.isStarted:
         self.appearance.onVehicleHealthChanged()
         if not self.isPlayer:
             g_sessionProvider.getFeedback().setVehicleNewHealth(
                 self.id, self.health)
         if not self.isCrewActive and self.health > 0:
             self.__onVehicleDeath()
Beispiel #7
0
 def __onVehicleDeath(self, isDeadStarted = False):
     if not self.isPlayer:
         g_sessionProvider.getFeedback().setVehicleState(self.id, _GUI_EVENT_ID.VEHICLE_DEAD, isDeadStarted)
     self.stopHornSound(True)
     TriggersManager.g_manager.fireTrigger(TRIGGER_TYPE.VEHICLE_DESTROYED, vehicleId=self.id)
     bwfilter = self.filter
     if hasattr(bwfilter, 'velocityErrorCompensation'):
         bwfilter.velocityErrorCompensation = 100.0
Beispiel #8
0
 def stopVisual(self):
     raise self.isStarted or AssertionError
     self.__stopExtras()
     g_sessionProvider.getFeedback().stopVehicleVisual(self.id, self.isPlayer)
     self.appearance.destroy()
     self.appearance = None
     self.isStarted = False
     self.__stopWGPhysics()
     return
Beispiel #9
0
 def __onVehicleDeath(self, isDeadStarted=False):
     if not self.isPlayer:
         g_sessionProvider.getFeedback().setVehicleState(
             self.id, _GUI_EVENT_ID.VEHICLE_DEAD, isDeadStarted)
     self.stopHornSound(True)
     TriggersManager.g_manager.fireTrigger(TRIGGER_TYPE.VEHICLE_DESTROYED,
                                           vehicleId=self.id)
     bwfilter = self.filter
     if hasattr(bwfilter, 'velocityErrorCompensation'):
         bwfilter.velocityErrorCompensation = 100.0
Beispiel #10
0
 def stopVisual(self):
     assert self.isStarted
     if self.isPlayer:
         BigWorld.wgDelEdgeDetectEntity(self)
     self.__stopExtras()
     g_sessionProvider.getFeedback().stopVehicleVisual(self.id, self.isPlayer)
     self.appearance.destroy()
     self.appearance = None
     self.isStarted = False
     self.__stopWGPhysics()
Beispiel #11
0
 def onHealthChanged(self, newHealth, attackerID, attackReasonID):
     if newHealth > 0 and self.health <= 0:
         self.health = newHealth
         return
     if not self.isStarted:
         return
     if not self.isPlayer:
         g_sessionProvider.getFeedback().setVehicleNewHealth(self.id, newHealth, attackerID, attackReasonID)
     self.appearance.onVehicleHealthChanged()
     if self.health <= 0 and self.isCrewActive:
         self.__onVehicleDeath()
Beispiel #12
0
 def stopVisual(self):
     if not self.isStarted:
         raise AssertionError
         self.isPlayer and BigWorld.wgDelEdgeDetectEntity(self)
     self.__stopExtras()
     g_sessionProvider.getFeedback().stopVehicleVisual(self.id, self.isPlayer)
     self.appearance.destroy()
     self.appearance = None
     self.isStarted = False
     self.__stopWGPhysics()
     return
Beispiel #13
0
 def stopVisual(self):
     assert self.isStarted
     if self.isPlayer:
         BigWorld.wgDelEdgeDetectEntity(self)
     self.__stopExtras()
     g_sessionProvider.getFeedback().stopVehicleVisual(
         self.id, self.isPlayer)
     self.appearance.destroy()
     self.appearance = None
     self.isStarted = False
     self.__stopWGPhysics()
Beispiel #14
0
 def onHealthChanged(self, newHealth, attackerID, attackReasonID):
     if newHealth > 0 and self.health <= 0:
         self.health = newHealth
         return
     if not self.isStarted:
         return
     if not self.isPlayer:
         g_sessionProvider.getFeedback().setVehicleNewHealth(
             self.id, newHealth, attackerID, attackReasonID)
     self.appearance.onVehicleHealthChanged()
     if self.health <= 0 and self.isCrewActive:
         self.__onVehicleDeath()
Beispiel #15
0
 def destroy(self):
     g_eventBus.removeListener(GameEvent.SHOW_EXTENDED_INFO,
                               self.__handleShowExtendedInfo,
                               scope=_SCOPE)
     g_eventBus.removeListener(GameEvent.GUI_VISIBILITY,
                               self.__handleGUIVisibility,
                               scope=_SCOPE)
     self.__plugins.stop()
     g_settingsCore.interfaceScale.onScaleChanged -= self.updateMarkersScale
     ctrl = g_sessionProvider.getFeedback()
     if ctrl is not None:
         ctrl.onVehicleMarkerAdded -= self.__onVehicleMarkerAdded
         ctrl.onVehicleMarkerRemoved -= self.__onVehicleMarkerRemoved
         ctrl.onVehicleFeedbackReceived -= self.__onVehicleFeedbackReceived
     functional = g_sessionProvider.getDynSquadFunctional()
     if functional is not None:
         functional.onPlayerBecomeSquadman -= self.__onPlayerBecomeSquadman
     if self.__parentUI is not None:
         setattr(self.__parentUI.component, 'vehicleMarkersManager', None)
     self.__plugins.fini()
     self.__parentUI = None
     self.__ownUI = None
     self.__markersCanvasUI = None
     self.colorManager.dispossessUI()
     self.close()
     return
Beispiel #16
0
 def start(self):
     self.active(True)
     self.__ownUI = GUI.WGVehicleMarkersCanvasFlash(self.movie)
     self.__ownUI.wg_inputKeyMode = 2
     self.__ownUI.scaleProperties = GUI_SETTINGS.markerScaleSettings
     self.__ownUI.alphaProperties = GUI_SETTINGS.markerBgSettings
     self.__ownUIProxy = weakref.ref(self.__ownUI)
     self.__ownUIProxy().markerSetScale(g_settingsCore.interfaceScale.get())
     g_settingsCore.interfaceScale.onScaleChanged += self.updateMarkersScale
     self.__parentUI.component.addChild(self.__ownUI,
                                        'vehicleMarkersManager')
     self.__markersCanvasUI = self.getMember('vehicleMarkersCanvas')
     self.__plugins.init()
     ctrl = g_sessionProvider.getFeedback()
     if ctrl is not None:
         ctrl.onVehicleMarkerAdded += self.__onVehicleMarkerAdded
         ctrl.onVehicleMarkerRemoved += self.__onVehicleMarkerRemoved
         ctrl.onVehicleFeedbackReceived += self.__onVehicleFeedbackReceived
     functional = g_sessionProvider.getDynSquadFunctional()
     if functional is not None:
         functional.onPlayerBecomeSquadman += self.__onPlayerBecomeSquadman
     self.__plugins.start()
     g_eventBus.addListener(GameEvent.SHOW_EXTENDED_INFO,
                            self.__handleShowExtendedInfo,
                            scope=_SCOPE)
     g_eventBus.addListener(GameEvent.GUI_VISIBILITY,
                            self.__handleGUIVisibility,
                            scope=_SCOPE)
     return
Beispiel #17
0
def PlayerAvatar_showOtherVehicleDamagedDevices(self, vehicleID, damagedExtras,
                                                destroyedExtras):
    #print 'PlayerAvatar_showOtherVehicleDamagedDevices'
    global gExpertTarget
    if gExpertTarget is not None:
        target = gExpertTarget
        feedback = g_sessionProvider.getFeedback()
        if not isinstance(target, Vehicle.Vehicle):
            if self._PlayerAvatar__maySeeOtherVehicleDamagedDevices and vehicleID != 0:
                self.cell.monitorVehicleDamagedDevices(0)
                #print 'PlayerAvatar_showOtherVehicleDamagedDevices monitor {0}'.format(0)
                #FLUSH_LOG()
        elif target.id == vehicleID:
            feedback.showVehicleDamagedDevices(vehicleID,
                                               damagedExtras,
                                               destroyedExtras,
                                               avatar=self)
        else:
            if self._PlayerAvatar__maySeeOtherVehicleDamagedDevices:
                self.cell.monitorVehicleDamagedDevices(target.id)
                #print 'PlayerAvatar_showOtherVehicleDamagedDevices monitor {0}'.format(target.id)
                #FLUSH_LOG()
            feedback.hideVehicleDamagedDevices(vehicleID)
    else:
        old_PlayerAvatar_showOtherVehicleDamagedDevices(
            self, vehicleID, damagedExtras, destroyedExtras)
Beispiel #18
0
 def showDamageFromExplosion(self, attackerID, center, effectsIndex):
     if not self.isStarted:
         return
     impulse = vehicles.g_cache.shotEffects[effectsIndex]['targetImpulse']
     dir = self.position - center
     dir.normalise()
     self.appearance.receiveShotImpulse(dir, impulse / 4.0)
     self.appearance.executeHitVibrations(VEHICLE_HIT_EFFECT.MAX_CODE + 1)
     if not self.isAlive():
         return
     if self.id == attackerID:
         return
     player = BigWorld.player()
     player.inputHandler.onVehicleShaken(self, center, dir, vehicles.g_cache.shotEffects[effectsIndex]['caliber'], ShakeReason.SPLASH)
     if attackerID == BigWorld.player().playerVehicleID:
         g_sessionProvider.getFeedback().setVehicleState(self.id, _GUI_EVENT_ID.VEHICLE_ARMOR_PIERCED)
Beispiel #19
0
 def start():
     global inBattle
     inBattle = True
     mm.clean()
     if g_sessionProvider is not None and g_sessionProvider.getFeedback() is not None:
         g_sessionProvider._BattleSessionProvider__feedback.stop()
         g_sessionProvider._BattleSessionProvider__feedback = BattleFeedbackAdaptor()
         g_sessionProvider._BattleSessionProvider__feedback.start(g_sessionProvider._BattleSessionProvider__arenaDP)
 def __addListeners(self):
     feedback = g_sessionProvider.getFeedback()
     if feedback:
         feedback.onPlayerFeedbackReceived += self.__onPlayerFeedbackReceived
         feedback.onAimPositionUpdated += self.__onAimPositionUpdated
         props = feedback.getAimProps()
         if props and len(props) > 2:
             self.__onAimPositionUpdated(*props[:3])
     g_settingsCore.onSettingsChanged += self.__onSettingsChanged
 def __addListeners(self):
     feedback = g_sessionProvider.getFeedback()
     if feedback:
         feedback.onPlayerFeedbackReceived += self.__onPlayerFeedbackReceived
         feedback.onAimPositionUpdated += self.__onAimPositionUpdated
         props = feedback.getAimProps()
         if props and len(props) > 2:
             self.__onAimPositionUpdated(*props[:3])
     g_settingsCore.onSettingsChanged += self.__onSettingsChanged
Beispiel #22
0
    def showDamageFromShot(self, attackerID, points, effectsIndex):
        if not self.isStarted:
            return
        effectsDescr = vehicles.g_cache.shotEffects[effectsIndex]
        maxHitEffectCode, decodedPoints = DamageFromShotDecoder.decodeHitPoints(
            points, self.typeDescriptor)
        hasPiercedHit = DamageFromShotDecoder.hasDamaged(maxHitEffectCode)
        for shotPoint in decodedPoints:
            showFullscreenEffs = self.isPlayer and self.isAlive()
            keyPoints, effects, _ = effectsDescr[shotPoint.hitEffectGroup]
            self.appearance.modelsDesc[
                shotPoint.componentName]['boundEffects'].addNew(
                    shotPoint.matrix,
                    effects,
                    keyPoints,
                    isPlayer=self.isPlayer,
                    showShockWave=showFullscreenEffs,
                    showFlashBang=showFullscreenEffs,
                    entity_id=self.id)

        if decodedPoints:
            firstHitPoint = decodedPoints[0]
            compMatrix = Math.Matrix(self.appearance.modelsDesc[
                firstHitPoint.componentName]['model'].matrix)
            firstHitDirLocal = firstHitPoint.matrix.applyToAxis(2)
            firstHitDir = compMatrix.applyVector(firstHitDirLocal)
            self.appearance.receiveShotImpulse(firstHitDir,
                                               effectsDescr['targetImpulse'])
            self.appearance.executeHitVibrations(maxHitEffectCode)
            player = BigWorld.player()
            player.inputHandler.onVehicleShaken(
                self, compMatrix.translation, firstHitDir,
                effectsDescr['caliber'], ShakeReason.HIT
                if hasPiercedHit else ShakeReason.HIT_NO_DAMAGE)
        if not self.isAlive():
            return
        if attackerID == BigWorld.player(
        ).playerVehicleID and maxHitEffectCode is not None and not self.isPlayer:
            if hasPiercedHit:
                eventID = _GUI_EVENT_ID.VEHICLE_ARMOR_PIERCED
            else:
                eventID = _GUI_EVENT_ID.VEHICLE_HIT
            g_sessionProvider.getFeedback().setVehicleState(self.id, eventID)
Beispiel #23
0
 def showDamageFromExplosion(self, attackerID, center, effectsIndex):
     if not self.isStarted:
         return
     impulse = vehicles.g_cache.shotEffects[effectsIndex]['targetImpulse']
     dir = self.position - center
     dir.normalise()
     self.appearance.receiveShotImpulse(dir, impulse / 4.0)
     self.appearance.executeHitVibrations(VEHICLE_HIT_EFFECT.MAX_CODE + 1)
     if not self.isAlive():
         return
     if self.id == attackerID:
         return
     player = BigWorld.player()
     player.inputHandler.onVehicleShaken(
         self, center, dir,
         vehicles.g_cache.shotEffects[effectsIndex]['caliber'],
         ShakeReason.SPLASH)
     if attackerID == BigWorld.player().playerVehicleID:
         g_sessionProvider.getFeedback().setVehicleState(
             self.id, _GUI_EVENT_ID.VEHICLE_ARMOR_PIERCED)
Beispiel #24
0
    def onHealthChanged(self, newHealth, attackerID, attackReasonID):
        if newHealth > 0 and self.health <= 0:
            self.health = newHealth
            return
        if not self.isStarted:
            return

        # Update Tank Health
        damage = self.__tankHealth[self.__battleID] - newHealth
        self.__tankHealth[self.__battleID] = newHealth

        if attackReasonID == 0:
            self.damage_announce(attackerID, damage)

        if not self.isPlayer:
            marker = getattr(self, 'marker', None)
            if marker is not None:
                g_sessionProvider.getFeedback().setVehicleNewHealth(self.id, newHealth, attackerID, attackReasonID)
                g_windowsManager.battleWindow.markersManager.onVehicleHealthChanged(marker, newHealth, attackerID, attackReasonID)
        self.appearance.onVehicleHealthChanged()
        if self.health <= 0 and self.isCrewActive:
            self.__onVehicleDeath()
Beispiel #25
0
 def update(self, manager):
     feedback = g_sessionProvider.getFeedback()
     vehicle = BigWorld.entities.get(self.__vehicleID)
     if vehicle is not None and vehicle.isStarted and not vehicle.isPlayerVehicle:
         if self.__nextTime <= BigWorld.time():
             if feedback is not None:
                 feedback.showActionMarker(self.__vehicleID, mMarker='attack')
             self.__nextTime = BigWorld.time() + self.__period
         if self.__dIndicator is not None:
             vPosition = vehicle.position
             vector = vPosition - BigWorld.camera().position
             self.__dIndicator.update(vector.length, vPosition)
     return
Beispiel #26
0
 def destroy(self):
     g_eventBus.removeListener(GameEvent.SHOW_EXTENDED_INFO, self.__handleShowExtendedInfo, scope=_SCOPE)
     g_eventBus.removeListener(GameEvent.GUI_VISIBILITY, self.__handleGUIVisibility, scope=_SCOPE)
     self.__plugins.stop()
     g_settingsCore.interfaceScale.onScaleChanged -= self.updateMarkersScale
     ctrl = g_sessionProvider.getFeedback()
     if ctrl:
         ctrl.onVehicleMarkerAdded -= self.__onVehicleMarkerAdded
         ctrl.onVehicleMarkerRemoved -= self.__onVehicleMarkerRemoved
         ctrl.onVehicleFeedbackReceived -= self.__onVehicleFeedbackReceived
     if self.__parentUI is not None:
         setattr(self.__parentUI.component, 'vehicleMarkersManager', None)
     self.__plugins.fini()
     self.__parentUI = None
     self.__ownUI = None
     self.__markersCanvasUI = None
     self.colorManager.dispossessUI()
     self.close()
Beispiel #27
0
 def start(self):
     self.active(True)
     self.__ownUI = GUI.WGVehicleMarkersCanvasFlash(self.movie)
     self.__ownUI.wg_inputKeyMode = 2
     self.__ownUI.scaleProperties = GUI_SETTINGS.markerScaleSettings
     self.__ownUI.alphaProperties = GUI_SETTINGS.markerBgSettings
     self.__ownUIProxy = weakref.ref(self.__ownUI)
     self.__ownUIProxy().markerSetScale(g_settingsCore.interfaceScale.get())
     g_settingsCore.interfaceScale.onScaleChanged += self.updateMarkersScale
     self.__parentUI.component.addChild(self.__ownUI, 'vehicleMarkersManager')
     self.__markersCanvasUI = self.getMember('vehicleMarkersCanvas')
     self.__plugins.init()
     ctrl = g_sessionProvider.getFeedback()
     if ctrl:
         ctrl.onVehicleMarkerAdded += self.__onVehicleMarkerAdded
         ctrl.onVehicleMarkerRemoved += self.__onVehicleMarkerRemoved
         ctrl.onVehicleFeedbackReceived += self.__onVehicleFeedbackReceived
     self.__plugins.start()
     g_eventBus.addListener(GameEvent.SHOW_EXTENDED_INFO, self.__handleShowExtendedInfo, scope=_SCOPE)
     g_eventBus.addListener(GameEvent.GUI_VISIBILITY, self.__handleGUIVisibility, scope=_SCOPE)
def PlayerAvatar_showOtherVehicleDamagedDevices(self, vehicleID, damagedExtras, destroyedExtras):
    #print 'PlayerAvatar_showOtherVehicleDamagedDevices'
    global gExpertTarget
    if gExpertTarget is not None:
        target = gExpertTarget
        feedback = g_sessionProvider.getFeedback()
        if not isinstance(target, Vehicle.Vehicle):
            if self._PlayerAvatar__maySeeOtherVehicleDamagedDevices and vehicleID != 0:
                self.cell.monitorVehicleDamagedDevices(0)
                #print 'PlayerAvatar_showOtherVehicleDamagedDevices monitor {0}'.format(0)
                #FLUSH_LOG()
        elif target.id == vehicleID:
            feedback.showVehicleDamagedDevices(vehicleID, damagedExtras, destroyedExtras, avatar=self)
        else:
            if self._PlayerAvatar__maySeeOtherVehicleDamagedDevices:
                self.cell.monitorVehicleDamagedDevices(target.id)
                #print 'PlayerAvatar_showOtherVehicleDamagedDevices monitor {0}'.format(target.id)
                #FLUSH_LOG()
            feedback.hideVehicleDamagedDevices(vehicleID)
    else:
        old_PlayerAvatar_showOtherVehicleDamagedDevices(self, vehicleID, damagedExtras, destroyedExtras)
 def __removeListeners(self):
     feedback = g_sessionProvider.getFeedback()
     if feedback:
         feedback.onPlayerFeedbackReceived -= self.__onPlayerFeedbackReceived
         feedback.onAimPositionUpdated -= self.__onAimPositionUpdated
     g_settingsCore.onSettingsChanged -= self.__onSettingsChanged
 def __removeListeners(self):
     feedback = g_sessionProvider.getFeedback()
     if feedback:
         feedback.onPlayerFeedbackReceived -= self.__onPlayerFeedbackReceived
         feedback.onAimPositionUpdated -= self.__onAimPositionUpdated
     g_settingsCore.onSettingsChanged -= self.__onSettingsChanged
 def destroy(self):
     feedback = g_sessionProvider.getFeedback()
     if feedback is not None:
         feedback.onVehicleFeedbackReceived -= self.__onVehicleFeedbackReceived
     return
Beispiel #32
0
 def destroy(self):
     feedback = g_sessionProvider.getFeedback()
     if feedback is not None:
         feedback.onVehicleFeedbackReceived -= self.__onVehicleFeedbackReceived
     return