Exemplo n.º 1
0
 def __init__(self, dataSec, defaultOffset=None):
     CallbackDelayer.__init__(self)
     TimeDeltaMeter.__init__(self)
     self.__shiftKeySensor = None
     self.__movementOscillator = None
     self.__impulseOscillator = None
     self.__noiseOscillator = None
     self.__dynamicCfg = CameraDynamicConfig()
     self.__accelerationSmoother = None
     self.__readCfg(dataSec)
     self.__onChangeControlMode = None
     self.__aimingSystem = None
     self.__curSense = 0
     self.__curScrollSense = 0
     self.__postmortemMode = False
     self.__vehiclesToCollideWith = set()
     self.__focalPointDist = 1.0
     self.__autoUpdateDxDyDz = Vector3(0.0)
     self.__updatedByKeyboard = False
     if defaultOffset is not None:
         self.__defaultAimOffset = defaultOffset
         self.__cam = BigWorld.HomingCamera()
         self.__cam.aimPointClipCoords = defaultOffset
     else:
         self.__defaultAimOffset = Vector2()
         self.__cam = None
     return
Exemplo n.º 2
0
 def __init__(self, dataSec, defaultOffset = None):
     CallbackDelayer.__init__(self)
     TimeDeltaMeter.__init__(self)
     self.__shiftKeySensor = None
     self.__movementOscillator = None
     self.__impulseOscillator = None
     self.__noiseOscillator = None
     self.__dynamicCfg = CameraDynamicConfig()
     self.__accelerationSmoother = None
     self.__readCfg(dataSec)
     self.__onChangeControlMode = None
     self.__aimingSystem = None
     self.__curSense = 0
     self.__curScrollSense = 0
     self.__postmortemMode = False
     self.__vehiclesToCollideWith = set()
     self.__focalPointDist = 1.0
     self.__autoUpdateDxDyDz = Vector3(0.0)
     self.__updatedByKeyboard = False
     if defaultOffset is not None:
         self.__defaultAimOffset = defaultOffset
         self.__cam = BigWorld.HomingCamera()
         self.__cam.aimPointClipCoords = defaultOffset
     else:
         self.__defaultAimOffset = Vector2()
         self.__cam = None
     return
Exemplo n.º 3
0
 def __init__(self, updatePeriod = 0.0):
     CallbackDelayer.__init__(self)
     self.__updatePeriod = updatePeriod
     self.__currentSpeedState = self.__SPEED_IDLE
     self.__keyOffCalled = False
     self.__manualSound = None
     self.__gearSound = None
     self.__gearDamagedParam = None
     self.__manGearDamagedParam = None
     self.__gearKeyOffParam = None
     self.__stateTable = ((None,
       self.__startManualSound,
       self.__initHighSpeed,
       None),
      (self.__stopManualSound,
       None,
       self.__initHighSpeed,
       None),
      (self.__stopManualSound,
       self.__startManualSoundFromFast,
       None,
       None),
      (self.__stopGearSoundPlaying,
       self.__startManualSoundFromFast,
       None,
       self.__checkGearSound))
     self.__init_sound()
     return
Exemplo n.º 4
0
 def __init__(self):
     CallbackDelayer.__init__(self)
     self.__alwaysShowAimKey = None
     self.__showMarkersKey = None
     sec = self._readCfg()
     self.onCameraChanged = Event()
     self.onPostmortemVehicleChanged = Event()
     self.onSetReloading = Event()
     self.onSetReloadingPercents = Event()
     self.__isArenaStarted = False
     self.__isStarted = False
     self.__targeting = _Targeting()
     self.__vertScreenshotCamera = _VertScreenshotCamera()
     self.__ctrls = dict()
     self.__killerVehicleID = None
     self.__isAutorotation = True
     self.__prevModeAutorotation = None
     self.__isSPG = False
     self.__isATSPG = False
     self.__setupCtrls(sec)
     self.__curCtrl = self.__ctrls[_CTRLS_FIRST]
     self.ctrlModeName = _CTRLS_FIRST
     self.__isDetached = False
     self.__waitObserverCallback = None
     self.__observerVehicle = None
     return
Exemplo n.º 5
0
 def __init__(self):
     ClientSelectableObject.__init__(self)
     CallbackDelayer.__init__(self)
     TimeDeltaMeter.__init__(self)
     self.__state = CameraMovementStates.FROM_OBJECT
     self.__camera = cameras.FreeCamera()
     self.cameraPitch = mathUtils.clamp(-math.pi / 2 * 0.99,
                                        math.pi / 2 * 0.99,
                                        self.cameraPitch)
     self.cameraYaw = normalizeAngle(self.cameraYaw)
     self.__goalPosition = Math.Vector3(0.0, 0.0, 0.0)
     self.__goalDistance = None
     self.__goalTarget = Math.Vector3(0.0, 0.0, 0.0)
     self.__startPosition = Math.Vector3(0.0, 0.0, 0.0)
     self.__startYaw = 0.0
     self.__startPitch = 0.0
     self.__curTime = None
     self.__easedInYaw = 0.0
     self.__easedInPitch = 0.0
     self.__easeInDuration = 0.0
     self.__startFov = None
     self.__goalFov = None
     if self.enableYawLimits:
         self.__yawLimits = Math.Vector2(self.yawLimitMin, self.yawLimitMax)
     else:
         self.__yawLimits = None
     self.__pitchLimits = Math.Vector2(math.degrees(self.pitchLimitMin),
                                       math.degrees(self.pitchLimitMax))
     self.__p1 = Math.Vector3(0.0, 0.0, 0.0)
     self.__p2 = Math.Vector3(0.0, 0.0, 0.0)
     self.__wasPreviousUpdateSkipped = False
     return
    def __init__(self, equipmentID, wingControlPoints):
        CallbackDelayer.__init__(self)
        self.__withdrawn = False
        self.__bombers = []
        modelName, soundEvent = self.__readData(equipmentID)
        speed = self.__calculateSpeed(wingControlPoints[0],
                                      wingControlPoints[1])
        flatVectors = map(
            self.__calculateDirAndNorm,
            (wingControlPoints[0].direction, wingControlPoints[1].direction))
        times = map(self.__convertTime,
                    (wingControlPoints[0].time, wingControlPoints[1].time))
        for offset in self.__offsets:
            points = []
            for i in xrange(2):
                point = wingControlPoints[i]
                realOffset = self.__calculateOffset(offset, flatVectors[i])
                points.append(
                    CurveControlPoint(point.position + realOffset,
                                      speed * point.direction, times[i]))

            bomberDesc = BomberDesc(modelName, soundEvent, points[0],
                                    points[1], None)
            self.__bombers.append(Bomber(bomberDesc))

        return
Exemplo n.º 7
0
 def __init__(self, dataSec, defaultOffset = None, binoculars = None):
     CallbackDelayer.__init__(self)
     self.__impulseOscillator = None
     self.__movementOscillator = None
     self.__noiseOscillator = None
     self.__dynamicCfg = CameraDynamicConfig()
     self.__accelerationSmoother = None
     self.__readCfg(dataSec)
     if binoculars is None:
         return
     else:
         self.__cam = BigWorld.FreeCamera()
         self.__zoom = self.__cfg['zoom']
         self.__curSense = 0
         self.__curScrollSense = 0
         self.__waitVehicleCallbackId = None
         self.__onChangeControlMode = None
         self.__aimingSystem = SniperAimingSystem(dataSec)
         self.__binoculars = binoculars
         self.__defaultAimOffset = defaultOffset or Vector2()
         self.__crosshairMatrix = createCrosshairMatrix(offsetFromNearPlane=self.__dynamicCfg['aimMarkerDistance'])
         self.__prevTime = BigWorld.time()
         self.__autoUpdateDxDyDz = Vector3(0, 0, 0)
         if BattleReplay.g_replayCtrl.isPlaying:
             BattleReplay.g_replayCtrl.setDataCallback('applyZoom', self.__applyZoom)
         return
Exemplo n.º 8
0
 def __init__(self, deliveryPoint, dropAltitude, dropTime):
     CallbackDelayer.__init__(self)
     angle = random.random() * 2 * math.pi
     self.__flightYaw = angle
     rotationMatrix = math_utils.createRotationMatrix((angle, 0, 0))
     dropPoint = deliveryPoint + Math.Vector3(0, dropAltitude, 0)
     beginPosition = dropPoint - rotationMatrix.applyVector(
         self.ARRIVAL_TRAJECTORY_INCLINATION)
     flatFlyVelocity = rotationMatrix.applyToAxis(2) * self.FLIGHT_SPEED
     beginPointDesc = CurveControlPoint(
         beginPosition, flatFlyVelocity,
         dropTime - self.FLY_TIME_BEFORE_DROP)
     dropPointDesc = CurveControlPoint(dropPoint, flatFlyVelocity, dropTime)
     dropPlaneConfig = self.__dynamicObjectsCache.getConfig(
         self.__sessionProvider.arenaVisitor.getArenaGuiType(
         )).getDropPlane()
     spaceId = BigWorld.player().spaceID
     compoundName = 'dropPlaneModel'
     modelAssembler = BigWorld.CompoundAssembler(compoundName, spaceId)
     modelAssembler.addRootPart(dropPlaneConfig.model, 'root')
     animationBuilder = AnimationSequence.Loader(
         dropPlaneConfig.flyAnimation, spaceId)
     planeDesc = BomberDesc(modelAssembler, dropPlaneConfig.sound,
                            beginPointDesc, dropPointDesc, animationBuilder)
     self.dropPlane = CompoundBomber(planeDesc)
     endPosition = dropPoint + rotationMatrix.applyVector(
         self.DEPARTURE_TRAJECTORY_INCLINATION)
     self.dropPlane.addControlPoint(endPosition, flatFlyVelocity,
                                    dropTime + self.FLY_TIME_AFTER_DROP)
     delayTime = dropTime - BigWorld.time() - self.FLY_TIME_BEFORE_DROP
     self.delayCallback(delayTime, self.__openCargo)
     self.delayCallback(delayTime + self.UNLOAD_ANIMATION_TIME,
                        self.__closeCargo)
     self.prevTime = BigWorld.time()
Exemplo n.º 9
0
 def __init__(self, configDataSec):
     CallbackDelayer.__init__(self)
     TimeDeltaMeter.__init__(self, time.clock)
     self._cam = BigWorld.FreeCamera()
     self._cam.invViewProvider = Math.MatrixProduct()
     self.__cameraTransition = BigWorld.TransitionCamera()
     self.__ypr = Math.Vector3()
     self.__position = Math.Vector3()
     self.__defaultFov = BigWorld.projection().fov
     self.__velocity = Math.Vector3()
     self.__isVerticalVelocitySeparated = False
     self.__yprVelocity = Math.Vector3()
     self.__zoomVelocity = 0.0
     self._inertiaEnabled = False
     self._movementInertia = None
     self._rotationInertia = None
     self._movementSensor = None
     self._verticalMovementSensor = None
     self._rotationSensor = None
     self._zoomSensor = None
     self._targetRadiusSensor = None
     self._mouseSensitivity = 0.0
     self._scrollSensitivity = 0.0
     self.__rotateAroundPointEnabled = False
     self.__rotationRadius = 40.0
     self._alignerToLand = _AlignerToLand()
     self.__predefinedVelocities = {}
     self.__predefinedVerticalVelocities = {}
     self._keySwitches = {}
     self._readCfg(configDataSec)
     self.__isModeOverride = False
     self.__basisMProv = _VehicleBounder()
     self.__entityPicker = _VehiclePicker()
     return
Exemplo n.º 10
0
    def __init__(self, dataSec, defaultOffset = None):
        CallbackDelayer.__init__(self)
        TimeDeltaMeter.__init__(self)
        self.__shiftKeySensor = None
        self.__movementOscillator = None
        self.__impulseOscillator = None
        self.__noiseOscillator = None
        self.__dynamicCfg = CameraDynamicConfig()
        self.__accelerationSmoother = None
        self.__readCfg(dataSec)
        self.__onChangeControlMode = None
        self.__aimingSystem = None
        self.__curSense = 0
        self.__curScrollSense = 0
        self.__postmortemMode = False
        self.__vehiclesToCollideWith = set()
        self.__focalPointDist = 1.0
        self.__autoUpdateDxDyDz = Vector3(0.0)
        self.__updatedByKeyboard = False
        if defaultOffset is not None:
            self.__defaultAimOffset = defaultOffset
            self.__cam = BigWorld.HomingCamera(self.__adCfg['enable'])
            if self.__adCfg['enable']:
                self.__cam.initAdvancedCollider(self.__adCfg['fovRatio'], self.__adCfg['rollbackSpeed'], self.__adCfg['minimalCameraDistance'], self.__adCfg['speedThreshold'], self.__adCfg['minimalVolume'])
                for group_name in VOLUME_GROUPS_NAMES:
                    self.__cam.addVolumeGroup(self.__adCfg['volumeGroups'][group_name])

            self.__cam.aimPointClipCoords = defaultOffset
        else:
            self.__defaultAimOffset = Vector2()
            self.__cam = None
        return
 def __init__(self):
     EpicMissionsPanelMeta.__init__(self)
     CallbackDelayer.__init__(self)
     self.__nearestHQ = None
     self.__timeCB = None
     self.__currentEndTime = 0
     return
Exemplo n.º 12
0
 def __init__(self, dataSec):
     super(ArtyCamera, self).__init__()
     CallbackDelayer.__init__(self)
     self.isAimOffsetEnabled = True
     self.__positionOscillator = None
     self.__positionNoiseOscillator = None
     self.__switchers = CameraSwitcherCollection(cameraSwitchers=[
         CameraSwitcher(switchType=SwitchTypes.FROM_TRANSITION_DIST_AS_MAX,
                        switchToName=CTRL_MODE_NAME.STRATEGIC,
                        switchToPos=0.0)
     ],
                                                 isEnabled=True)
     self.__dynamicCfg = CameraDynamicConfig()
     self._readConfigs(dataSec)
     self.__cam = BigWorld.CursorCamera()
     self.__curSense = self._cfg['sensitivity']
     self.__onChangeControlMode = None
     self.__camDist = 0.0
     self.__desiredCamDist = 0.0
     self.__aimingSystem = None
     self.__prevTime = 0.0
     self.__prevAimPoint = Vector3()
     self.__dxdydz = Vector3(0.0, 0.0, 0.0)
     self.__autoUpdatePosition = False
     self.__needReset = 0
     self.__sourceMatrix = None
     self.__targetMatrix = None
     self.__rotation = 0.0
     self.__positionHysteresis = None
     self.__timeHysteresis = None
     self.__transitionEnabled = True
     self.__scrollSmoother = SPGScrollSmoother(0.3)
     self.__collisionDist = 0.0
     self.__camViewPoint = Vector3()
     return
