ModelInstance / LTObject / hObj

Posts 1–5 of 5 · Page 1 of 1
ModelInstance / LTObject / hObj
Has anyone encountered missing LTObjects in ZA Zombies? It's kinda irritating that there are zombies I can't draw.

I'm using ObjMgr to get LTObjects of zombies in ZA mode but there are zombies that I can't draw (usually 2 or more).
I tried to use GetLTObjectFn(objmgr, index) but still, same results.
I also tried to remove all the filters such as objectType == zombie, isdead but there are still missing objects.

//UPDATE

I found out that those za zombies I can't draw doesn't have objectFX/CharFX/CharHitbox causing the loop to skip because the return is 0 and does not match with objecttype zombie.

any other way to tell if the LTObject is for za zombie (or at least can receive damage) without reaching objectType?
Quote Originally Posted by akbargain View Post
Has anyone encountered missing LTObjects in ZA Zombies? It's kinda irritating that there are zombies I can't draw.

I'm using ObjMgr to get LTObjects of zombies in ZA mode but there are zombies that I can't draw (usually 2 or more).
I tried to use GetLTObjectFn(objmgr, index) but still, same results.
I also tried to remove all the filters such as objectType == zombie, isdead but there are still missing objects.

//UPDATE

I found out that those za zombies I can't draw doesn't have objectFX/CharFX/CharHitbox causing the loop to skip because the return is 0 and does not match with objecttype zombie.

any other way to tell if the LTObject is for za zombie (or at least can receive damage) without reaching objectType?
as u have mentioned some ai's don't even have char fx
there is a class /list in AiClientObjectManager access all za objects even tho it has every thing about AI's like the gravity , speed , hp and the count as well u can simply say its the major of AI
Code:
CLTClientShell->AIClientObjectManager(CurrentOffset 0x49B90)
//You can use virtual function to get the CharacFX of AI by Index
class AIClientObjectManager
{
public:
	char pad_0000[16]; //0x0000
	std::map<int, CharacFX*, std::less<int>, std::allocator<std::pair<int const, CharacFX*> > > m_aiObjectList; //0x0010
}
// Simple way, you can do otherwise. 
void CESP_AI::Init(){
    std::map<int, CharacFX*>::iterator it = _ltclientshell->GetAIObjectList()->begin(); 
    for (it = _ltclientshell->GetAIObjectList()->begin(); it != _ltclientshell->GetAIObjectList()->end(); it++)
    {
          int index = it->first;
          CharacFX*pAIClient = (CharacFX*)it->second;
        if (pAIClient ) {
            CESP_PvP::get()->DrawSkeleton(pAIObjectBase->hObject(), D3DCOLOR_ARGB(255, 255, 0, 0));
            Console::get()->PlayerLog.WriteLog("%d - GetAIObjectList[ %d, %p ] => m_nHP: %d - %d", pAIClient->GetAIObjectIndex(), index, pAIClient , pAIClient->GetHP(), pAIClient->GetFullHP());
        }
    }
}
Code:
HOBJECT CharacFX::hObject()
{
	if (!this)
		return NULL;

	if ((DWORD)this < 0x400000)
		return NULL;

	return *(HOBJECT*)((uintptr_t)this + 0x00D0);
}
unsigned int CharacFX::GetFullHP()
{

	if (!this)
		return NULL;

	return *(unsigned int*)((uintptr_t)this + 0x18938);
}
unsigned int CharacFX::GetHP()
{

	if (!this)
		return NULL;

	return *(unsigned int*)((uintptr_t)this + 0x1893C);
}
__int32 CharacFX::GetAIObjectIndex()
{

	if (!this)
		return NULL;

	return *(__int32*)((uintptr_t)this + 0x17BEC);
}
Good Luck


Thank you for the info!

- - - Updated - - -

Quote Originally Posted by dreek1 View Post
Code:
CLTClientShell->AIClientObjectManager(CurrentOffset 0x49B90)
//You can use virtual function to get the CharacFX of AI by Index
class AIClientObjectManager
{
public:
	char pad_0000[16]; //0x0000
	std::map<int, CharacFX*, std::less<int>, std::allocator<std::pair<int const, CharacFX*> > > m_aiObjectList; //0x0010
}
// Simple way, you can do otherwise. 
void CESP_AI::Init(){
    std::map<int, CharacFX*>::iterator it = _ltclientshell->GetAIObjectList()->begin(); 
    for (it = _ltclientshell->GetAIObjectList()->begin(); it != _ltclientshell->GetAIObjectList()->end(); it++)
    {
          int index = it->first;
          CharacFX*pAIClient = (CharacFX*)it->second;
        if (pAIClient ) {
            CESP_PvP::get()->DrawSkeleton(pAIObjectBase->hObject(), D3DCOLOR_ARGB(255, 255, 0, 0));
            Console::get()->PlayerLog.WriteLog("%d - GetAIObjectList[ %d, %p ] => m_nHP: %d - %d", pAIClient->GetAIObjectIndex(), index, pAIClient , pAIClient->GetHP(), pAIClient->GetFullHP());
        }
    }
}
Code:
HOBJECT CharacFX::hObject()
{
	if (!this)
		return NULL;

	if ((DWORD)this < 0x400000)
		return NULL;

	return *(HOBJECT*)((uintptr_t)this + 0x00D0);
}
unsigned int CharacFX::GetFullHP()
{

	if (!this)
		return NULL;

	return *(unsigned int*)((uintptr_t)this + 0x18938);
}
unsigned int CharacFX::GetHP()
{

	if (!this)
		return NULL;

	return *(unsigned int*)((uintptr_t)this + 0x1893C);
}
__int32 CharacFX::GetAIObjectIndex()
{

	if (!this)
		return NULL;

	return *(__int32*)((uintptr_t)this + 0x17BEC);
}
Good Luck


btw is that x32? niceeeeeeee
Its for x64 but the logic Its same for x86
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?