def __onModelsRefresh(self, modelState, resourceList):
     if BattleReplay.isFinished():
         return
     elif self.__vehicle is None:
         return
     else:
         prevTurretYaw = Math.Matrix(self.turretMatrix).yaw
         prevGunPitch = Math.Matrix(self.gunMatrix).pitch
         vehicle = self.__vehicle
         newCompoundModel = resourceList[self.__typeDesc.name]
         self.deactivate(False)
         self.shadowManager.reattachCompoundModel(vehicle,
                                                  self.__compoundModel,
                                                  newCompoundModel)
         self.__compoundModel = newCompoundModel
         self.__isTurretDetached = vehicle.isTurretDetached
         self.__prepareSystemsForDamagedVehicle(vehicle,
                                                self.__isTurretDetached)
         self.__setupModels()
         self.setVehicle(vehicle)
         self.activate()
         self.__reattachComponents(self.__compoundModel,
                                   self.__weaponEnergy)
         self.__filter.syncGunAngles(prevTurretYaw, prevGunPitch)
         model_assembler.setupTurretRotations(self)
         return
 def __onModelsRefresh(self, modelState, resourceList):
     if BattleReplay.isFinished():
         return
     elif modelState != self.__currentDamageState.modelState:
         self.__requestModelsRefresh()
         return
     elif self.__vehicle is None:
         return
     else:
         vehicle = self.__vehicle
         newCompoundModel = resourceList[self.__typeDesc.name]
         self.deactivate(False)
         self.__compoundModel = newCompoundModel
         self.__isTurretDetached = vehicle.isTurretDetached
         if self.__currentDamageState.isCurrentModelDamaged:
             fashions = VehiclePartsTuple(None, None, None, None)
             self.swingingAnimator = None
             self.gunRecoil = None
             self.__setFashions(fashions, self.__isTurretDetached)
             self.__destroySystems()
             self.__trackFashionSet = False
         self.__setupModels()
         self.setVehicle(vehicle)
         self.activate()
         self.__reattachComponents(self.__compoundModel)
         lodLink = DataLinks.createFloatLink(self.lodCalculator, 'lodDistance')
         if not self.damageState.isCurrentModelDamaged:
             model_assembler.assembleRecoil(self, lodLink)
         model_assembler.setupTurretRotations(self)
         return
Ejemplo n.º 3
0
 def __onModelsRefresh(self, modelState, resourceList):
     if BattleReplay.isFinished():
         return
     elif self._vehicle is None:
         return
     else:
         prevTurretYaw = Math.Matrix(self.turretMatrix).yaw
         prevGunPitch = Math.Matrix(self.gunMatrix).pitch
         vehicle = self._vehicle
         newCompoundModel = resourceList[self.typeDescriptor.name]
         isRightSideFlying = self.isRightSideFlying
         isLeftSideFlying = self.isLeftSideFlying
         self.deactivate(False)
         self.shadowManager.reattachCompoundModel(vehicle,
                                                  self.compoundModel,
                                                  newCompoundModel)
         self._compoundModel = newCompoundModel
         self._isTurretDetached = vehicle.isTurretDetached
         self.__prepareSystemsForDamagedVehicle(vehicle,
                                                self.isTurretDetached)
         self.__processPostmortemComponents()
         if isRightSideFlying:
             self.fashion.changeTrackVisibility(False, False)
         if isLeftSideFlying:
             self.fashion.changeTrackVisibility(True, False)
         self._setupModels()
         self.setVehicle(vehicle)
         self.activate()
         self.__reattachComponents(self.compoundModel)
         self.filter.syncGunAngles(prevTurretYaw, prevGunPitch)
         model_assembler.setupTurretRotations(self)
         return
Ejemplo n.º 4
0
 def _assembleParts(self, isPlayer, appearance):
     if appearance.isAlive:
         appearance.detailedEngineState = self.__assembleEngineState(
             isPlayer)
         if not appearance.isPillbox and not gEffectsDisabled():
             appearance.engineAudition = self.__assembleEngineAudition(
                 isPlayer, appearance)
             appearance.detailedEngineState.onEngineStart += appearance.engineAudition.onEngineStart
             appearance.detailedEngineState.onStateChanged += appearance.engineAudition.onStateChanged
             createEffects(appearance)
         if isPlayer:
             gunRotatorConnector = GunRotatorConnector(appearance)
             appearance.addComponent(gunRotatorConnector)
             appearance.frictionAudition = Vehicular.FrictionAudition(
                 TANK_FRICTION_EVENT)
     self.__createTrackCrashControl(appearance)
     appearance.highlighter = Highlighter()
     isLodTopPriority = isPlayer
     lodCalcInst = Vehicular.LodCalculator(
         DataLinks.linkMatrixTranslation(appearance.compoundModel.matrix),
         True, VEHICLE_PRIORITY_GROUP, isLodTopPriority)
     appearance.lodCalculator = lodCalcInst
     lodLink = DataLinks.createFloatLink(lodCalcInst, 'lodDistance')
     lodStateLink = lodCalcInst.lodStateLink
     if not appearance.damageState.isCurrentModelDamaged:
         model_assembler.assembleRecoil(appearance, lodLink)
         model_assembler.assembleLeveredSuspensionIfNeed(
             appearance, lodStateLink)
         _assembleSwinging(appearance, lodLink)
         model_assembler.assembleSuspensionSound(appearance, lodLink,
                                                 isPlayer)
         model_assembler.assembleSuspensionController(appearance)
     model_assembler.setupTurretRotations(appearance)
 def __onModelsRefresh(self, modelState, resourceList):
     if not self.damageState.isCurrentModelDamaged:
         _logger.error(
             'Current model is not damaged. Wrong refresh request!')
     if BattleReplay.isFinished():
         return
     else:
         if modelState != self.damageState.modelState:
             _logger.error(
                 'Required modelState differs from actual one. Wrong refresh request!'
             )
         if self._vehicle is None:
             return
         self.highlighter.highlight(False)
         oldHolder = self.findComponentByType(CompoundHolder)
         if oldHolder is not None:
             self.gameObject.removeComponent(oldHolder)
         holder = self.gameObject.createComponent(CompoundHolder,
                                                  self._vehicle.model)
         self.gameObject.removeComponent(holder)
         prevTurretYaw = Math.Matrix(self.turretMatrix).yaw
         prevGunPitch = Math.Matrix(self.gunMatrix).pitch
         newCompoundModel = resourceList[self.typeDescriptor.name]
         isRightSideFlying = self.isRightSideFlying
         isLeftSideFlying = self.isLeftSideFlying
         self._vehicle.filter = self.__originalFilter
         self.filter.reset()
         self.shadowManager.reattachCompoundModel(self._vehicle,
                                                  self.compoundModel,
                                                  newCompoundModel)
         if self.__inSpeedTreeCollision:
             BigWorld.setSpeedTreeCollisionBody(None)
             self.__inSpeedTreeCollision = False
         self._compoundModel = newCompoundModel
         self.removeComponentByType(GenericComponents.DynamicModelComponent)
         self.createComponent(GenericComponents.DynamicModelComponent,
                              self._compoundModel)
         self.collisions = None
         self.collisions = self.createComponent(
             BigWorld.CollisionComponent,
             resourceList['collisionAssembler'])
         model_assembler.setupCollisions(self.typeDescriptor,
                                         self.collisions)
         self.__linkCompound()
         self.__prepareSystemsForDamagedVehicle(self._vehicle,
                                                self.isTurretDetached)
         self.__processPostmortemComponents()
         if isRightSideFlying:
             self.fashion.changeTrackVisibility(False, False,
                                                MAIN_TRACK_PAIR_IDX)
         if isLeftSideFlying:
             self.fashion.changeTrackVisibility(True, False,
                                                MAIN_TRACK_PAIR_IDX)
         self._setupModels()
         self.__reattachComponents(self.compoundModel)
         self._connectCollider()
         self.filter.syncGunAngles(prevTurretYaw, prevGunPitch)
         model_assembler.setupTurretRotations(self)
         self.onModelChanged()
         return
Ejemplo n.º 6
0
 def _assembleParts(self, isPlayer, appearance):
     appearance.filter = model_assembler.createVehicleFilter(
         appearance.typeDescriptor)
     if appearance.isAlive:
         appearance.detailedEngineState = model_assembler.assembleDetailedEngineState(
             appearance.compoundModel, appearance.filter,
             appearance.typeDescriptor, isPlayer)
         if not gEffectsDisabled():
             model_assembler.assembleVehicleAudition(isPlayer, appearance)
             model_assembler.subscribeEngineAuditionToEngineState(
                 appearance.engineAudition, appearance.detailedEngineState)
             createEffects(appearance)
         if isPlayer:
             gunRotatorConnector = GunRotatorConnector(appearance)
             appearance.addComponent(gunRotatorConnector)
             appearance.frictionAudition = Vehicular.FrictionAudition(
                 TANK_FRICTION_EVENT)
             appearance.peripheralsController = PeripheralsController()
     self.__createTrackCrashControl(appearance)
     appearance.highlighter = Highlighter()
     isLodTopPriority = isPlayer
     lodCalcInst = Vehicular.LodCalculator(
         DataLinks.linkMatrixTranslation(appearance.compoundModel.matrix),
         True, VEHICLE_PRIORITY_GROUP, isLodTopPriority)
     appearance.lodCalculator = lodCalcInst
     lodLink = DataLinks.createFloatLink(lodCalcInst, 'lodDistance')
     lodStateLink = lodCalcInst.lodStateLink
     isDamaged = appearance.damageState.isCurrentModelDamaged
     if not isDamaged:
         self.__assembleNonDamagedOnly(appearance, isPlayer, lodLink,
                                       lodStateLink)
     model_assembler.setupTurretRotations(appearance)
     if appearance.fashion is not None:
         appearance.fashion.movementInfo = appearance.filter.movementInfo
     appearance.waterSensor = model_assembler.assembleWaterSensor(
         appearance.typeDescriptor, appearance, lodStateLink)
     if appearance.engineAudition is not None:
         appearance.engineAudition.setIsUnderwaterInfo(
             DataLinks.createBoolLink(appearance.waterSensor,
                                      'isUnderWater'))
         appearance.engineAudition.setIsInWaterInfo(
             DataLinks.createBoolLink(appearance.waterSensor, 'isInWater'))
     if isPlayer and BigWorld.player().isInTutorial:
         tutorialMatKindsController = TutorialMatKindsController()
         tutorialMatKindsController.terrainMatKindsLink = lambda: appearance.terrainMatKind
         appearance.addComponent(tutorialMatKindsController)
     self.__postSetupFilter(appearance)
     return
 def _assembleParts(self, isPlayer, appearance):
     if appearance.isAlive:
         appearance.detailedEngineState = self.__assembleEngineState(isPlayer)
         if not appearance.isPillbox and not gEffectsDisabled():
             appearance.engineAudition = self.__assembleEngineAudition(isPlayer, appearance)
             appearance.detailedEngineState.onEngineStart += appearance.engineAudition.onEngineStart
             appearance.detailedEngineState.onStateChanged += appearance.engineAudition.onStateChanged
             _createEffects(appearance)
         if isPlayer:
             gunRotatorConnector = GunRotatorConnector(appearance)
             appearance.addComponent(gunRotatorConnector)
     self.__createTrackCrashControl(appearance)
     appearance.highlighter = Highlighter()
     lodCalcInst = Vehicular.LodCalculator(DataLinks.linkMatrixTranslation(appearance.compoundModel.matrix), True)
     appearance.lodCalculator = lodCalcInst
     lodLink = DataLinks.createFloatLink(lodCalcInst, 'lodDistance')
     if not appearance.damageState.isCurrentModelDamaged:
         model_assembler.assembleRecoil(appearance, lodLink)
         _assembleSwinging(appearance, lodLink)
     model_assembler.setupTurretRotations(appearance)
Ejemplo n.º 8
0
 def __onModelsRefresh(self, modelState, resourceList):
     if not self.damageState.isCurrentModelDamaged:
         raise AssertionError
         return BattleReplay.isFinished() and None
     elif not modelState == self.__currentDamageState.modelState:
         raise AssertionError
         return self.__vehicle is None and None
     else:
         prevTurretYaw = Math.Matrix(self.turretMatrix).yaw
         prevGunPitch = Math.Matrix(self.gunMatrix).pitch
         vehicle = self.__vehicle
         newCompoundModel = resourceList[self.__typeDesc.name]
         self.deactivate(False)
         self.__compoundModel = newCompoundModel
         self.__isTurretDetached = vehicle.isTurretDetached
         self.__prepareSystemsForDamagedVehicle(vehicle, self.__isTurretDetached)
         self.__setupModels()
         self.setVehicle(vehicle)
         self.activate()
         self.__reattachComponents(self.__compoundModel, self.__weaponEnergy)
         self.__filter.syncGunAngles(prevTurretYaw, prevGunPitch)
         model_assembler.setupTurretRotations(self)
         return None
Ejemplo n.º 9
0
 def _assembleParts(self, isPlayer, appearance):
     if appearance.isAlive:
         appearance.detailedEngineState = self.__assembleEngineState(
             isPlayer)
         if not appearance.isPillbox and not gEffectsDisabled():
             appearance.engineAudition = self.__assembleEngineAudition(
                 isPlayer, appearance)
             appearance.detailedEngineState.onEngineStart += appearance.engineAudition.onEngineStart
             appearance.detailedEngineState.onStateChanged += appearance.engineAudition.onStateChanged
             _createEffects(appearance)
         if isPlayer:
             gunRotatorConnector = GunRotatorConnector(appearance)
             appearance.addComponent(gunRotatorConnector)
     self.__createTrackCrashControl(appearance)
     appearance.highlighter = Highlighter()
     lodCalcInst = Vehicular.LodCalculator(
         DataLinks.linkMatrixTranslation(appearance.compoundModel.matrix),
         True)
     appearance.lodCalculator = lodCalcInst
     lodLink = DataLinks.createFloatLink(lodCalcInst, 'lodDistance')
     if not appearance.damageState.isCurrentModelDamaged:
         model_assembler.assembleRecoil(appearance, lodLink)
         _assembleSwinging(appearance, lodLink)
     model_assembler.setupTurretRotations(appearance)
    def construct(self, isPlayer, resourceRefs):
        self.__isObserver = 'observer' in self.typeDescriptor.type.tags
        self._compoundModel = resourceRefs[self.typeDescriptor.name]
        self.removeComponentByType(GenericComponents.DynamicModelComponent)
        self.createComponent(GenericComponents.DynamicModelComponent,
                             self._compoundModel)
        if not self._compoundModel.isValid():
            _logger.error('compoundModel is not valid')
        if self.typeDescriptor.gun.edgeByVisualModel:
            self._compoundModel.setPartProperties(
                TankPartIndexes.GUN, PartProperties.HIGHLIGHTABLE
                | PartProperties.HIGHLIGHTBYVISUAL)
        self._compoundModel.setPartProperties(
            TankPartIndexes.CHASSIS,
            PartProperties.HIGHLIGHTABLE | PartProperties.HIGHLIGHTBYVISUAL)
        self.__boundEffects = bound_effects.ModelBoundEffects(
            self.compoundModel)
        isCurrentModelDamaged = self.damageState.isCurrentModelDamaged
        fashions = camouflages.prepareFashions(isCurrentModelDamaged)
        if not isCurrentModelDamaged:
            model_assembler.setupTracksFashion(self.typeDescriptor,
                                               fashions.chassis)
        self.collisions = self.createComponent(
            BigWorld.CollisionComponent, resourceRefs['collisionAssembler'])
        model_assembler.setupCollisions(self.typeDescriptor, self.collisions)
        self._setFashions(fashions, self.isTurretDetached)
        self._setupModels()
        if not isCurrentModelDamaged:
            modelsSet = self.outfit.modelsSet
            if IS_EDITOR:
                modelsSet = self.currentModelsSet
            self._splineTracks = model_assembler.setupSplineTracks(
                self.fashion, self.typeDescriptor, self.compoundModel,
                resourceRefs, modelsSet)
            self.crashedTracksController = CrashedTrackController(
                self.typeDescriptor, self.fashion, modelsSet)
        else:
            self.__trackScrollCtl = None
        self._chassisDecal.create()
        if self.modelsSetParams.state == 'undamaged':
            self.__modelAnimators = camouflages.getModelAnimators(
                self.outfit, self.typeDescriptor, self.spaceID, resourceRefs,
                self.compoundModel)
            self.__modelAnimators.extend(
                camouflages.getAttachmentsAnimators(self.__attachments,
                                                    self.spaceID, resourceRefs,
                                                    self.compoundModel))
        self.transform = self.createComponent(
            GenericComponents.TransformComponent, Math.Vector3(0, 0, 0))
        self.areaTriggerTarget = self.createComponent(
            Triggers.AreaTriggerTarget)
        self.__filter = model_assembler.createVehicleFilter(
            self.typeDescriptor)
        compoundModel = self.compoundModel
        if self.isAlive:
            self.detailedEngineState, self.gearbox = model_assembler.assembleDrivetrain(
                self, isPlayer)
            if not gEffectsDisabled():
                self.customEffectManager = CustomEffectManager(self)
                if self.typeDescriptor.hasSiegeMode:
                    self.siegeEffects = SiegeEffectsController(self, isPlayer)
                model_assembler.assembleVehicleAudition(isPlayer, self)
                self.detailedEngineState.onEngineStart = self._onEngineStart
                self.detailedEngineState.onStateChanged = self.engineAudition.onEngineStateChanged
            if isPlayer:
                turret = self.typeDescriptor.turret
                gunRotatorAudition = self.createComponent(
                    Vehicular.GunRotatorAudition,
                    turret.turretRotatorSoundManual, turret.weight / 1000.0,
                    compoundModel.node(TankPartNames.TURRET))
                gunRotatorAudition.vehicleMatrixLink = self.compoundModel.root
                gunRotatorAudition.damaged = lambda: self.turretDamaged()
                gunRotatorAudition.maxTurretRotationSpeed = lambda: self.maxTurretRotationSpeed(
                )
                self.gunRotatorAudition = gunRotatorAudition
                self.frictionAudition = self.createComponent(
                    Vehicular.FrictionAudition, TANK_FRICTION_EVENT)
        isLodTopPriority = isPlayer
        lodCalcInst = self.createComponent(
            Vehicular.LodCalculator,
            DataLinks.linkMatrixTranslation(compoundModel.matrix), True,
            VEHICLE_PRIORITY_GROUP, isLodTopPriority)
        self.lodCalculator = lodCalcInst
        self.allLodCalculators.append(lodCalcInst)
        lodLink = DataLinks.createFloatLink(lodCalcInst, 'lodDistance')
        lodStateLink = lodCalcInst.lodStateLink
        if IS_EDITOR:
            matrixBinding = None
            changeCamera = None
        else:
            matrixBinding = BigWorld.player(
            ).consistentMatrices.onVehicleMatrixBindingChanged
            changeCamera = BigWorld.player().inputHandler.onCameraChanged
        self.shadowManager = VehicleShadowManager(compoundModel, matrixBinding,
                                                  changeCamera)
        if not self.damageState.isCurrentModelDamaged:
            self.__assembleNonDamagedOnly(resourceRefs, isPlayer, lodLink,
                                          lodStateLink)
            dirtEnabled = BigWorld.WG_dirtEnabled(
            ) and 'HD' in self.typeDescriptor.type.tags
            if dirtEnabled and self.fashions is not None:
                dirtHandlers = [
                    BigWorld.PyDirtHandler(
                        True,
                        compoundModel.node(TankPartNames.CHASSIS).position.y),
                    BigWorld.PyDirtHandler(
                        False,
                        compoundModel.node(TankPartNames.HULL).position.y),
                    BigWorld.PyDirtHandler(
                        False,
                        compoundModel.node(TankPartNames.TURRET).position.y),
                    BigWorld.PyDirtHandler(
                        False,
                        compoundModel.node(TankPartNames.GUN).position.y)
                ]
                modelHeight, _ = self.computeVehicleHeight()
                self.dirtComponent = self.createComponent(
                    Vehicular.DirtComponent, dirtHandlers, modelHeight)
                for fashionIdx, _ in enumerate(TankPartNames.ALL):
                    self.fashions[fashionIdx].addMaterialHandler(
                        dirtHandlers[fashionIdx])
                    self.fashions[fashionIdx].addTrackMaterialHandler(
                        dirtHandlers[fashionIdx])

        model_assembler.setupTurretRotations(self)
        self.waterSensor = model_assembler.assembleWaterSensor(
            self.typeDescriptor, self, lodStateLink, self.spaceID)
        if self.engineAudition is not None:
            self.engineAudition.setIsUnderwaterInfo(
                DataLinks.createBoolLink(self.waterSensor, 'isUnderWater'))
            self.engineAudition.setIsInWaterInfo(
                DataLinks.createBoolLink(self.waterSensor, 'isInWater'))
        self.__postSetupFilter()
        compoundModel.setPartBoundingBoxAttachNode(
            TankPartIndexes.GUN, TankNodeNames.GUN_INCLINATION)
        camouflages.updateFashions(self)
        model_assembler.assembleCustomLogicComponents(self,
                                                      self.typeDescriptor,
                                                      self.__attachments,
                                                      self.__modelAnimators)
        self._createStickers()
        while self._loadingQueue:
            prefab, go, vector, callback = self._loadingQueue.pop()
            CGF.loadGameObjectIntoHierarchy(prefab, go, vector, callback)

        return
    def _assembleParts(self, isPlayer, appearance, resourceRefs):
        appearance.filter = model_assembler.createVehicleFilter(
            appearance.typeDescriptor)
        if appearance.isAlive:
            appearance.detailedEngineState = model_assembler.assembleDetailedEngineState(
                appearance.compoundModel, appearance.filter,
                appearance.typeDescriptor, isPlayer)
            if not gEffectsDisabled():
                model_assembler.assembleVehicleAudition(isPlayer, appearance)
                model_assembler.subscribeEngineAuditionToEngineState(
                    appearance.engineAudition, appearance.detailedEngineState)
                createEffects(appearance)
            if isPlayer:
                gunRotatorConnector = GunRotatorConnector(appearance)
                appearance.addComponent(gunRotatorConnector)
                appearance.frictionAudition = Vehicular.FrictionAudition(
                    TANK_FRICTION_EVENT)
                appearance.peripheralsController = PeripheralsController()
        self.__createTrackCrashControl(appearance)
        appearance.highlighter = Highlighter()
        compoundModel = appearance.compoundModel
        isLodTopPriority = isPlayer
        lodCalcInst = Vehicular.LodCalculator(
            DataLinks.linkMatrixTranslation(appearance.compoundModel.matrix),
            True, VEHICLE_PRIORITY_GROUP, isLodTopPriority)
        appearance.lodCalculator = lodCalcInst
        lodLink = DataLinks.createFloatLink(lodCalcInst, 'lodDistance')
        lodStateLink = lodCalcInst.lodStateLink
        matrixBinding = BigWorld.player(
        ).consistentMatrices.onVehicleMatrixBindingChanged
        appearance.shadowManager = VehicleShadowManager(
            compoundModel, matrixBinding)
        isDamaged = appearance.damageState.isCurrentModelDamaged
        if not isDamaged:
            self.__assembleNonDamagedOnly(appearance, isPlayer, lodLink,
                                          lodStateLink)
            dirtEnabled = BigWorld.WG_dirtEnabled(
            ) and 'HD' in appearance.typeDescriptor.type.tags
            fashions = appearance.fashions
            if dirtEnabled and fashions is not None:
                dirtHandlers = [
                    BigWorld.PyDirtHandler(
                        True,
                        compoundModel.node(TankPartNames.CHASSIS).position.y),
                    BigWorld.PyDirtHandler(
                        False,
                        compoundModel.node(TankPartNames.HULL).position.y),
                    BigWorld.PyDirtHandler(
                        False,
                        compoundModel.node(TankPartNames.TURRET).position.y),
                    BigWorld.PyDirtHandler(
                        False,
                        compoundModel.node(TankPartNames.GUN).position.y)
                ]
                modelHeight, _ = appearance.computeVehicleHeight()
                appearance.dirtComponent = Vehicular.DirtComponent(
                    dirtHandlers, modelHeight)
                for fashionIdx, _ in enumerate(TankPartNames.ALL):
                    fashions[fashionIdx].addMaterialHandler(
                        dirtHandlers[fashionIdx])

        model_assembler.setupTurretRotations(appearance)
        if appearance.fashion is not None:
            appearance.fashion.movementInfo = appearance.filter.movementInfo
        appearance.waterSensor = model_assembler.assembleWaterSensor(
            appearance.typeDescriptor, appearance, lodStateLink)
        if appearance.engineAudition is not None:
            appearance.engineAudition.setIsUnderwaterInfo(
                DataLinks.createBoolLink(appearance.waterSensor,
                                         'isUnderWater'))
            appearance.engineAudition.setIsInWaterInfo(
                DataLinks.createBoolLink(appearance.waterSensor, 'isInWater'))
        if isPlayer and BigWorld.player().isInTutorial:
            tutorialMatKindsController = TutorialMatKindsController()
            tutorialMatKindsController.terrainMatKindsLink = lambda: appearance.terrainMatKind
            appearance.addComponent(tutorialMatKindsController)
        self.__postSetupFilter(appearance)
        compoundModel.setPartBoundingBoxAttachNode(
            TankPartIndexes.GUN, TankNodeNames.GUN_INCLINATION)
        return