File :: ModelNode.h

Code:
#pragma once
#include "LTVector.h"

#define	MAX_NODE 1328

namespace Crossfire
{
	struct ModelNode
	{
		ModelNode() {}
	private:	BYTE			_0x00[36];
	public:	FLOAT		DamageFactor;
			LTVECTOR3	RelativePos;
			INT32		Priority;
			LTVECTOR3	Dimension;
			LTVECTOR4	ObjectColor;
			INT32		ModelNodeType;
	private:	BYTE			_0x58[68];
	};

	namespace ModelNodeFlags
	{
		enum ResetFlag
		{
			DamageFactor = (1 << 0),
			RelativePos = (1 << 1),
			Priority = (1 << 2),
			Dimension = (1 << 3),
			ObjectColor = (1 << 4),
			ModelNodeType = (1 << 5),
			ALL = 63
		};
		enum NodeType
		{
			Normal,
			HeadshotGold,
			HeadshotSilver
		};
	}

	class ModelNodeMgr
	{
	public:
		ModelNodeMgr() {}
		ModelNodeMgr(DWORD Ptr2) { 
			pModelNodeMgr = (PDWORD)(Ptr2); 
			BackupNode = new ModelNode[MAX_NODE];
		}
		virtual ~ModelNodeMgr() 
		{
			delete[] BackupNode;
		}

		virtual bool Initialize()
		{
			if (!isInit)
			{
				if (*pModelNodeMgr == NULL) return false;
				memcpy((void*)BackupNode, (void*)(*pModelNodeMgr), sizeof(ModelNode) * MAX_NODE);
				Mgr = (Manager *)(*pModelNodeMgr);
				isInit = true;
			}
			return isInit;
		}

		virtual void Reset(ModelNodeFlags::ResetModelNodeFlag Flags)
		{
			for (int i = 0; i < MAX_NODE; i++)
			{
				if (Flags & ModelNodeFlags::DamageFactor) 
					Mgr->ReferenceNode[i].DamageFactor = BackupNode[i].DamageFactor;
				if (Flags & ModelNodeFlags::RelativePos) 
					Mgr->ReferenceNode[i].RelativePos = BackupNode[i].RelativePos;
				if (Flags & ModelNodeFlags::Priority) 
					Mgr->ReferenceNode[i].Priority = BackupNode[i].Priority;
				if (Flags & ModelNodeFlags::Dimension) 
					Mgr->ReferenceNode[i].Dimension = BackupNode[i].Dimension;
				if (Flags & ModelNodeFlags::ObjectColor) 
					Mgr->ReferenceNode[i].ObjectColor = BackupNode[i].ObjectColor;
				if (Flags & ModelNodeFlags::ModelNodeType) 
					Mgr->ReferenceNode[i].ModelNodeType = BackupNode[i].ModelNodeType;
			}
		}

		virtual ModelNode& GetNode(int index)
		{
			return Mgr->ReferenceNode[index - 1];
		}

	private:
		bool isInit;
		DWORD *			pModelNodeMgr;
		ModelNode *		BackupNode;
		struct Manager { ModelNode ReferenceNode[MAX_NODE]; }*Mgr;
	};
}
File :: LTVector.h

Code:
#pragma once
#include <Windows.h>
#include <math.h>

/*--------------------------------------------------
Library : Lithtech Vector
File	: LTVector.h
Author  : Triệu Đình Quang (MPGH :: ZephyrusX)
Date    : 14/06/2018
----------------------------------------------------*/

namespace Crossfire
{
	struct LTVECTOR3
	{
		FLOAT x, y, z;

		LTVECTOR3(FLOAT radius = 0) { this->x = this->y = this->z = radius; }
		LTVECTOR3(FLOAT X, FLOAT Y, FLOAT Z) : x(X), y(Y), z(Z) {}
		~LTVECTOR3() { }

		LTVECTOR3 operator +(LTVECTOR3 X)
		{
			return LTVECTOR3(this->x + X.x, this->y + X.y, this->z + X.z);
		}
		LTVECTOR3 operator -(LTVECTOR3 X)
		{
			return LTVECTOR3(this->x - X.x, this->y - X.y, this->z - X.z);
		}
		LTVECTOR3 operator *(FLOAT X)
		{
			return LTVECTOR3(this->x * X, this->y * X, this->z * X);
		}
		LTVECTOR3 operator /(FLOAT X)
		{
			return LTVECTOR3(this->x / X, this->y / X, this->z / X);
		}

