USF Updated Classes

Posts 13 of 3 · Page 1 of 1
USF Updated Classes
I haven't spent much time restructuring the core classes as I'm bored of making/remaking the usual features.
Code:
struct SFGameFunctions
{
	signed int (__stdcall* GAME_CheckBones)(char* bone_name);
	signed int (__stdcall* GAME_GetBonePosition)( int bone_index );
	void (__stdcall* KillPlayer)( int Target, int Weapon );
	void (__stdcall* EngineText)( void* ecx, int dx, int dy, int flag, char* txt );
	SFGameFunctions( );
};

Code:
struct SFClass
{
	PDWORD PointerToClass; 

	SFClass( PDWORD Address )
	{
		PointerToClass = Address; 
	}

	BOOL IsClassAlive( )
	{
		BOOL Result;

		if(*PointerToClass != NULL)
		{
			Result = true;
		}
		else
		{
			Result = false;
		}

		return Result;
	}
};
Code:
struct GAME_SFDevice
{
	CHAR _UNKNOWN[0x08];
	LPDIRECT3DDEVICE9 pDevice;
};
Code:
struct SFDevice
{
	SFClass* GAMECLASS;
	CVMTHookManager* HookVMTManager;

	SFDevice( DWORD GameClass_Location )
	{
		GAMECLASS = new SFClass( (PDWORD)GameClass_Location );

	}

	~SFDevice( )
	{
		delete GAMECLASS;
	}

	LPDIRECT3DDEVICE9 Device( )
	{
		return ((GAME_SFDevice*)(*GAMECLASS->PointerToClass))->pDevice;
	}

	BOOL InitHook( )
	{
		if(!GAMECLASS->IsClassAlive( ))
			return FALSE;

		PDWORD* ppdwDevice = (PDWORD*)Device( );

		if(ppdwDevice == NULL)
			return FALSE;

		HookVMTManager = new CVMTHookManager( ppdwDevice );

		return TRUE;
	}

};

extern SFDevice* pSFDevice;
Code:
struct BULLETSTUFF
{
	DWORD ENABLED;
	char _0x0004[20];
	float ANGLEX;
	float ANGLEY;
	char _0x0020[8];
	float BANGLEX;
	float BANGLEY; 
	char _0x0030[4];
	float BPOSX;
	float BPOSY;
	float BPOSZ; 
	char _0x0040[4];
	WORD BULLETDECAY;
	char _0x0046[6];
	float POSX;
	float POSY; 
	float POSZ;
	WORD TIMER;
	char _0x005A[22];
};
Code:
struct GAME_WeaponControl
{
	CHAR UNKNOWN[0x19EE4];
	DWORD CROSSHAIR1;
	DWORD CROSSHAIR2;
};
Code:
struct CHEAT_WeaponControl
{
	void RunCheats(GAME_WeaponControl* pWeaponControl)
	{
		if(!pWeaponControl)
			return;

		if(pMenuOptions->bNoRecoil)
		{
			pWeaponControl->CROSSHAIR1 = 0;
			pWeaponControl->CROSSHAIR2 = 0;
		}
	}

};
Code:
struct GAME_Unknown1
{
	char _0x0000[0x57AE8];					// 0x0		:	0x57AE8
	DWORD Weapon;
	DWORD Weapon2;
};
Code:
struct GAME_PlayerData
{
	char _0x000[0x57C10];
	float X;
	float Y;
	float Z;
	float X_verified;
	float Y_verified;
	float Z_verified;
};
Code:
struct GAME_PlayerWorld
{
	DWORD mInfo;							// 0x0		:	0x04
	GAME_PlayerData* PlayerList[16];		// 0x4		:	0x44
	GAME_WeaponControl* pWeaponControl;		// 0x44		:	0x48
	char _0x0048[0x2B384];					// 0x48		:	0x2B384
	GAME_Unknown1* pUnknown1;
};
Code:
struct CHEAT_PlayerWorld
{
	GAME_PlayerData* GetPlayer(GAME_PlayerWorld* pPlayerWorld, INT Index )
	{
		if(!pPlayerWorld)
			return nullptr;

		return pPlayerWorld->PlayerList[Index];
	}

	void RunCheats(GAME_PlayerWorld* pPlayerWorld)
	{
		if(!pPlayerWorld)
			return;

		
		if(pPlayerWorld->pUnknown1)
		{
			if(pMenuOptions->bShootNade)
			{
				//pPlayerWorld->pUnknown1->Weapon = 0x1;
			}
		}
	}
};
Code:
struct GAME_ClientData
{
	char _0x0000[0x10];
	GAME_PlayerWorld* pPlayerWorld;
};
Code:
struct GAME_ClientBase
{
	char _0x0000[32];
	GAME_ClientData* pClientData;
};
Code:
struct SFClientData
{
	SFClass* GAMECLASS;

	SFClientData( DWORD GameClass_Location )
	{
		GAMECLASS = new SFClass( (PDWORD)GameClass_Location );

	}

	~SFClientData( )
	{
		delete GAMECLASS;
	}

	GAME_ClientData* ClientDataPtr( )
	{
		if(GAMECLASS->IsClassAlive() != NULL)
		{
			return ((GAME_ClientBase*)(*GAMECLASS->PointerToClass))->pClientData;
		}

		return NULL;
	}

	GAME_PlayerWorld* PlayerWorldPtr( )
	{
		GAME_ClientData* pClientData = ClientDataPtr( );

		if(pClientData != NULL)
		{
			return pClientData->pPlayerWorld;
		}

		return NULL;
	}

	GAME_WeaponControl* WeaponPtr( )
	{
		GAME_PlayerWorld* pPlayerWorld = PlayerWorldPtr( );

		if(pPlayerWorld != NULL)
		{
			return pPlayerWorld->pWeaponControl;
		}

		return NULL;
	}

	CHEAT_WeaponControl oCHEAT_WeaponControl;
	CHEAT_PlayerWorld oCHEAT_PlayerWorld;
};

extern SFClientData* pSFClientData;
I'll post something more organised and structured once I've finished completely reversing all the used classes.
i Don't Say This is my Work?
Posts 13 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?