def new_onControlModeChanged(current, eMode, **args): old_onControlModeChanged(current, eMode, **args) if eMode == 'sniper': BigWorld.wg_setTreeHidingRadius(600, 0.0) BigWorld.wg_enableTreeTransparency(False) else: BigWorld.wg_setTreeHidingRadius(15.0, 10.0) BigWorld.wg_enableTreeTransparency(True)
def new_PlayerHandleKey(current, isDown, key, mods): if hasattr(BigWorld.player(), 'arena'): if key == Keys.KEY_LALT: player = BigWorld.player() if player.inputHandler.ctrl == player.inputHandler.ctrls['sniper']: if isDown: BigWorld.wg_setTreeHidingRadius(15.0, 15.0) BigWorld.wg_enableTreeTransparency(True) else: BigWorld.wg_setTreeHidingRadius(600, 0.0) BigWorld.wg_enableTreeTransparency(False) else: if isDown: BigWorld.wg_enableTreeHiding(True) BigWorld.wg_setTreeHidingRadius(600, 0.0) BigWorld.wg_enableTreeTransparency(False) else: BigWorld.wg_enableTreeHiding(False) BigWorld.wg_enableTreeTransparency(True) return old_PlayerHandleKey(current, isDown, key, mods)