def __assembleNonDamagedOnly(resourceRefs, appearance, isPlayer, lodLink,
                              lodStateLink):
     model_assembler.assembleTerrainMatKindSensor(appearance, lodStateLink)
     model_assembler.assembleRecoil(appearance, lodLink)
     model_assembler.assembleGunLinkedNodesAnimator(appearance)
     model_assembler.assembleCollisionObstaclesCollector(
         appearance, lodStateLink)
     model_assembler.assembleTessellationCollisionSensor(
         appearance, lodStateLink)
     model_assembler.assembleSuspensionIfNeed(appearance, lodStateLink)
     model_assembler.assembleLeveredSuspensionIfNeed(
         appearance, lodStateLink)
     _assembleSwinging(appearance, lodLink)
     model_assembler.assembleSuspensionSound(appearance, lodLink, isPlayer)
     model_assembler.assembleSuspensionController(appearance)
     appearance.wheelsAnimator = model_assembler.createWheelsAnimator(
         appearance.compoundModel, appearance.typeDescriptor,
         appearance.splineTracks, appearance.filter, lodStateLink)
     appearance.trackNodesAnimator = model_assembler.createTrackNodesAnimator(
         appearance.compoundModel, appearance.typeDescriptor,
         appearance.wheelsAnimator, lodStateLink)
     model_assembler.assembleVehicleTraces(appearance, appearance.filter,
                                           lodStateLink)
     model_assembler.assembleTracks(resourceRefs, appearance.typeDescriptor,
                                    appearance, appearance.splineTracks,
                                    False, lodStateLink)
Beispiel #2
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)