@@ -93,6 +93,7 @@ local Menu = {
93
93
},
94
94
},
95
95
Misc = {
96
+ strafePred = true ,
96
97
ChargeControl = true ,
97
98
ChargeSensitivity = 50 ,
98
99
CritRefill = {Active = true , NumCrits = 1 },
@@ -209,7 +210,7 @@ local ping = 0
209
210
local swingrange = 48
210
211
local tickRate = 66
211
212
local tick_count = 0
212
- local time = 13
213
+ local time = 15
213
214
local Gcan_attack = false
214
215
local Safe_Strafe = false
215
216
local can_charge = false
@@ -650,6 +651,32 @@ local function checkInRangeWithLatency(playerIndex, swingRange)
650
651
local fakelatencyON = gui .GetValue (" Fake Latency" )
651
652
652
653
if Backtrack == 0 and fakelatencyON == 0 then
654
+ -- Check for charge range bug
655
+ if pLocalClass == 4 -- player is Demoman
656
+ and Menu .Misc .ChargeReach -- menu option for such option is true
657
+ and chargeLeft == 100 then -- charge metter is full
658
+ if checkInRange (vPlayerOrigin , pLocalOrigin , Charge_Range ) then
659
+ inRange = true
660
+ point = vPlayerOrigin
661
+ tick_count = tick_count + 1
662
+ if tick_count >= (time - 1 ) then
663
+ tick_count = 0
664
+ can_charge = true
665
+ end
666
+ elseif checkInRange (vPlayerFuture , pLocalFuture , Charge_Range ) then
667
+ inRange = true
668
+ point = vPlayerFuture
669
+ tick_count = tick_count + 1
670
+ if tick_count >= (time - 1 ) then
671
+ tick_count = 0
672
+ can_charge = true
673
+ end
674
+ end
675
+ if inRange then
676
+ return inRange , point , can_charge
677
+ end
678
+ end
679
+
653
680
-- Adjust hitbox for current position
654
681
inRange , point = checkInRange (vPlayerOrigin , pLocalOrigin , swingRange - 18 )
655
682
if inRange then
@@ -658,7 +685,7 @@ local function checkInRangeWithLatency(playerIndex, swingRange)
658
685
659
686
inRange = checkInRange (vPlayerFuture , pLocalFuture , swingRange )
660
687
if inRange then
661
- return inRange , point
688
+ return inRange , point , can_charge
662
689
end
663
690
end
664
691
@@ -675,6 +702,24 @@ local function checkInRangeWithLatency(playerIndex, swingRange)
675
702
if playerTicks [playerIndex ] then
676
703
local pastOrigin = playerTicks [playerIndex ][tick ]
677
704
705
+ -- Check for charge range bug
706
+ if pLocalClass == 4 -- player is Demoman
707
+ and Menu .Misc .ChargeReach -- menu option for such option is true
708
+ and chargeLeft == 100 then -- charge metter is full
709
+ if checkInRange (pastOrigin , pLocalOrigin , Charge_Range ) then
710
+ inRange = true
711
+ point = vPlayerOrigin
712
+ tick_count = tick_count + 1
713
+ if tick_count >= (time - 1 ) then
714
+ tick_count = 0
715
+ can_charge = true
716
+ end
717
+ end
718
+ if inRange then
719
+ return inRange , point , can_charge
720
+ end
721
+ end
722
+
678
723
inRange , point = checkInRange (pastOrigin , pLocalOrigin , swingRange )
679
724
if inRange then
680
725
return inRange , point
@@ -684,6 +729,33 @@ local function checkInRangeWithLatency(playerIndex, swingRange)
684
729
end
685
730
686
731
if Backtrack == 1 then
732
+
733
+ -- Check for charge range bug
734
+ if pLocalClass == 4 -- player is Demoman
735
+ and Menu .Misc .ChargeReach -- menu option for such option is true
736
+ and chargeLeft == 100 then -- charge metter is full
737
+ if checkInRange (vPlayerOrigin , pLocalOrigin , Charge_Range ) then
738
+ inRange = true
739
+ point = vPlayerOrigin
740
+ tick_count = tick_count + 1
741
+ if tick_count >= (time - 1 ) then
742
+ tick_count = 0
743
+ can_charge = true
744
+ end
745
+ elseif checkInRange (vPlayerFuture , pLocalFuture , Charge_Range ) then
746
+ inRange = true
747
+ point = vPlayerFuture
748
+ tick_count = tick_count + 1
749
+ if tick_count >= (time - 1 ) then
750
+ tick_count = 0
751
+ can_charge = true
752
+ end
753
+ end
754
+ if inRange then
755
+ return inRange , point , can_charge
756
+ end
757
+ end
758
+
687
759
-- Adjust hitbox for current position
688
760
inRange , point = checkInRange (vPlayerOrigin , pLocalOrigin , swingRange )
689
761
if inRange then
875
947
stepSize = pLocal :GetPropFloat (" localdata" , " m_flStepSize" )
876
948
877
949
CalcStrafe ()
950
+
951
+
878
952
if inaccuracyValue then
879
953
swingrange = swingrange - inaccuracyValue
880
954
end
886
960
else
887
961
local player = WPlayer .FromEntity (pLocal )
888
962
889
- strafeAngle = strafeAngles [pLocal :GetIndex ()] or 0
963
+ strafeAngle = Menu . Misc . strafePred and strafeAngles [pLocal :GetIndex ()] or 0
890
964
891
965
local predData = PredictPlayer (player , time , strafeAngle )
892
966
@@ -935,32 +1009,13 @@ vdistance = (vPlayerOrigin - pLocalOrigin):Length()
935
1009
936
1010
-- Get distance between local player and closest player after swing
937
1011
fDistance = (vPlayerFuture - pLocalFuture ):Length ()
1012
+ local inRange = false
1013
+ local inRangePoint = nil
938
1014
939
- local inRange , InRangePoint = checkInRangeWithLatency (CurrentTarget :GetIndex (), swingrange )
1015
+ inRange , InRangePoint , can_charge = checkInRangeWithLatency (CurrentTarget :GetIndex (), swingrange )
940
1016
-- Use inRange to decide if can attack
941
1017
can_attack = inRange
942
1018
943
- -- Check for charge range bug
944
- if pLocalClass == 4 -- player is Demoman
945
- and Menu .Misc .ChargeReach -- menu option for such option is true
946
- and chargeLeft == 100 then -- charge metter is full
947
- if checkInRange (vPlayerOrigin , pLocalOrigin , Charge_Range ) then
948
- can_attack = true
949
- tick_count = tick_count + 1
950
- if tick_count >= 12 then
951
- tick_count = 0
952
- can_charge = true
953
- end
954
- elseif checkInRange (vPlayerFuture , pLocalFuture , Charge_Range ) then
955
- can_attack = true
956
- tick_count = tick_count + 1
957
- if tick_count >= 12 then
958
- tick_count = 0
959
- can_charge = true
960
- end
961
- end
962
- end
963
-
964
1019
-- [--------------AimBot-------------------] --get hitbox of ennmy pelwis(jittery but works)
965
1020
local hitboxes = CurrentTarget :GetHitboxes ()
966
1021
local hitbox = hitboxes [6 ]
@@ -1728,6 +1783,7 @@ if not (engine.Con_IsVisible() or engine.IsGameUIVisible()) and Menu.Visuals.Ena
1728
1783
1729
1784
if Menu .tabs .Misc then
1730
1785
ImMenu .BeginFrame (1 )
1786
+ Menu .Misc .strafePred = ImMenu .Checkbox (" Local Strafe Pred" , Menu .Misc .strafePred )
1731
1787
Menu .Misc .ChargeReach = ImMenu .Checkbox (" Charge Reach" , Menu .Misc .ChargeReach )
1732
1788
ImMenu .EndFrame ()
1733
1789
0 commit comments