Exemplo n.º 13
0
 def __init__(self, dataSec, defaultOffset=None, binoculars=None):
     CallbackDelayer.__init__(self)
     self.__impulseOscillator = None
     self.__movementOscillator = None
     self.__noiseOscillator = None
     self.__dynamicCfg = CameraDynamicConfig()
     self.__accelerationSmoother = None
     self.__readCfg(dataSec)
     if binoculars is None:
         return
     else:
         self.__cam = BigWorld.FreeCamera()
         self.__zoom = self.__cfg['zoom']
         self.__curSense = 0
         self.__curScrollSense = 0
         self.__waitVehicleCallbackId = None
         self.__onChangeControlMode = None
         self.__aimingSystem = None
         self.__binoculars = binoculars
         self.__defaultAimOffset = defaultOffset or Vector2()
         self.__crosshairMatrix = createCrosshairMatrix(
             offsetFromNearPlane=self.__dynamicCfg['aimMarkerDistance'])
         self.__prevTime = BigWorld.time()
         self.__autoUpdateDxDyDz = Vector3(0, 0, 0)
         if BattleReplay.g_replayCtrl.isPlaying:
             BattleReplay.g_replayCtrl.setDataCallback(
                 'applyZoom', self.__applySerializedZoom)
         return
Exemplo n.º 14
0
 def __init__(self, dataSec, aim, binoculars):
     CallbackDelayer.__init__(self)
     self.__impulseOscillator = None
     self.__movementOscillator = None
     self.__noiseOscillator = None
     self.__dynamicCfg = CameraDynamicConfig()
     self.__accelerationSmoother = None
     self.__readCfg(dataSec)
     if aim is None or binoculars is None:
         return
     else:
         self.__cam = BigWorld.FreeCamera()
         self.__zoom = self.__cfg['zoom']
         self.__curSense = 0
         self.__curScrollSense = 0
         self.__waitVehicleCallbackId = None
         self.__onChangeControlMode = None
         self.__aimingSystem = SniperAimingSystem(dataSec)
         self.__aim = weakref.proxy(aim)
         self.__binoculars = binoculars
         self.__defaultAimOffset = self.__aim.offset()
         self.__defaultAimOffset = (self.__defaultAimOffset[0], self.__defaultAimOffset[1])
         self.__crosshairMatrix = createCrosshairMatrix(offsetFromNearPlane=self.__dynamicCfg['aimMarkerDistance'])
         self.__prevTime = BigWorld.time()
         self.__autoUpdateDxDyDz = Vector3(0, 0, 0)
         return
 def __init__(self):
     CallbackDelayer.__init__(self)
     ComponentSystem.__init__(self)
     self.turretMatrix = Math.WGAdaptiveMatrixProvider()
     self.gunMatrix = Math.WGAdaptiveMatrixProvider()
     self.__vehicle = None
     self.__filter = None
     self.__originalFilter = None
     self.__typeDesc = None
     self.__waterHeight = -1.0
     self.__isInWater = False
     self.__isUnderWater = False
     self.__splashedWater = False
     self.__vibrationsCtrl = None
     self.__lightFxCtrl = None
     self.__auxiliaryFxCtrl = None
     self.__fashion = None
     self.__crashedTracksCtrl = None
     self.__gunRecoil = None
     self.__currentDamageState = VehicleDamageState()
     self.__loadingProgress = 0
     self.__effectsPlayer = None
     self.__engineMode = (0, 0)
     self.__swingMoveFlags = 0
     self.__currTerrainMatKind = [-1] * _MATKIND_COUNT
     self.__leftLightRotMat = None
     self.__rightLightRotMat = None
     self.__leftFrontLight = None
     self.__rightFrontLight = None
     self.__prevVelocity = None
     self.__prevTime = None
     self.__isPillbox = False
     self.__chassisOcclusionDecal = OcclusionDecal()
     self.__chassisShadowForwardDecal = ShadowForwardDecal()
     self.__splodge = None
     self.__vehicleStickers = None
     self.onModelChanged = Event()
     self.__speedInfo = Math.Vector4(0.0, 0.0, 0.0, 0.0)
     self.__wasOnSoftTerrain = False
     self.__vehicleMatrixProv = None
     self.__leftTrackScroll = 0.0
     self.__rightTrackScroll = 0.0
     self.__distanceFromPlayer = 0.0
     self.__fashions = None
     self.__compoundModel = None
     self.__boundEffects = None
     self.__swingingAnimator = None
     self.__splineTracks = None
     self.__customEffectManager = None
     self.__trackScrollCtl = BigWorld.PyTrackScroll()
     self.__weaponEnergy = 0.0
     self.__activated = False
     self.__systemStarted = False
     self.__vID = 0
     self.__isAlive = True
     self.__isTurretDetached = False
     self.__trackFashionSet = False
     self.__periodicTimerID = None
     self.__wasDeactivated = False
     return
