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/skins.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/skins.cpp')
| -rw-r--r-- | gmod/skins.cpp | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/gmod/skins.cpp b/gmod/skins.cpp deleted file mode 100644 index 9564abf..0000000 --- a/gmod/skins.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include "skins.hpp"
-#include "settings.hpp"
-#include "context.hpp"
-#include "interface.hpp"
-
-namespace features
-{
- int c_skins::get_knife_index( ) {
- switch( g_settings.misc.skins.knife( ) ) {
- case 0:
- return 0;
- case 1:
- return 500;
- case 2:
- return 505;
- case 3:
- return 506;
- case 4:
- return 507;
- case 5:
- return 508;
- case 6:
- return 509;
- }
-
- return 0;
- }
-
- const char* c_skins::get_model_str( ) {
- switch( g_settings.misc.skins.knife( ) ) {
- case 0:
- return 0;
- case 1:
- return xors( "models/weapons/v_knife_bayonet.mdl" );
- case 2:
- return xors( "models/weapons/v_knife_flip.mdl" );
- case 3:
- return xors( "models/weapons/v_knife_gut.mdl" );
- case 4:
- return xors( "models/weapons/v_knife_karam.mdl" );
- case 5:
- return xors( "models/weapons/v_knife_m9_bay.mdl" );
- case 6:
- return xors( "models/weapons/v_knife_tactical.mdl" );
- }
-
- return nullptr;
- }
-
- void c_skins::override_knife( ) {
- auto weapons = ( uint32_t* )( uintptr_t( g_ctx.m_local ) + 0x2DE8 );
- for( int i{ }; weapons[ i ]; ++i ) {
- auto wep = g_csgo.m_entlist( )->GetClientEntityFromHandle< c_base_weapon >( weapons[ i ] );
- auto vm = g_csgo.m_entlist( )->GetClientEntityFromHandle< c_base_weapon >( g_ctx.m_local->m_hViewModel( ) );
- if( wep && wep->is_knife( ) ) {
- int index = get_knife_index( );
- if( index ) {
- int model = g_csgo.m_model_info( )->GetModelIndex( get_model_str( ) );
-
- wep->m_iItemDefinitionIndex( ) = index;
- wep->m_nModelIndex( ) = model;
- if( weapons[ i ] == g_ctx.m_local->m_hActiveWeapon( ) ) {
- vm->m_nModelIndex( ) = model;
- }
- }
- }
- }
- }
-
- void c_skins::operator()( ) {
- if( g_ctx.m_local && g_ctx.m_local->is_valid( ) ) {
- override_knife( );
- }
- }
-}
\ No newline at end of file |
