Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import BigWorld
- import BattleReplay
- import Math
- from debug_utils import *
- from AvatarInputHandler.control_modes import ArcadeControlMode
- def __activateAlternateMode(self, pos = None, bByScroll = False, old_activateAlternateMode = ArcadeControlMode._ArcadeControlMode__activateAlte rnateMode ):
- try:
- if self._aih.isSPG and bByScroll:
- ownVehicle = BigWorld.entity(BigWorld.player().playerVehicleID)
- if ownVehicle is not None and ownVehicle.isStarted and ownVehicle.appearance.isUnderwater:
- return
- self._cam.update(0, 0, 0, False, False)
- equipmentID = None
- if BattleReplay.isPlaying():
- mode = BattleReplay.g_replayCtrl.getControlMode()
- pos = BattleReplay.g_replayCtrl.getGunMarkerPos()
- equipmentID = BattleReplay.g_replayCtrl.getEquipmentId()
- else:
- if pos is None:
- pos = self.camera.aimingSystem.getDesiredShotPoint()
- if pos is None:
- pos = Math.Matrix(self._gunMarker.matrixProvider()).appl yToOrigin()
- mode = 'sniper'
- self._aih.onControlModeChanged(mode, preferredPos=pos, aimingMode=self._aimingMode, saveZoom=not bByScroll, equipmentID=equipmentID)
- else:
- old_activateAlternateMode(self, pos, bByScroll)
- except :
- LOG_CURRENT_EXCEPTION()
- old_activateAlternateMode(self, pos, bByScroll)
- ArcadeControlMode._ArcadeControlMode__activateAlte rnateMode = __activateAlternateMode
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement