Advertisement
deutscher_Adler

Walhalla_Arty_Sniper_Sight

Jun 24th, 2015
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.27 KB | None | 0 0
  1. import BigWorld
  2. import BattleReplay
  3. import Math
  4. from debug_utils import *
  5. from AvatarInputHandler.control_modes import ArcadeControlMode
  6. def __activateAlternateMode(self, pos = None, bByScroll = False, old_activateAlternateMode = ArcadeControlMode._ArcadeControlMode__activateAlte rnateMode ):
  7. try:
  8. if self._aih.isSPG and bByScroll:
  9. ownVehicle = BigWorld.entity(BigWorld.player().playerVehicleID)
  10. if ownVehicle is not None and ownVehicle.isStarted and ownVehicle.appearance.isUnderwater:
  11. return
  12. self._cam.update(0, 0, 0, False, False)
  13. equipmentID = None
  14. if BattleReplay.isPlaying():
  15. mode = BattleReplay.g_replayCtrl.getControlMode()
  16. pos = BattleReplay.g_replayCtrl.getGunMarkerPos()
  17. equipmentID = BattleReplay.g_replayCtrl.getEquipmentId()
  18. else:
  19. if pos is None:
  20. pos = self.camera.aimingSystem.getDesiredShotPoint()
  21. if pos is None:
  22. pos = Math.Matrix(self._gunMarker.matrixProvider()).appl yToOrigin()
  23. mode = 'sniper'
  24. self._aih.onControlModeChanged(mode, preferredPos=pos, aimingMode=self._aimingMode, saveZoom=not bByScroll, equipmentID=equipmentID)
  25. else:
  26. old_activateAlternateMode(self, pos, bByScroll)
  27. except :
  28. LOG_CURRENT_EXCEPTION()
  29. old_activateAlternateMode(self, pos, bByScroll)
  30.  
  31. ArcadeControlMode._ArcadeControlMode__activateAlte rnateMode = __activateAlternateMode
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement