[Source]IntersectAndPenetrateSegment

Posts 1–15 of 32 · Page 1 of 3
[Source]IntersectAndPenetrateSegment
EDIT:"Depois de uma passagem por um lugar que eu nem conto pq nao acreditariam. Na Source vão saber que me passou.

Aviso essa source tem na net, mas tem diferenças, a que tem na net não está atualizada.": EDIT.

Há um tempo atras todos falavam q eu era nubb, principalmente o Park. Vamos ver oque falam agora. Mais qualquer chingamento podem saber entra por um lado e sai por outro, estou postando isso para ajudar um pessoal desesperado não para ajudar esse povo que não sabe usar isso.

Nem tente falar que isso nao funciona já digo isso funciona. E tem a ver com:
IntersectAndPenetrateSegment


Acho que isso pode ajudar muita gente que estava se queimando uma semana atras. Descubram para que serve, não falarei para leechers copiarem.



#include "engine.h"

cEngine* engine = NULL;

cEngine::cEngine( void )
{
pClientShellBase = NULL;
pGameClientShell = NULL;
pClientInfoMgr = NULL;
pPlayerManager = NULL;
pLTDrawPrim = NULL;
pLTClient = NULL;
pLTModel = NULL;
pLTBase = NULL;
pLocal = NULL;

pWarningFont = NULL;
pSmallFont = NULL;
pMenuFont = NULL;

dwClientFxEntry = (DWORD)GetModuleHandle( STRING_CLIENTFXDOTFXD );
}

void cEngine::InitEnginePointers( void )
{
#ifdef _DEBUG_
tools->add_log( STRING_LOGFILE, "\nIniting Ptrs!->LoL( $$$$ )" );

pClientShellBase = (cLTClientShellBase*)ADDR_L***BASE;

if( ValidPointer( pClientShellBase ) )
{
pLTModel = (cLTModel*)pClientShellBase->ILTModel;
tools->add_log( STRING_LOGFILE, "cLTModel[ 0x%x ]", (DWORD)pLTModel );

pLTDrawPrim = *(cLTDrawPrim**)pClientShellBase->ILTDrawPrim;
tools->add_log( STRING_LOGFILE, "DrawPrim1 0x%x DrawPrim2 0x%x", (DWORD)pLTDrawPrim, (DWORD)&pLTDrawPrim );

pLTBase = (cLTBase*)pClientShellBase->ILTBase;
tools->add_log( STRING_LOGFILE, "cLTBase[ 0x%x ]", (DWORD)pLTBase );

pGameClientShell = *(cGameClientShell**)ADDR_GCS;
tools->add_log( STRING_LOGFILE, "Game Client Shell[ 0x%x ]", (DWORD)pGameClientShell );
tools->add_log( STRING_LOGFILE, "w2s 0x%x", (DWORD)&pLTDrawPrim->WorldToScreen );

if( ValidPointer( pLTBase ) && ValidPointer( pGameClientShell ) )
{
pClientInfoMgr = (cClientInfoMgr*)pGameClientShell->GetClientInfoMgr();
tools->add_log( STRING_LOGFILE, "ClientInfoMgr[ 0x%x ]", (DWORD)pClientInfoMgr );

pPlayerManager = (cPlayerMgr*)pGameClientShell->GetPlayerManager();
tools->add_log( STRING_LOGFILE, "PlayerManager[ 0x%x ]", (DWORD)pPlayerManager );

pLTClient = (cLTClient*)pLTBase->ILTClient;
tools->add_log( STRING_LOGFILE, "cLTClient[ 0x%x ]", (DWORD)pLTClient );

pLocal = (LocalInfo*)ADDR_LOCALPTR;
tools->add_log( STRING_LOGFILE, "Local[ 0x%x ]", (DWORD)pLocal );
}
}

#else
pClientShellBase = (cLTClientShellBase*)ADDR_L***BASE;

if( ValidPointer( pClientShellBase ) )
{
pLTModel = (cLTModel*)pClientShellBase->ILTModel;

//pLTDrawPrim = *(cLTDrawPrim**)pClientShellBase->ILTDrawPrim;

pLTBase = (cLTBase*)pClientShellBase->ILTBase;
pGameClientShell = *(cGameClientShell**)ADDR_GCS;

if( ValidPointer( pLTBase ) && ValidPointer( pGameClientShell ) )
{
pClientInfoMgr = (cClientInfoMgr*)pGameClientShell->GetClientInfoMgr();
pPlayerManager = (cPlayerMgr*)pGameClientShell->GetPlayerManager();
pLTClient = (cLTClient*)pLTBase->ILTClient;
pLocal = (LocalInfo*)ADDR_LOCALPTR;
}
}
#endif
}

void cEngine::InitFonts( void )
{
pSmallFont = (cFont*)BuildFontByFontIndex( 24, 12 );
pWarningFont = (cFont*)BuildFontByFontIndex( 15, 25 );
pMenuFont = (cFont*)BuildFontByFontIndex( 25, 13 );

#ifdef _DEBUG_
tools->add_log( STRING_LOGFILE, STRING_DEBUG_FONTINIT );
#endif
}

int cEngine::GetFontHandle( int index )
{
void* vGetFontHandle = (void*)ADDR_GETFONTHAND;
DWORD dwECX = *(DWORD*)ADDR_FONTECX;

__asm
{
push 0
push index
mov ecx, dwECX
call [vGetFontHandle]
}
}

DWORD cEngine::BuildFontByFontIndex( int index, int FontSize )
{
void* vBuildFont = (void*)ADDR_BUILDFONT;
void* dwFill = (void*)ADDR_FILLFONT;
int FontHandle = GetFontHandle( index );
DWORD dwFontAddr = 0;
BYTE* FontBuffer = new BYTE[0x228];

__asm
{
mov ecx, FontBuffer
call [dwFill]
mov dwFontAddr, eax
mov ecx, eax
push 0
push 0
push 0
push 0
push FontSize
push FontHandle
push 0
push 0
push 0
call [vBuildFont]
}
return dwFontAddr;
}

void cEngine::RenderString( cFont* Renderer, int x, int y, std::wstring text, DWORD color )
{
if( Renderer )
{
Renderer->SetText( (unsigned short*)text.c_str(), 1 );
Renderer->SetPos( x, y );
Renderer->SetColor( color, color, color, (int)-1 );
Renderer->Render();
}
}

bool __cdecl cEngine::IsVisible( D3DXVECTOR3 Point )
{
IntersectQuery iQuery;
IntersectInfo iInfo;

memset( &iQuery, 0, sizeof(iQuery) );

iQuery.Start = esp->local.CameraPos;
iQuery.End = Point;

return !engine->GetLTBase()->IntersectSegment( iQuery, &iInfo );
}

bool MyFilterObjects( int* hObj, void* pUser )
{
cSFXMgr* SFXMgr = engine->GetGameClientShell()->GetSFXMgr();

if( engine->ValidPointer( SFXMgr ) )
{
for( int i = 0; i < SFXMgr->SFXList[SFX_CHARACTER].Num; i++ )
{
cCharacterFX* fx = (cCharacterFX*)SFXMgr->SFXList[SFX_CHARACTER].List[i];

if( engine->ValidPointer( fx ) && engine->ValidPointer( fx->Object ) )
if( hObj == fx->hHitbox )
return true;
}
}
return false;
}

bool IntersectAndPenetrateSegment( IntersectQuery* iQuery, IntersectInfo* qInfo )
{
if( esp->local.iGameMode != 5 )
{
for( int i = 0; i <= 24; i++ )
{
if( esp->bValidObject( i ) && esp->bValidCords( i ) && !esp->Players[i].bIsDead )
{
if( esp->Players[i].Charector->TeamID != esp->local.iTeam )
{
if( esp->local.iTeam != esp->Players[i].Charector->TeamID )
{
iQuery->Start = esp->Players[i].AimTransform.Pos + D3DXVECTOR3( 0.0f, 50.0f, 0.0f );
iQuery->End = esp->Players[i].AimTransform.Pos - D3DXVECTOR3( 0.0f, 50.0f, 0.0f );
iQuery->FilterFn = MyFilterObjects;

bool Result = engine->GetLTBase()->IntersectSegment( *iQuery, qInfo );

if( Result )
{
qInfo->hObjImpact = esp->Players[i].SFXOBJ->hHitbox;
qInfo->vImpactPos = esp->Players[i].AimTransform.Pos;
}
return Result;
}
}
}
}
}
else
{
cSFXMgr* SFXMgr = engine->GetGameClientShell()->GetSFXMgr();

if( engine->ValidPointer( SFXMgr ) )
{
for( int i = 0; i < SFXMgr->SFXList[SFX_CHARACTER].Num; i++ )
{
cCharacterFX* NPC = (cCharacterFX*)SFXMgr->SFXList[SFX_CHARACTER].List[i];

if( engine->ValidPointer( NPC ) && engine->ValidPointer( NPC->Object ) )
{
if( esp->local.Object == NPC->Object )
continue;

int Type = NPC->IsPlayer;

if( Type != 0 )
continue;

Transform HeadTransform;
unsigned int AimSpot;

AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 8, &HeadTransform, true );
HeadTransform.Pos.y += 7.0f;

if( AimSpot != 0 )
continue;

iQuery->Start = HeadTransform.Pos + D3DXVECTOR3( 0.0f, 50.0f, 0.0f );
iQuery->End = HeadTransform.Pos - D3DXVECTOR3( 0.0f, 50.0f, 0.0f );
iQuery->FilterFn = MyFilterObjects;

bool Result = engine->GetLTBase()->IntersectSegment( *iQuery, qInfo );

if( Result )
{
qInfo->hObjImpact = NPC->hHitbox;
qInfo->vImpactPos = HeadTransform.Pos;
}
return Result;
}
}
}
}

return false;
}

bool cEngine::WorldToScreen( D3DXVECTOR3 Pos, D3DXVECTOR3 *Screen )
{
float x = Pos.x;
float y = Pos.y;
float z = Pos.z;

D3DXVECTOR3 Unk;

_asm
{
mov ecx, dword ptr ds:[ADDR_DRAWPRIM]
lea eax, Unk
push eax
push Screen
push z
push y
push x
mov eax, ADDR_W2S
call eax
}

return( Screen->z < 1.0f );
}

int cEngine::GetConsoleInt( char* cmd, int value )
{
_asm
{
push value
push cmd
mov eax, ADDR_GETCONSOLEINT
call eax
add esp, 8
}
}

void cEngine::SetLocalPlayerPosition( D3DXVECTOR3 Pos )
{
DWORD dwClass = *(DWORD*)( dwClientFxEntry + ADDR_CLIENTFX );

if( dwClass == NULL )
return;

*(float*)( dwClass + 0xC8 ) = Pos.x;
*(float*)( dwClass + 0xCC ) = Pos.y;
*(float*)( dwClass + 0xD0 ) = Pos.z;
}

void cEngine::SetCvar( DWORD CVarBase, float Value )
{
*(float*)( CVarBase + 0x48 ) = Value;
}

bool cEngine::ValidGamePointers( void )
{
if( ValidPointer( pClientShellBase )
&& ValidPointer( pGameClientShell )
&& ValidPointer( pLTModel )
&& ValidPointer( pLTBase )
&& ValidPointer( pLTClient )
&& ValidPointer( pClientInfoMgr )

#ifdef _DEBUG
&& ValidPointer( pLTDrawPrim )
#endif

&& ValidPointer( pPlayerManager )
&& ValidPointer( pLocal ) )
return true;

return false;
}
Algumas coisas tem que transformar para Br outras estão fora de ordem, então boa sorte ao tentar entender.

E eu falei que ia conseguir
os Leechers Não Iriam Conseguir Copiar eles nem entendem o que tem no code '-'
Completando, na Source tem um o simbolo % nos address no lugar você deverá colocar os address do server que você joga NA, BR, etc.


Só um aviso essa Base, não é facil de intender, você tem que ler ela, e corrigir alguns bugs, mais é confiavel.

Postei isso só pq o @soad tava quase chorando a 2 Semanas atras e quero ver o @jack987 tentar entender e copiar ela.
O que ele falo do hack fodastico dele?
Quote Originally Posted by Seppuku View Post
O que ele falo do hack fodastico dele?
isso mesmo
Créditos : Gellin
Tirado de : Base VIP Gellin
Não funciona porque : tem includes e classes diversas no código, e o que foi postado é insuficiente.
pra que isso? e de comer?
Quote Originally Posted by ChaosMagician View Post
Créditos : Gellin
Tirado de : Base VIP Gellin
Não funciona porque : tem includes e classes diversas no código, e o que foi postado é insuficiente.
na verdade nao foi do gellin, eu juro, só se for igual, é do de.BUG isso

bem que me falaram que não iam intender, como eu disse. Se você alterar isso ira funcionar.
Só se o de.Bug pegou do gellin (com engenharia reversa ) ou vice-versa.
Code:
tools->add_log( STRING_LOGFILE, "cLTClient[ 0x%x ]", (DWORD)pLTClient );
tools é uma classe, que não está declarada, e por isso reforço mais a idéia de que está incompleto, não é questão de alterar ou não, é questão de que nao vai funcionar mesmo
Tudo isso que você postou é da Base Very Important Person do Gellin, que foi roubada e postada na NET
Sim, que por acaso tentarei atualizar pra BR, depois de terminar meu curso de asm e c++
IntersectAndPenetrateSegment

Sei uma função que usa isso
Quote Originally Posted by Capevaldo View Post
IntersectAndPenetrateSegment

Sei uma função que usa isso
Eu tbm.. é usado para se fazer filhos..
Quote Originally Posted by Alessandro10 View Post


Eu tbm.. é usado para se fazer filhos..
Principalmente a parte do "Penetrate"
Quote Originally Posted by Capevaldo View Post
IntersectAndPenetrateSegment

Sei uma função que usa isso
Remote. Kill.
Posts 1–15 of 32 · Page 1 of 3
This thread is closed for replies.

Tags for this Thread

None

Need help?