예제 #1
0
파일: anglesAiming.py 프로젝트: xenus/wot
def onEnterWorld(self, prereqs):
    if self.isPlayerVehicle:
        global yaw, old_yaw, pitch, old_pitch, old_multiplier, dataHor, dataVert, turretYawLimits, scaleHor, scaleVert
        global minStep, maxPitch, minPitch, currentStep, minBound, maxBound, screenHeight, screenWidth, player
        global old_gunAnglesPacked, isAlive, cameraMode
        player = BigWorld.player()
        yaw = 0.0
        pitch = 0.0
        old_multiplier = 1.0
        old_gunAnglesPacked = None
        old_yaw = None
        old_pitch = None
        isAlive = self.isAlive
        screenHeight = BigWorld.screenHeight()
        screenWidth = BigWorld.screenWidth()
        currentStep = STEP
        verticalFov = FovExtended.instance().actualDefaultVerticalFov
        horizontalFov = FovExtended.calcHorizontalFov(verticalFov)
        scaleHor = screenWidth / horizontalFov if horizontalFov else screenWidth
        scaleVert = screenHeight / verticalFov if verticalFov else screenHeight
        gun = self.typeDescriptor.gun
        minBound, maxBound = gun['pitchLimits']['absolute']
        minStep = (maxBound - minBound) / 63
        turretYawLimits = gun['turretYawLimits']
        maxPitch =gun['pitchLimits']['maxPitch']
        minPitch = gun['pitchLimits']['minPitch']
        dataHor, dataVert = coordinate(yaw, pitch)
        cameraMode = None
        as_event('ON_ANGLES_AIMING')
예제 #2
0
파일: anglesAiming.py 프로젝트: xenus/wot
def StrategicAimingSystem_enable(self, targetPos):
    global dataHor, dataVert, scaleHor, scaleVert, yHor, yVert, cameraMode
    verticalFov = FovExtended.instance().actualDefaultVerticalFov
    horizontalFov = FovExtended.calcHorizontalFov(verticalFov)
    yHor = 0
    yVert = 0
    scaleHor = screenWidth / horizontalFov if horizontalFov else screenWidth
    scaleVert = screenHeight / verticalFov if verticalFov else screenHeight
    dataHor, dataVert = coordinate(yaw, pitch)
    cameraMode = 'str'
    as_event('ON_ANGLES_AIMING')
예제 #3
0
파일: anglesAiming.py 프로젝트: xenus/wot
def ArcadeAimingSystem_enable(self, targetPos, turretYaw=None, gunPitch=None):
    global dataHor, dataVert, scaleHor, scaleVert, yHor, yVert, cameraMode
    verticalFov = FovExtended.instance().actualDefaultVerticalFov
    horizontalFov = FovExtended.calcHorizontalFov(verticalFov)
    yHor = - screenHeight * 0.0775
    yVert = yHor
    scaleHor = screenWidth / horizontalFov if horizontalFov else screenWidth
    scaleVert = screenHeight / verticalFov if verticalFov else screenHeight
    dataHor, dataVert = coordinate(yaw, pitch)
    cameraMode = 'arc'
    as_event('ON_ANGLES_AIMING')