		LTVECTOR3& operator +=(LTVECTOR3 X)
		{
			return LTVECTOR3(this->x + X.x, this->y + X.y, this->z + X.z);
		}
		LTVECTOR3& operator -=(LTVECTOR3 X)
		{
			return LTVECTOR3(this->x - X.x, this->y - X.y, this->z - X.z);
		}
		LTVECTOR3& operator *=(FLOAT X)
		{
			return LTVECTOR3(this->x * X, this->y * X, this->z * X);
		}
		LTVECTOR3& operator /=(FLOAT X)
		{
			return LTVECTOR3(this->x / X, this->y / X, this->z / X);
		}

		FLOAT operator *=(LTVECTOR3 X)
		{
			return (this->x * X.x + this->y * X.y + this->z * X.z);
		}

		BOOL operator ==(LTVECTOR3 X)
		{
			if (this->x == X.x && this->y == X.y && this->z == X.z)
				return true;
			return false;
		}
		BOOL operator !=(LTVECTOR3 X)
		{
			return !(*this == X);
		}

		DOUBLE Distance(LTVECTOR3 X)
		{
			return (DOUBLE)sqrt( (this->x - X.x) * (this->x - X.x) + (this->y - X.y) * (this->y - X.y) + (this->z - X.z) * (this->z - X.z));
		}
	};

	struct LTVECTOR4
	{
		FLOAT x, y, z, t;

		LTVECTOR4(FLOAT value = 0) { this->x = this->y = this->z = this->t = value; }
		LTVECTOR4(FLOAT X, FLOAT Y, FLOAT Z, FLOAT T) : x(X), y(Y), z(Z), t(T) {}
		~LTVECTOR4() { }

		LTVECTOR4 operator +(LTVECTOR4 X)
		{
			return LTVECTOR4(this->x + X.x, this->y + X.y, this->z + X.z, this->t + X.t);
		}
		LTVECTOR4 operator -(LTVECTOR4 X)
		{
			return LTVECTOR4(this->x - X.x, this->y - X.y, this->z - X.z, this->t - X.t);
		}
		LTVECTOR4 operator *(FLOAT X)
		{
			return LTVECTOR4(this->x * X, this->y * X, this->z * X, this->t * X);
		}
		LTVECTOR4 operator /(FLOAT X)
		{
			return LTVECTOR4(this->x / X, this->y / X, this->z / X, this->t / X);
		}

		LTVECTOR4& operator +=(LTVECTOR4 X)
		{
			return LTVECTOR4(this->x + X.x, this->y + X.y, this->z + X.z, this->t + X.t);
		}
		LTVECTOR4& operator -=(LTVECTOR4 X)
		{
			return LTVECTOR4(this->x - X.x, this->y - X.y, this->z - X.z, this->t - X.t);
		}
		LTVECTOR4& operator *=(FLOAT X)
		{
			return LTVECTOR4(this->x * X, this->y * X, this->z * X, this->t * X);
		}
		LTVECTOR4& operator /=(FLOAT X)
		{
			return LTVECTOR4(this->x / X, this->y / X, this->z / X, this->t / X);
		}

		BOOL operator ==(LTVECTOR4 X)
		{
			if (this->x == X.x && this->y == X.y && this->z == X.z && this->t == X.t)
				return true;
			return false;
		}
		BOOL operator !=(LTVECTOR4 X)
		{
			return !(*this == X);
		}
	};
}
Usage:
Code:
#define __$aCLTClientShell  0x0      //AOB::8B 0D ?? ?? ?? ?? 50 8D 44 24 ?? 50 81 C1 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B ?? 85

DWORD pModelNode = NULL;
BOOL * InGame = (BOOL *)(CShell + __$aCLTClientShell + 0x74);
pModelNode = Crossfire::FindPattern(CShell, (PBYTE)"\x8B\x15\x00\x00\x00\x00\x83\xC4\x20\x33\xED", "00????00000").Base;
if (pModelNode) pModelNode = *(DWORD*)(pModelNode + 2);
if (pModelNode != NULL) {
	Crossfire::ModelNodeMgr * pModelNodeMgr = new Crossfire::ModelNodeMgr(pModelNode);
	if (pModelNodeMgr.Initialize())
	{
		if (*InGame)
		{
			// Radius Kill
			pModelNodeMgr.GetNode(1/*Node index (1 for head)*/).Dimension = Crossfire::LTVECTOR3(64.0f);
			// Always Headshot
			for (int i = 1; i < 32 ; i++)
				pModelNodeMgr.GetNode(i).ModelNodeType = Crossfire::ModelNodeFlags::HeadshotGold;
		}
		else pModelNodeMgr.Reset(Crossfire::ModelNodeFlags::ALL);
	}
}