diff options
| author | boris <wzn@moneybot.cc> | 2018-11-28 16:00:02 +1300 |
|---|---|---|
| committer | boris <wzn@moneybot.cc> | 2018-11-28 16:00:02 +1300 |
| commit | 3d412a4b30a9f7c7f51ea6562e694315948bd3da (patch) | |
| tree | 26d67dfd1f3e5fd12903ad13e85d0cb8bcf8f21c /gmod/lag_mgr.cpp | |
| parent | e4729e4393d90271a3814c7a79950a660c48325a (diff) | |
cleaned up
in short, the cheat and loader are now separate solutions. unused stuff was moved into the legacy solution in case anyone wants to compile it or whatever.
i can change this back if you want to. also, i configured the loader to compile in x64, and have separate build types for linux and win64
Diffstat (limited to 'gmod/lag_mgr.cpp')
| -rw-r--r-- | gmod/lag_mgr.cpp | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/gmod/lag_mgr.cpp b/gmod/lag_mgr.cpp deleted file mode 100644 index 4f9d04b..0000000 --- a/gmod/lag_mgr.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include "lag_mgr.hpp"
-#include "c_base_player.hpp"
-#include "context.hpp"
-#include "interface.hpp"
-#include "base_cheat.hpp"
-
-namespace features
-{
- void c_lagmgr::on_antiaim( ) {
- static bool lag_flip{ }; //fuck you and ur cmdnr
- *m_sendpacket = lag_flip;
- lag_flip ^= 1;
-
- if( m_sent_ticks ) {
- *m_sendpacket = false;
- }
- }
-
-
- void c_lagmgr::fakelag( ) {
- //2017 sucked
- //i hope 2018 goes better
-
- if( !g_settings.rage.fakelag.mode( ) ||
- !g_settings.rage.fakelag.ticks( ) ) {
- m_breaking_lc = false;
- return;
- }
-
- auto& settings = g_settings.rage.fakelag;
-
- if( g_ctx.m_local->m_vecVelocity( ).length( ) < 0.1f ) {
- return;
- }
-
- vec3_t delta = g_ctx.m_last_origin - g_ctx.m_local->m_vecOrigin( );
- int max_ticks = math::min( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ? 10 : 16, g_settings.rage.fakelag.ticks( ) );
- bool force_send = m_held_ticks > max_ticks;
- if( settings.mode == 1 ) {
- if( delta.length2dsqr( ) > 4096.f ) {
- force_send = get_choked( ) > 3;
- }
- }
-
- if( settings.mode == 2 ) {
- auto fluc = math::random_number( -settings.fluctuate( ), settings.fluctuate( ) ) * 0.01f;
- force_send = m_held_ticks > math::min( max_ticks + ( int )fluc, 15 );
- }
-
- bool send = false;
- static bool was_onground{ };
-
- if( !settings.in_move ) {
- send = true;
- }
-
- if( settings.in_air && !( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) ) {
- send = false;
- }
-
- if( settings.avoid_ground ) {
- if( !was_onground && g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) {
- send = false;
- }
- }
-
- was_onground = g_ctx.m_local->m_fFlags( ) & FL_ONGROUND;
-
- if( ( m_cmd->m_buttons & IN_ATTACK ) &&
- !settings.in_attack ) {
- send = true;
- }
-
- *m_sendpacket = ( send || force_send ) && !get_sent( );
- if( *m_sendpacket ) {
- m_breaking_lc = delta.length2dsqr( ) > 4096.f;
- }
- }
-}
\ No newline at end of file |
