Superkill, CharacterHitBox
Code:
CHitBoxFX.h
#pragma once
#include <Development/Common/Header/IBase.h>
class CCharacterHitBox;
class CHitBoxFX : public IBase
{
public:
int GetNodeId() { return this->GetValue<int>(0x0000); } //set to 0 all nodes [ Gold Head Kill ] for Player only
void SetNodeId(int value) { this->SetValue<int>(0x0000, value); }
int GetPlayerId() { return this->GetValue<int>(0x0004); }
auto GetCharacterHitBox() { return this->GetValue<CCharacterHitBox*>(0x0008); }
auto GetModelNodeType() { return this->GetValue<DWORD>(0x000C); }
void SetModelNodeType(DWORD value) { this->SetValue(0x000C, value); }
auto GetHitBoxName() { return this->GetString(0x0010); }
};
Code:
CCharacterHitBox.h
#pragma once
#include <Development/Common/Header/IBase.h>
#include <Engine/Source Files/Main/singleton.h>
class CharacFX;
class CModelButeMgr;
class ModelInstance;
class ModelNode;
class CCharacterHitBox;
class CHitBoxFX;
class EngineHook;
class NodeRadiusStruct : public IBase
{
public:
ModelInstance* hModel() { return this->GetValue<ModelInstance*>(0x0000); }
auto Unknown_0x4() { return this->GetValue<DWORD>(0x0004); }
auto Unknown_0x8() { return this->GetValue<DWORD>(0x0008); }
CHitBoxFX* GetCHitBoxFX() { return (CHitBoxFX*)((uintptr_t)this + 0x000C); }
CModelButeMgr* GetModelBute();
const char* GetNodeName();
};
class CTList : public IBase
{
public:
//List m_list; //0x0000
//unsigned int m_bManageData; //0x0010
NodeRadiusStruct* m_pCurGetItemLink() { return this->GetValue<NodeRadiusStruct*>(0x0014); }
CTList* GetNext();
};
class CCharacterHitBox : public IBase, public singleton<CCharacterHitBox>
{
public:
CCharacterHitBox();
public:
void EnlargeAndSetDims(float multiplier);
ModelInstance* hModel() { return this->GetValue<ModelInstance*>(0x0004); } //same with characFX->PlayerObject
CharacFX* GetCharacFX() { return this->GetValue<CharacFX*>(0x000C); }
int NumNodes() { return this->GetValue<int>(0x0024); }
CTList* pHead() { return this->GetValue<CTList*>(0x0020); }
CTList* m_NodeRadiusList_() { return **(CTList***)((uintptr_t)this + 0x0020); }
auto GetDimension() { return this->GetValue<float>(0x0054); }
void SetDimension(float value) { this->SetValue(0x0054, value); }
auto GetRelativePos() { return this->GetValue<float>(0x0018); }
void SetRelativePos(float value) { this->SetValue(0x0018, value); }
auto Get_1C() { return this->GetValue<BYTE>(0x001C); }
void Set_1C(BYTE value) { this->SetValue(0x001C, value); }
auto GetNodeObjectFlagStatus() { return this->GetValue<BYTE>(0x0010); }
void SetNodeObjectFlagStatus(BYTE value) { this->SetValue(0x0010, value); }
bool IsAllNodesObjectPositionUpdated() { return this->GetValue<DWORD>(0x0028) == 1; }
ModelNode* GetNode(int buteid);
int GetHighestDamageIdByButeId(int buteid);
ModelNode* GetHighestDamageNodeByButeId(int buteid);
ModelInstance* GetHitBoxByNodeId(int NodeId, int ModelType);
D3DXVECTOR3 GetHDNodePos(int ModelType);
template <typename T>
T GetItem(DWORD v8)
{
if (v8 == NULL)
return (T)v8;
typedef DWORD* (__thiscall* GetItemFn)(DWORD*);
auto result = reinterpret_cast<GetItemFn>(BaseFX::get()->player->m_GetNext)(&v8); //return to v8
return v8 == NULL ? (T)*result : (T)v8;
}
void EnlargeDims(float multiplier, int ModelType);
void EnlargeDimsVisible(float multiplier, int ModelType, bool highestDamage);
void EnlargeDimsBody(float multiplier, int ModelType);
void EnlargeDimsBodyVisible(float multiplier, int ModelType);
void RestoreNodesValue(int ModelType);
void RestoreDimsValue(int ModelType);
void RestoreBothValue(int ModelType);
};
Code:
CCharacterHitBox.cpp
#include <Development/Source Files/Common/ClientShellDLL/Entities/FX/CCharacterHitBox.h>
#include <Development/Source Files/Common/ClientShellDLL/Entities/FX/CAICharacterTypeTable.h>
#include <Development/Source Files/Extern/Engine/sdk/ILTPhysics.h>
#include <Development/Source Files/Extern/Engine/sdk/ILTModel.h>
#include <Development/Source Files/Extern/Engine/runtime/model/Model.h>
#include <Development/Source Files/Extern/Engine/runtime/world/de_objects.h>
#include <Development/Source Files/Extern/Engine/runtime/world/CObjectUserData.h>
#include <Development/Source Files/Main/Utils/Pointers.h>
#include <Development/Source Files/Common/LTC/CWeaponMgr.h>
#include <Development/Source Files/Common/LTC/ModelButeMgr.h>
#include <Development/Source Files/Common/ClientShellDLL/Entities/FXList/HitBoxFX.h>
#include <Development/Source Files/Common/ClientShellDLL/Entities/FXList/CAIClient.h>
#include <Development/Source Files/Common/ClientShellDLL/CLTClientShell/CLTClientShell.h>
#include <Development/Source Files/Common/ClientShellDLL/CPlayerCInt/CPlayerClnt.h>
#include <Engine/Source Files/Extern/MyHook/EngineHook/EngineHook.h>
CCharacterHitBox::CCharacterHitBox()
{
}
CModelButeMgr* NodeRadiusStruct::GetModelBute()
{
try
{
if (!this->IsValidBaseAddress())
return NULL;
return ModelNodeInfo_t::GetModelNodeById(this->GetCHitBoxFX()->GetNodeId());
}
catch (...) {}
return NULL;
}
const char* NodeRadiusStruct::GetNodeName()
{
try
{
if (!this->IsValidBaseAddress())
return "";
auto bute = this->GetModelBute();
if (bute == NULL || !bute->IsValidBaseAddress())
return "";
return bute->NodeName();
}
catch (...) {}
return "";
}
ModelNode* CCharacterHitBox::GetNode(int buteid)
{
try
{
if (!this->IsValidBaseAddress())
return NULL;
if (buteid < 0 || buteid >= CModelButeMgr::get()->m_MaxModelNodeCount)
return NULL;
auto pModel = this->hModel();
if (pModel == NULL || !pModel->IsValidBaseAddress())
return NULL;
auto modelDB = pModel->GetModelDB();
if (modelDB == NULL || !modelDB->IsValidBaseAddress())
return NULL;
if (PP::get()->ilt_model_client == NULL)
return NULL;
auto buteMgr = ModelNodeInfo_t::GetModelNodeById(buteid);
if (buteMgr == NULL || !buteMgr->IsValidBaseAddress())
return NULL;
UINT hNode;
if (PP::get()->ilt_model_client->GetNode(pModel, buteMgr->NodeName(), hNode) == LT_OK)
return modelDB->GetNode(hNode);
}
catch (...) {}
return NULL;
}
int CCharacterHitBox::GetHighestDamageIdByButeId(int buteid)
{
try
{
if (!this->IsValidBaseAddress())
return -1;
int highest_damage_bute_id = ModelNodeInfo_t::GetIdOfHighestDamageFactor(buteid);
if (highest_damage_bute_id == -1)
return -1;
return highest_damage_bute_id;
}
catch (...) {}
return -1;
}
ModelNode* CCharacterHitBox::GetHighestDamageNodeByButeId(int buteid)
{
try
{
if (!this->IsValidBaseAddress())
return NULL;
int highest_damage_bute_id = 0; // Player Head Index
if (buteid > 0)
highest_damage_bute_id = this->GetHighestDamageIdByButeId(buteid);
if (highest_damage_bute_id < 0)
return NULL;
return this->GetNode(highest_damage_bute_id);
}
catch (...) {}
return NULL;
}
CTList* CTList::GetNext()
{
try
{
return CCharacterHitBox::get()->GetItem<CTList*>(this->GetBaseAddress());
}
catch (...) {}
return NULL;
}
ModelInstance* CCharacterHitBox::GetHitBoxByNodeId(int NodeId, int ModelType)
{
try
{
if (!this->IsValidBaseAddress())
return NULL;
int bute_id = ModelNodeInfo_t::GetFirstIdOfModelType(ModelType);
if (bute_id < 0)
return NULL;
int nodeid = bute_id;
for (auto pCur = this->m_NodeRadiusList_(); pCur != this->pHead(); pCur = pCur->GetNext())
{
if (pCur == NULL || !pCur->IsValidBaseAddress())
break;
auto pNRS = pCur->m_pCurGetItemLink();
if (pNRS && pNRS->IsValidBaseAddress())
{
auto buteMgr = ModelNodeInfo_t::GetModelNodeById(bute_id);
if (buteMgr != NULL && buteMgr->IsValidBaseAddress())
{
auto pModel = pNRS->hModel();
if (pModel != NULL && pModel->IsValidBaseAddress())
{
auto modelNode = this->GetNode(bute_id);
if (modelNode != NULL && modelNode->IsValidBaseAddress())
if (modelNode->m_NodeIndex() == NodeId)
return pModel;
}
}
}
bute_id += 1;
}
}
catch (...) {}
return NULL;
}
D3DXVECTOR3 CCharacterHitBox::GetHDNodePos(int ModelType)
{
try
{
if (!this->IsValidBaseAddress())
return D3DXVECTOR3(0, 0, 0);
auto pModel = this->hModel();
if (pModel == NULL && pModel->IsValidBaseAddress())
return D3DXVECTOR3(0, 0, 0);
int bute_id = ModelNodeInfo_t::GetFirstIdOfModelType(ModelType);
if (bute_id < 0)
return D3DXVECTOR3(0, 0, 0);
auto hd_node = this->GetHighestDamageNodeByButeId(bute_id);
if (hd_node != NULL && hd_node->IsValidBaseAddress())
return pModel->GetNodePosition(hd_node->m_NodeIndex());
}
catch (...) {}
return D3DXVECTOR3(0, 0, 0);
}
void CCharacterHitBox::RestoreNodesValue(int ModelType)
{
try
{
if (!this->IsValidBaseAddress())
return;
int bute_id = ModelNodeInfo_t::GetFirstIdOfModelType(ModelType);
if (bute_id < 0)
return;
int nodeid = bute_id;
for (auto pCur = this->m_NodeRadiusList_(); pCur != this->pHead(); pCur = pCur->GetNext())
{
if (pCur == NULL || !pCur->IsValidBaseAddress())
break;
auto pNRS = pCur->m_pCurGetItemLink();
if (pNRS && pNRS->IsValidBaseAddress())
pNRS->GetCHitBoxFX()->SetNodeId(nodeid);
nodeid += 1;
}
}
catch (...) {}
}
void CCharacterHitBox::RestoreDimsValue(int ModelType)
{
try
{
if (!this->IsValidBaseAddress())
return;
int bute_id = ModelNodeInfo_t::GetFirstIdOfModelType(ModelType);
if (bute_id < 0)
return;
int nodeid = bute_id;
for (auto pCur = this->m_NodeRadiusList_(); pCur != this->pHead(); pCur = pCur->GetNext())
{
if (pCur == NULL || !pCur->IsValidBaseAddress())
break;
auto pNRS = pCur->m_pCurGetItemLink();
if (pNRS && pNRS->IsValidBaseAddress())
{
auto buteMgr = ModelNodeInfo_t::GetModelNodeById(nodeid);
if (buteMgr && buteMgr->IsValidBaseAddress())
{
auto pModel = pNRS->hModel();
if (pModel && pModel->IsValidBaseAddress())
{
auto dims = buteMgr->Dimesion();
D3DXVECTOR3 nDims = D3DXVECTOR3(dims.x, dims.y, dims.z);
pModel->SetDims(&nDims);
}
}
}
nodeid += 1;
}
}
catch (...) {}
}
void CCharacterHitBox::RestoreBothValue(int ModelType)
{
try
{
if (!this->IsValidBaseAddress())
return;
int bute_id = ModelNodeInfo_t::GetFirstIdOfModelType(ModelType);
if (bute_id < 0)
return;
int nodeid = bute_id;
for (auto pCur = this->m_NodeRadiusList_(); pCur != this->pHead(); pCur = pCur->GetNext())
{
if (pCur == NULL || !pCur->IsValidBaseAddress())
break;
auto pNRS = pCur->m_pCurGetItemLink();
if (pNRS && pNRS->IsValidBaseAddress())
{
// restore nodes
pNRS->GetCHitBoxFX()->SetNodeId(nodeid);
// restore dims
auto buteMgr = ModelNodeInfo_t::GetModelNodeById(nodeid);
if (buteMgr && buteMgr->IsValidBaseAddress())
{
auto pModel = pNRS->hModel();
if (pModel && pModel->IsValidBaseAddress())
{
auto dims = buteMgr->Dimesion();
D3DXVECTOR3 nDims = D3DXVECTOR3(dims.x, dims.y, dims.z);
pModel->SetDims(&nDims);
}
}
}
nodeid += 1;
}
}
catch (...) {}
}
void CCharacterHitBox::EnlargeDims(float multiplier, int ModelType)
{
try
{
if (!this->IsValidBaseAddress())
return;
int bute_id = ModelNodeInfo_t::GetFirstIdOfModelType(ModelType);
if (bute_id < 0)
return;
auto hd_node = this->GetHighestDamageNodeByButeId(bute_id);
if (hd_node == NULL || !hd_node->IsValidBaseAddress())
return;
for (auto pCur = this->m_NodeRadiusList_(); pCur != this->pHead(); pCur = pCur->GetNext())
{
if (pCur == NULL || !pCur->IsValidBaseAddress())
break;
auto pNRS = pCur->m_pCurGetItemLink();
if (pNRS && pNRS->IsValidBaseAddress())
{
auto buteMgr = ModelNodeInfo_t::GetModelNodeById(bute_id);
if (buteMgr && buteMgr->IsValidBaseAddress())
{
auto pModel = pNRS->hModel();
if (pModel && pModel->IsValidBaseAddress())
{
auto modelNode = this->GetNode(bute_id);
if (modelNode != NULL && modelNode->IsValidBaseAddress())
{
// HIGHEST DAMAGE ONLY
if (modelNode->m_NodeIndex() == hd_node->m_NodeIndex())
{
auto dims = buteMgr->Dimesion();
D3DXVECTOR3 nDims = D3DXVECTOR3(dims.x * multiplier, dims.y * multiplier, dims.z * multiplier);
pModel->SetDims(&nDims);
return;
}
}
}
}
}
bute_id += 1;
}
}
catch (...) {}
}
void CCharacterHitBox::EnlargeDimsVisible(float multiplier, int ModelType, bool highestDamage)
{
try
{
if (!this->IsValidBaseAddress())
return;
auto hObj = this->hModel();
if (hObj == NULL || !hObj->IsValidBaseAddress())
return;
if (!hObj->IsModel())
return;
int bute_id = ModelNodeInfo_t::GetFirstIdOfModelType(ModelType);
if (bute_id < 0)
return;
auto hd_node = this->GetHighestDamageNodeByButeId(bute_id);
if (hd_node == NULL || !hd_node->IsValidBaseAddress())
return;
for (auto pCur = this->m_NodeRadiusList_(); pCur != this->pHead(); pCur = pCur->GetNext())
{
if (pCur == NULL || !pCur->IsValidBaseAddress())
break;
auto pNRS = pCur->m_pCurGetItemLink();
if (pNRS && pNRS->IsValidBaseAddress())
{
auto buteMgr = ModelNodeInfo_t::GetModelNodeById(bute_id);
if (buteMgr && buteMgr->IsValidBaseAddress())
{
auto pModel = pNRS->hModel();
if (pModel && pModel->IsValidBaseAddress())
{
auto modelNode = this->GetNode(bute_id);
if (modelNode != NULL && modelNode->IsValidBaseAddress())
{
auto dims = buteMgr->Dimesion();
D3DXVECTOR3 nDims = dims;
// HIGHEST DAMAGE ONLY
if (highestDamage)
{
if (modelNode->m_NodeIndex() == hd_node->m_NodeIndex())
{
if (hObj->IsNodeVisible(modelNode->m_NodeIndex()))
{
nDims = D3DXVECTOR3(dims.x * multiplier, dims.y * multiplier, dims.z * multiplier);
pModel->SetDims(&nDims);
break;
}
else
{
pModel->SetDims(&nDims);
break;
}
}
}
else
{
if (hObj->IsNodeVisible(modelNode->m_NodeIndex()))
{
nDims = D3DXVECTOR3(dims.x * multiplier, dims.y * multiplier, dims.z * multiplier);
pModel->SetDims(&nDims);
}
else
{
pModel->SetDims(&nDims);
}
}
}
}
}
}
bute_id += 1;
}
}
catch (...) {}
}
void CCharacterHitBox::EnlargeDimsBody(float multiplier, int ModelType)
{
try
{
if (!this->IsValidBaseAddress())
return;
auto pModel = this->hModel();
if (pModel == NULL || !pModel->IsValidBaseAddress())
return;
auto objData = pModel->GetObjectUserData();
if (objData == NULL || !objData->IsValidBaseAddress())
return;
if (!objData->IsPlayer())
return;
int bute_id = ModelNodeInfo_t::GetFirstIdOfModelType(ModelType);
if (bute_id < 0)
return;
auto hd_node = this->GetHighestDamageNodeByButeId(bute_id);
if (hd_node == NULL || !hd_node->IsValidBaseAddress())
return;
for (auto pCur = this->m_NodeRadiusList_(); pCur != this->pHead(); pCur = pCur->GetNext())
{
if (pCur == NULL || !pCur->IsValidBaseAddress())
break;
auto pNRS = pCur->m_pCurGetItemLink();
if (pNRS && pNRS->IsValidBaseAddress())
{
/*
1 0 M-bone Head
2 0 M-bone Head
3 0 M-bone Neck
4 0 M-bone L Clavicle
5 0 M-bone R Clavicle
6 0 M-bone Spine1
7 0 M-bone Spine1
8 0 M-bone Spine
9 0 M-bone Spine
10 0 M-bone L UpperArm
11 0 M-bone R UpperArm
12 0 M-bone L ForeArm
13 0 M-bone R ForeArm
14 0 M-bone L ForeArm
15 0 M-bone R ForeArm
16 0 M-bone L Hand
17 0 M-bone R Hand
18 0 M-bone pelvis
19 0 M-bone L Thigh
20 0 M-bone L Calf
21 0 M-bone L Calf
22 0 M-bone L Calf
23 0 M-bone L Foot
24 0 M-bone L Toe0
25 0 M-bone R Thigh
26 0 M-bone R Calf
27 0 M-bone R Calf
28 0 M-bone R Calf
29 0 M-bone R Foot
30 0 M-bone R Toe0
*/
if (bute_id >= 3 && bute_id <= 16)
{
auto buteMgr = ModelNodeInfo_t::GetModelNodeById(bute_id);
if (buteMgr && buteMgr->IsValidBaseAddress())
{
auto pModel = pNRS->hModel();
if (pModel && pModel->IsValidBaseAddress())
{
auto modelNode = this->GetNode(bute_id);
if (modelNode != NULL && modelNode->IsValidBaseAddress())
{
auto dims = buteMgr->Dimesion();
D3DXVECTOR3 nDims = D3DXVECTOR3(dims.x * multiplier, dims.y * multiplier, dims.z * multiplier);
pModel->SetDims(&nDims);
}
}
}
}
}
bute_id += 1;
}
}
catch (...) {}
}
void CCharacterHitBox::EnlargeDimsBodyVisible(float multiplier, int ModelType)
{
try
{
if (!this->IsValidBaseAddress())
return;
auto hObj = this->hModel();
if (hObj == NULL || !hObj->IsValidBaseAddress())
return;
if (!hObj->IsModel())
return;
int bute_id = ModelNodeInfo_t::GetFirstIdOfModelType(ModelType);
if (bute_id < 0)
return;
auto hd_node = this->GetHighestDamageNodeByButeId(bute_id);
if (hd_node == NULL || !hd_node->IsValidBaseAddress())
return;
for (auto pCur = this->m_NodeRadiusList_(); pCur != this->pHead(); pCur = pCur->GetNext())
{
if (pCur == NULL || !pCur->IsValidBaseAddress())
break;
auto pNRS = pCur->m_pCurGetItemLink();
if (pNRS && pNRS->IsValidBaseAddress())
{
if (bute_id >= 3 && bute_id <= 16)
{
auto buteMgr = ModelNodeInfo_t::GetModelNodeById(bute_id);
if (buteMgr && buteMgr->IsValidBaseAddress())
{
auto pModel = pNRS->hModel();
if (pModel && pModel->IsValidBaseAddress())
{
auto modelNode = this->GetNode(bute_id);
if (modelNode != NULL && modelNode->IsValidBaseAddress())
{
auto dims = buteMgr->Dimesion();
D3DXVECTOR3 nDims = dims;
if (hObj->IsNodeVisible(modelNode->m_NodeIndex()))
{
nDims = D3DXVECTOR3(dims.x * multiplier, dims.y * multiplier, dims.z * multiplier);
pModel->SetDims(&nDims);
}
else
{
pModel->SetDims(&nDims);
}
}
}
}
}
}
bute_id += 1;
}
}
catch (...) {}
}
my method bypass in x86 didn't try in x64 , you can try
Code:
void BypassSuperkill()
{
if (!isGameReadyForHookAnger())
return;
if (!Anger->FYT) return;
return;
if (!Anger->CalledH()->IsD)
return;
;
if (DoItOnce2 == true)
{
DWORD Basic = *(DWORD*)(CShell + ModlNod);
if (Basic != NULL)
{
for (int i = 0; i < BasicSizeSK; i++)
{
DWORD BasicLoop = (DWORD)(Basic + i * BasicCountSK);
if (BasicLoop)
{
//================Client 28_5===============//
BackupBasic[i] = new BasicPlayerSize;
memcpy(BackupBasic[i], (PVOID)(BasicLoop), sizeof(BasicSize));
}
}
}
if (CShell != NULL)
{
DWORD Client28_x = (DWORD)(CShell + 0x2F1006);
DetourCreateCallsE8((PBYTE)Client25_x, (DWORD)GetBasicPlayerByIndex, 5);
}
DoItOnce2 = false;
}
}
Code:
48 8D 15 ? ? ? ? 48 8D 4C 24 ? E8 ? ? ? ? 85 C0 78 22 03 C6 48 63 C8 48 FF C1 48 C1 E1 05 48 8B 44 24 ? 0F 10 4C 01 ? 0F 11 4C 24 ? 48 8B 44 24 ? EB 02 33 C0 89 43 10 8B D7 48 8D 4C 24 ? E8 ? ? ? ? 8B F0 83 F8 FF 74 37 48 8D 15 ? ? ? ? 48 8D 4C 24 ? E8 ? ? ? ? 85 C0 78 22 03 C6 48 63 C8 48 FF C1 48 C1 E1 05 48 8B 44 24 ? 0F 10 4C 01 ? 0F 11 4C 24 ? 48 8B 54 24 ? EB 02 33 D2 48 8D 4B 18 E8 ? ? ? ? 8B D7 48 8D 4C 24 ? E8 ? ? ? ? 8B F0 83 F8 FF 74 32
Similar Threads
CrossFire Latin America / Brazil Hack Source CodeComo encontro o endereço do superkill? 5 CrossFire Latin America / Brazil Hack Source CodeComo pegar address do SuperKillZO 6 CrossFire Latin America / Brazil Hack Source CodeSuperKill Address + AjudaZO 12 CrossFire Latin America / Brazil Hack Source CodeSuperKill Versão Assembly
23 Combat Arms Hack Coding / Programming / Source CodeCharacterHitBox Strut/ Info on Object.LTO
2
