diff --git a/JerryScript.lua b/JerryScript.lua index 554da2d..ea7a99b 100644 --- a/JerryScript.lua +++ b/JerryScript.lua @@ -1991,17 +1991,29 @@ do local extraZoom2 = 0 local modifiedAimFov = {} JSlang.toggle_loop(_LR['Weapon settings'], 'Enable aim fov', {'JSenableAimFov'}, 'Lets you modify the fov you have while you\'re aiming.', function() + JSkey.disable_control_action(0, 'INPUT_SNIPER_ZOOM_IN_ONLY') + JSkey.disable_control_action(0, 'INPUT_SNIPER_ZOOM_OUT_ONLY') + + if not JSkey.is_control_pressed(0, 'INPUT_AIM') then + extraZoom2 = 0 + return + end + + local step = if extraZoom2 > 60 or extraZoom2 < -5 then 3 else 6 + + if not (extraZoom2 <= -35) and JSkey.is_disabled_control_just_pressed(0, 'INPUT_SNIPER_ZOOM_IN_ONLY') then + extraZoom2 -= step + elseif not (extraZoom2 >= 100) and JSkey.is_disabled_control_just_pressed(0, 'INPUT_SNIPER_ZOOM_OUT_ONLY') then + extraZoom2 += step + end + local weaponHash = readWeaponAddress(modifiedAimFov, 0x2FC, false) if weaponHash == 0 then return end - memory.write_float(modifiedAimFov[weaponHash].address, modifiedAimFov[weaponHash].original + extraZoom2) + memory.write_float(modifiedAimFov[weaponHash].address, modifiedAimFov[weaponHash].original + extraZoom2) end, function() resetWeapons(modifiedAimFov) end) - JSlang.slider(_LR['Weapon settings'], 'Aim fov', {'JSaimFov'}, '',-40, 100, 0, 1, function(value) - extraZoom2 = value - end) - JSlang.divider(_LR['Weapon settings'], 'Zoom aim fov') local extraZoom = 0 diff --git a/commandList.txt b/commandList.txt index 906f563..b5c1215 100644 --- a/commandList.txt +++ b/commandList.txt @@ -114,7 +114,6 @@ Weapons — Command: JSweapons Remove spin-up time — Removes the spin-up from both the minigun and the widowmaker. — Command: JSnoSpinUp [on/off] Bullet force multiplier — Works best when shooting vehicles from the front. Displayed value is in percent. — Command: JSbulletForceMultiplier [on/off] Enable aim fov — Lets you modify the fov you have while you're aiming. — Command: JSenableAimFov [on/off] - Aim fov (-40 to 100) — Command: JSaimFov [-40 to 100] Enable zoom fov — Lets you modify the fov you have while you're aiming and has zoomed in. — Command: JSenableZoomFov [on/off] Zoom aim fov (1.00 to 99999999.99) — Command: JSzoomAimFov [1.00 to 99999999.99] Proxy stickys