Exemplo n.º 16
0
 def __init__(self):
     CallbackDelayer.__init__(self)
     self.__alwaysShowAimKey = None
     self.__showMarkersKey = None
     sec = self._readCfg()
     self.onCameraChanged = Event()
     self.onPostmortemVehicleChanged = Event()
     self.onSetReloading = Event()
     self.onSetReloadingPercents = Event()
     self.__isArenaStarted = False
     self.__isStarted = False
     self.__targeting = _Targeting()
     self.__vertScreenshotCamera = _VertScreenshotCamera()
     self.__ctrls = dict()
     self.__killerVehicleID = None
     self.__isAutorotation = True
     self.__prevModeAutorotation = None
     self.__isSPG = False
     self.__isATSPG = False
     self.__setupCtrls(sec)
     self.__curCtrl = self.__ctrls[_CTRLS_FIRST]
     self.ctrlModeName = _CTRLS_FIRST
     self.__isDetached = False
     self.__waitObserverCallback = None
     self.__observerVehicle = None
     return
Exemplo n.º 17
0
 def __init__(self, dataSec):
     super(StrategicCamera, self).__init__()
     CallbackDelayer.__init__(self)
     self.__positionOscillator = None
     self.__positionNoiseOscillator = None
     self.__activeDistRangeSettings = None
     self.__dynamicCfg = CameraDynamicConfig()
     self.__cameraYaw = 0.0
     self.__switchers = CameraSwitcherCollection(cameraSwitchers=[CameraSwitcher(switchType=SwitchTypes.FROM_TRANSITION_DIST_AS_MIN, switchToName=CTRL_MODE_NAME.ARTY, switchToPos=1.0)], isEnabled=True)
     self._readConfigs(dataSec)
     self.__cam = BigWorld.CursorCamera()
     self.__cam.isHangar = False
     self.__curSense = self._cfg['sensitivity']
     self.__onChangeControlMode = None
     self.__aimingSystem = None
     self.__prevTime = BigWorld.time()
     self.__autoUpdatePosition = False
     self.__dxdydz = Vector3(0, 0, 0)
     self.__needReset = 0
     self.__smoothingPivotDelta = 0
     self.__transitionEnabled = True
     self.__camDist = 0.0
     self.__scrollSmoother = SPGScrollSmoother(0.3)
     self.__saveDist = False
     return
Exemplo n.º 18
0
 def __init__(self, updatePeriod = 0.0):
     CallbackDelayer.__init__(self)
     self.__updatePeriod = updatePeriod
     self.__currentSpeedState = self.__SPEED_IDLE
     self.__keyOffCalled = False
     self.__manualSound = None
     self.__gearSound = None
     self.__gearDamagedParam = None
     self.__manGearDamagedParam = None
     self.__gearKeyOffParam = None
     self.__stateTable = ((None,
       self.__startManualSound,
       self.__initHighSpeed,
       None),
      (self.__stopManualSound,
       None,
       self.__initHighSpeed,
       None),
      (self.__stopManualSound,
       self.__startManualSoundFromFast,
       None,
       None),
      (self.__stopGearSoundPlaying,
       self.__startManualSoundFromFast,
       None,
       self.__checkGearSound))
     self.__init_sound()
     return
Exemplo n.º 19
0
 def __init__(self, dataSec, aim):
     CallbackDelayer.__init__(self)
     TimeDeltaMeter.__init__(self)
     self.__shiftKeySensor = None
     self.__movementOscillator = None
     self.__impulseOscillator = None
     self.__noiseOscillator = None
     self.__dynamicCfg = CameraDynamicConfig()
     self.__accelerationSmoother = None
     self.__readCfg(dataSec)
     self.__cam = None
     self.__aim = None
     self.__onChangeControlMode = None
     self.__aimingSystem = None
     self.__curSense = 0
     self.__curScrollSense = 0
     self.__postmortemMode = False
     self.__vehiclesToCollideWith = set()
     self.__focalPointDist = 1.0
     self.__autoUpdateDxDyDz = Vector3(0.0)
     self.__defaultAimOffset = (0.0, 0.0)
     if aim is None:
         return
     else:
         self.__aim = weakref.proxy(aim)
         self.__cam = BigWorld.HomingCamera()
         aimOffset = self.__aim.offset()
         self.__cam.aimPointClipCoords = Vector2(aimOffset)
         self.__defaultAimOffset = (aimOffset[0], aimOffset[1])
         return
Exemplo n.º 20
0
 def __init__(self, yaw, dropPoint, landingPosition, descendTime):
     ScriptGameObject.__init__(self, BigWorld.player().spaceID)
     CallbackDelayer.__init__(self)
     self.descendSimulator = DescendSimulator(yaw, dropPoint,
                                              landingPosition, descendTime)
     self.__descendTime = descendTime
     self.__dropPoint = dropPoint
 def __init__(self, effectDesc):
     CallbackDelayer.__init__(self)
     self._desc = effectDesc
     self._sound = None
     self._almostCompleteSnd = None
     self._startLoopT = 0.0
     return
Exemplo n.º 22
0
 def __init__(self, configDataSec):
     CallbackDelayer.__init__(self)
     TimeDeltaMeter.__init__(self, time.clock)
     self.__cam = BigWorld.FreeCamera()
     self.__cam.invViewProvider = Math.MatrixProduct()
     self.__ypr = Math.Vector3()
     self.__position = Math.Vector3()
     self.__defaultFov = BigWorld.projection().fov
     self.__velocity = Math.Vector3()
     self.__isVerticalVelocitySeparated = False
     self.__yprVelocity = Math.Vector3()
     self.__zoomVelocity = 0.0
     self.__inertiaEnabled = False
     self.__movementInertia = None
     self.__rotationInertia = None
     self.__movementSensor = None
     self.__verticalMovementSensor = None
     self.__rotationSensor = None
     self.__zoomSensor = None
     self.__targetRadiusSensor = None
     self.__mouseSensitivity = 0.0
     self.__scrollSensitivity = 0.0
     self.__rotateAroundPointEnabled = False
     self.__rotationRadius = 40.0
     self.__alignerToLand = _AlignerToLand()
     self.__predefinedVelocities = {}
     self.__predefinedVerticalVelocities = {}
     self.__keySwitches = {}
     self.__readCfg(configDataSec)
     self.__aim = None
     self.__basisMProv = _VehicleBounder()
     self.__entityPicker = _VehiclePicker()
     return
Exemplo n.º 23
0
 def __init__(self):
     CallbackDelayer.__init__(self)
     ComponentSystem.__init__(self)
     self.__alwaysShowAimKey = None
     self.__showMarkersKey = None
     sec = self._readCfg()
     self.onCameraChanged = Event()
     self.onPostmortemVehicleChanged = Event()
     self.onPostmortemKillerVisionEnter = Event()
     self.onPostmortemKillerVisionExit = Event()
     self.__isArenaStarted = False
     self.__isStarted = False
     self.__targeting = _Targeting()
     self.__vertScreenshotCamera = _VertScreenshotCamera()
     self.__ctrls = dict()
     self.__killerVehicleID = None
     self.__isAutorotation = True
     self.__prevModeAutorotation = None
     self.__isSPG = False
     self.__isATSPG = False
     self.__setupCtrls(sec)
     self.__curCtrl = self.__ctrls[_CTRLS_FIRST]
     self.__ctrlModeName = _CTRLS_FIRST
     self.__isDetached = False
     self.__waitObserverCallback = None
     self.__observerVehicle = None
     self.__observerIsSwitching = False
     self.__commands = []
     self.__remoteCameraSender = None
     self.__isGUIVisible = False
     return
Exemplo n.º 24
0
 def __init__(self):
     CallbackDelayer.__init__(self)
     TimeDeltaMeter.__init__(self)
     self.__fadeInCallbacks = []
     self.__fadeInTime = None
     self.__events = None
     self.__fadeWindow = None
     return
 def __init__(self, position, equipment):
     CallbackDelayer.__init__(self)
     self.equipment = equipment
     self.aimLimits = None
     if isinstance(equipment, ArcadeEquipmentConfigReader):
         self.aimLimits = (equipment.minApplyRadius, equipment.maxApplyRadius)
     self.delayCallback(self._TICK_DELAY, self.__tick)
     return
Exemplo n.º 26
0
 def __init__(self):
     CallbackDelayer.__init__(self)
     TimeDeltaMeter.__init__(self)
     self.onFadeUpdated = Event.Event()
     self.__fadeInCallback = None
     self.__fadeInTime = None
     self.__fadeWindow = None
     return
Exemplo n.º 27
0
 def __init__(self, hangarCameraManager):
     CallbackDelayer.__init__(self)
     TimeDeltaMeter.__init__(self)
     self._prevCameraPosition = 0
     self.__hangarCameraManager = hangarCameraManager
     self.__selectedEmblemInfo = None
     self.__prevPitch = None
     return
Exemplo n.º 28
0
 def __init__(self, componentSystem):
     ClientArenaComponent.__init__(self, componentSystem)
     CallbackDelayer.__init__(self)
     self.__smokeScreen = dict()
     self.__healingEffect = None
     self.__inspiringEffect = None
     self.__repairPointEffect = None
     return
Exemplo n.º 29
0
 def __init__(self):
     BigWorld.Entity.__init__(self)
     FlockLike.__init__(self)
     CallbackDelayer.__init__(self)
     self.flightAngleMin = math.radians(self.flightAngleMin)
     self.flightAngleMax = math.radians(self.flightAngleMax)
     self.__isTriggered = False
     self.__models = []
Exemplo n.º 30
0
 def __init__(self, updatePeriod=0.1):
     CallbackDelayer.__init__(self)
     self.__updatePeriod = updatePeriod
     self.__soundObject = None
     self.__oldPitch = 0
     self.__oldTime = 0
     self.__init_sound()
     return
 def __init__(self, curShotInfoFunc, dispersionUpdateFunc,
              desiredShotInfoFunc):
     _SPGFlashGunMarker.__init__(self, curShotInfoFunc,
                                 dispersionUpdateFunc,
                                 _SuperGunMarker.GUN_MARKER_CLIENT)
     CallbackDelayer.__init__(self)
     self.__updateInterval = 0.0 if BattleReplay.g_replayCtrl.isPlaying else 0.1
     self.__desiredShotInfoFunc = desiredShotInfoFunc
     self.__trajectoryDrawer = BigWorld.wg_trajectory_drawer()
