Originally Posted by
Twack
World2Screen (again lol)
Left side is world position of clients and right side is corresponding screen coordinate from W2S. Something is pretty wrong with this
This is my W2S:
I comment some of the code out so it always returns true so i can see what the screen coords are.
The pDevice in pRenderer is from Present. Maybe i need to call GetTransform in EndScene?
yeah thx for your w2s sharing now i found my mistake.. i made it like this >
Code:
bool WorldToScreen(LPDIRECT3DDEVICE9 pDev, PlayerInfo* pPlayer, D3DXVECTOR3* Pos)
{
D3DXVECTOR3 vWorld = pPlayer->Object->test1;
D3DVIEWPORT9 viewPort = {0};
D3DXMATRIX projection, view, world;
pDev->GetTransform(D3DTS_VIEW, &view);
pDev->GetTransform(D3DTS_PROJECTION, &projection);
pDev->GetTransform(D3DTS_WORLD, &world);
pDev->GetViewport(&viewPort);
D3DXVec3Project(Pos, &vWorld, &viewPort, &projection, &view, &world);
if(Pos->z < 1)
{
return true;
}
return false;
}
it was working while using detouring now i need new pDevice (i hooked in another way)
---------- Post added at 12:46 PM ---------- Previous post was at 12:44 PM ----------
Originally Posted by
~FALLEN~
you dont need the object class reversed, just the pointer to it ( which is in the player class ) & to update the class you're going to need the pointer
No thats not where it is.
yeah i know the pointer to it but now how to find the structs for esp?
i have some old crap like that >
Code:
struct _Object
{
public:
char _0x0000[4];
D3DXVECTOR3 Position;
D3DXVECTOR3 test0;
char _0x001C[192];
D3DXVECTOR3 test1;
char _0x00E8[856];
};
struct PlayerInfo
{
public:
__int32 Get;
_Object* Object;
BYTE ClientID;
__int8 Team;
char Name[12];
__int16 check;
__int8 Alive;
__int8 check2;
__int32 PlayerSlotTeam;
__int32 Tester;
bool Has_C4;
__int32 State;
__int32 Rank;
__int32 Tester2;
__int32 CheckAgain1;
__int8 iHealth;
__int8 iHealth2;
};