❓ Spread Crosshair
I'd like to make a simple circle crosshair that expands by the spread/inaccuracy of the weapon. How would I make this possible? How would I calculate the radius of the circle?
Any help is appreciated
Any help is appreciated
RECT View = Draw::Viewport(); int x = View.right / 2; int y = View.bottom / 2; float inac = pWeapon->GetInaccuracy(); float radius = inac * 500; Draw::Circle(x, y, spread, 50, Color(255, 0, 0, 255));
template< typename Function > Function call_index(PVOID Base, DWORD Index)
{
PDWORD* VTablePointer = (PDWORD*)Base;
PDWORD VTableFunctionBase = *VTablePointer; //crashes here
DWORD Address = VTableFunctionBase[Index];
return (Function)(Address );
}
float GetInaccuracy()
{
typedef float(__thiscall* oInaccuracy)(PVOID);
return call_index< oInaccuracy >(this, 483)(this);
}