Exemplo n.º 32
0
 def __init__(self, desc):
     CallbackDelayer.__init__(self)
     self.__startLoop = desc.startLoop
     self.__stopLoop = desc.stopLoop
     self.__shell = desc.loopShell
     self.__lastShell = desc.loopShellLast
     self.__duration = desc.duration
     self.__shellT = desc.shellDt
     self.__shellTLast = desc.shellDtLast
     self.__sequence = []
Exemplo n.º 33
0
 def __init__(self, updatePeriod=0.1):
     CallbackDelayer.__init__(self)
     self.__updatePeriod = updatePeriod
     self.__currentSpeedState = self.__SPEED_IDLE
     self.__manualSound = None
     self.__gearDamagedParam = None
     self.__oldPitch = 0
     self.__oldTime = 0
     self.__init_sound()
     return
Exemplo n.º 34
0
 def __init__(self, componentSystem):
     ClientArenaComponent.__init__(self, componentSystem)
     CallbackDelayer.__init__(self)
     self.__duration = None
     self.__endTime = None
     self.__isActive = False
     self.__cbId = None
     self.onOvertimeStart = Event.Event(self._eventManager)
     self.onOvertimeOver = Event.Event(self._eventManager)
     return
Exemplo n.º 35
0
 def __init__(self, updatePeriod = 0.1):
     CallbackDelayer.__init__(self)
     self.__updatePeriod = updatePeriod
     self.__currentSpeedState = self.__SPEED_IDLE
     self.__manualSound = None
     self.__gearDamagedParam = None
     self.__oldPitch = 0
     self.__oldTime = 0
     self.__init_sound()
     return
Exemplo n.º 36
0
    def __init__(self, vehicleID, server):
        CallbackDelayer.__init__(self)
        self.server = server
        self.vehicleID = vehicleID
        self.isStarted = False
        self.physics = None
        self.command = MovementCommand()
        self.lastTick = None
        self.isPickup = False

        self._wgPhysics = None
Exemplo n.º 37
0
 def __init__(self, dataSection, avatarInputHandler):
     CallbackDelayer.__init__(self)
     self.__preferredPos = Vector3(0, 0, 0)
     self.__aih = weakref.proxy(avatarInputHandler)
     self.__cam = StrategicCamera.StrategicCamera(dataSection['camera'])
     self.__isEnabled = False
     self.__updateInterval = 0.1
     self.__activeSelector = _DefaultStrikeSelector(Vector3(0, 0, 0), None)
     self.__equipmentID = None
     self.__aimingMode = 0
     MapCaseControlMode.prevCtlMode = [Vector3(0, 0, 0), '', 0]
     return
Exemplo n.º 38
0
 def __init__(self, dropID, deliveryPosition, deliveryTime):
     ScriptGameObject.__init__(self, BigWorld.player().spaceID)
     CallbackDelayer.__init__(self)
     self.owner = Svarog.GameObject(BigWorld.player().spaceID)
     self.owner.activate()
     self.owner.addComponent(self)
     Svarog.addGameObject(BigWorld.player().spaceID, self.owner)
     self.id = dropID
     self.deliveryPosition = deliveryPosition
     self.deliveryTime = deliveryTime + BigWorld.time(
     ) - BigWorld.serverTime()
     self.onFlightEnd = Event()
Exemplo n.º 39
0
 def __init__(self):
     if not constants.IS_DEVELOPMENT:
         return
     CallbackDelayer.__init__(self)
     self.__items = {}
     self.__avgInfo = {}
     self.__textGui = GUI.Text()
     GUI.addRoot(self.__textGui)
     self.__textGui.position = (0, -0.25, 0)
     self.__textGui.multiline = True
     self.clear()
     self.__tickNames = {}
Exemplo n.º 40
0
 def __init__(self):
     BigWorld.Entity.__init__(self)
     FlockLike.__init__(self)
     CallbackDelayer.__init__(self)
     self.flightAngleMin = math.radians(self.flightAngleMin)
     self.flightAngleMax = math.radians(self.flightAngleMax)
     if self.flightAngleMin < 0:
         self.flightAngleMin += math.ceil(abs(self.flightAngleMin) / (math.pi * 2)) * math.pi * 2
     elif self.flightAngleMin > math.pi * 2:
         self.flightAngleMin -= math.floor(self.flightAngleMin / (math.pi * 2)) * math.pi * 2
     self.__isTriggered = False
     self.__models = []
 def __init__(self):
     CallbackDelayer.__init__(self)
     self.__totalInterpolationTime = max(0.01, _INTERPOLATION_TIME)
     self.__elapsedTime = 0.0
     self.__easingMethod = _EASING_METHOD
     self.__prevTime = 0.0
     self.__initialState = None
     self.__finalState = None
     self.__initialFov = 0.0
     self.__finalFov = 0.0
     self.__cam = None
     return
Exemplo n.º 42
0
 def __init__(self, beginExplosionPos, endExplosionPos, areaWidth, velocity):
     CallbackDelayer.__init__(self)
     self.model = BigWorld.Model("helpers/models/unit_cube.model")
     BigWorld.addModel(self.model)
     self.model.position = beginExplosionPos
     linearHomer = BigWorld.LinearHomer()
     self.model.addMotor(linearHomer)
     linearHomer.align = mathUtils.createSRTMatrix((areaWidth, 5, 1), (0.0, 0, 0), Vector3(0, 0, 0))
     linearHomer.acceleration = 0
     linearHomer.velocity = velocity
     linearHomer.target = mathUtils.createTranslationMatrix(endExplosionPos)
     linearHomer.proximityCallback = self.__onDeath
Exemplo n.º 43
0
 def __init__(self):
     if not constants.IS_DEVELOPMENT:
         return
     CallbackDelayer.__init__(self)
     self.__items = {}
     self.__avgInfo = {}
     self.__textGui = GUI.Text()
     GUI.addRoot(self.__textGui)
     self.__textGui.position = (0, -0.25, 0)
     self.__textGui.multiline = True
     self.clear()
     self.__tickNames = {}
Exemplo n.º 44
0
    def __init__(self, equipmentID, wingControlPoints):
        CallbackDelayer.__init__(self)
        self.__withdrawn = False
        self.__bombers = []
        modelName, soundEvent = self.__readData(equipmentID)
        speed = self.__calculateSpeed(wingControlPoints[0], wingControlPoints[1])
        flatVectors = map(self.__calculateDirAndNorm, (wingControlPoints[0].direction, wingControlPoints[1].direction))
        times = map(self.__convertTime, (wingControlPoints[0].time, wingControlPoints[1].time))
        for offset in self.__offsets:
            points = []
            for i in xrange(2):
                point = wingControlPoints[i]
                realOffset = self.__calculateOffset(offset, flatVectors[i])
                points.append(CurveControlPoint(point.position + realOffset, speed * point.direction, times[i]))

            bomberDesc = BomberDesc(modelName, soundEvent, points[0], points[1])
            self.__bombers.append(Bomber(bomberDesc))
 def __init__(self, physicsMode, isPlayerVehicle, modelsDesc, typeDesc, vehicleId):
     CallbackDelayer.__init__(self)
     self.__prevVelocity = 0
     self.__prevTime = 0.0
     self.__prevTerrSwitch = None
     self.__physicsMode = physicsMode
     self.__isPlayerVehicle = isPlayerVehicle
     self.__typeDesc = typeDesc
     self.__commonTrackScroll = 0.0
     self.__engineSound = None
     self.__movementSound = None
     self.__gunSound = None
     self.__modelsDesc = modelsDesc
     self.__vehicleId = vehicleId
     self.__event = None
     self.__eventC = None
     self.__cameraUnit = False
     self.__initSounds()
     BigWorld.player().inputHandler.onCameraChanged += self.__onCameraChanged
     return
Exemplo n.º 46
0
 def __init__(self, mapSettings = None):
     if mapSettings is None:
         mapSettings = _getDefaultMapSettings()
     CallbackDelayer.__init__(self)
     self.__mapSettings = mapSettings
     self.__gasAttackSettings = None
     self.__state = GasAttackState.NO
     self.__startTime = 0
     self.__cloud = None
     if _ENABLE_DEBUG_LOG:
         self.__windupTime = 0
     self.__evtManager = Event.EventManager()
     self.onAttackPreparing = Event.Event(self.__evtManager)
     self.onAttackStarted = Event.Event(self.__evtManager)
     self.onAttackStopped = Event.Event(self.__evtManager)
     if not mapSettings.cloudModel:
         LOG_ERROR('Empty model name for cloud model')
     else:
         BigWorld.loadResourceListBG([mapSettings.cloudModel], self.__onCloudModelLoaded)
     self.__cloudModelResource = None
     return
Exemplo n.º 47
0
 def __init__(self, position, equipment):
     CallbackDelayer.__init__(self)
     self.equipment = equipment
     self.delayCallback(self._TICK_DELAY, self.__tick)
Exemplo n.º 48
0
 def __init__(self, effectDesc):
     CallbackDelayer.__init__(self)
     self._desc = effectDesc
     self._sound = None
     self._startLoopT = 0.0
     return
Exemplo n.º 49
0
 def __init__(self, effectDesc):
     CallbackDelayer.__init__(self)
     self.__desc = effectDesc
     self.__sound = None
     return
Exemplo n.º 50
0
 def __init__(self, curShotInfoFunc, dispersionUpdateFunc, desiredShotInfoFunc):
     _SPGFlashGunMarker.__init__(self, curShotInfoFunc, dispersionUpdateFunc, _SuperGunMarker.GUN_MARKER_CLIENT)
     CallbackDelayer.__init__(self)
     self.__updateInterval = 0.0 if BattleReplay.g_replayCtrl.isPlaying else 0.1
     self.__desiredShotInfoFunc = desiredShotInfoFunc
     self.__trajectoryDrawer = BigWorld.wg_trajectory_drawer()
Exemplo n.º 51
0
 def __init__(self, effectDesc):
     CallbackDelayer.__init__(self)
     self.__desc = effectDesc
Exemplo n.º 52
0
 def __init__(self, avatar):
     CallbackDelayer.__init__(self)
     self.__avatar = weakref.proxy(avatar)
     self.__bFollowCamera = False