96neko (01-25-2019),alisonbbzz (02-10-2019),awdacwadc (04-07-2019),BlueeD (01-25-2019),ItsMeiWraz (02-24-2019),malfac009 (01-25-2019),TheG2ek (09-02-2019),TheSnKGaming (02-02-2019),Trojan2567 (01-25-2019),vaisefud3 (01-25-2019),_Mike92 (01-25-2019)
What I've done:
-Made it rescale to fit character size.
You should no longer experience the bug where it doesn't fit properly, **EVEN** when crouched.
Enjoy.
Credits:Code:__forceinline void RenderBoundingBox(LPDIRECT3DDEVICE9 D3DDevice, CFPlayer* Player, D3DCOLOR ESPColor) { PlayerObject* ThisObject = (Player -> Object); D3DXVECTOR3 Head = GetBonePosition(ThisObject, 6); D3DXVECTOR3 FootMidpoint = D3DXVECTOR3(Head.x, GetBonePosition(ThisObject, 28).y, Head.z); float HeightFactor = ((CalculateAbsoluteValue((Head - FootMidpoint).y) / 2) * 1.15); D3DXVECTOR3 BaseDrawPoint = (GetMidpoint(Head, GetBonePosition(ThisObject, 3)) - D3DXVECTOR3(0, (HeightFactor / 2), 0)); D3DXVECTOR3 DrawPoint1 = (BaseDrawPoint + D3DXVECTOR3(-50, HeightFactor, -50)); D3DXVECTOR3 DrawPoint2 = (BaseDrawPoint + D3DXVECTOR3(-50, -HeightFactor, -50)); D3DXVECTOR3 DrawPoint3 = (BaseDrawPoint + D3DXVECTOR3(50, -HeightFactor, -50)); D3DXVECTOR3 DrawPoint4 = (BaseDrawPoint + D3DXVECTOR3(50, HeightFactor, -50)); D3DXVECTOR3 DrawPoint5 = (BaseDrawPoint + D3DXVECTOR3(-50, HeightFactor, 50)); D3DXVECTOR3 DrawPoint6 = (BaseDrawPoint + D3DXVECTOR3(-50, -HeightFactor, 50)); D3DXVECTOR3 DrawPoint7 = (BaseDrawPoint + D3DXVECTOR3(50, -HeightFactor, 50)); D3DXVECTOR3 DrawPoint8 = (BaseDrawPoint + D3DXVECTOR3(50, HeightFactor, 50)); if (WorldToScreen(D3DDevice, &DrawPoint1) && WorldToScreen(D3DDevice, &DrawPoint2) && WorldToScreen(D3DDevice, &DrawPoint3) && WorldToScreen(D3DDevice, &DrawPoint4) && WorldToScreen(D3DDevice, &DrawPoint5) && WorldToScreen(D3DDevice, &DrawPoint6) && WorldToScreen(D3DDevice, &DrawPoint7) && WorldToScreen(D3DDevice, &DrawPoint8)) { DrawD3DLine(D3DDevice, DrawPoint1.x, DrawPoint1.y, DrawPoint2.x, DrawPoint2.y, ESPColor); DrawD3DLine(D3DDevice, DrawPoint2.x, DrawPoint2.y, DrawPoint3.x, DrawPoint3.y, ESPColor); DrawD3DLine(D3DDevice, DrawPoint3.x, DrawPoint3.y, DrawPoint4.x, DrawPoint4.y, ESPColor); DrawD3DLine(D3DDevice, DrawPoint4.x, DrawPoint4.y, DrawPoint1.x, DrawPoint1.y, ESPColor); DrawD3DLine(D3DDevice, DrawPoint5.x, DrawPoint5.y, DrawPoint6.x, DrawPoint6.y, ESPColor); DrawD3DLine(D3DDevice, DrawPoint6.x, DrawPoint6.y, DrawPoint7.x, DrawPoint7.y, ESPColor); DrawD3DLine(D3DDevice, DrawPoint7.x, DrawPoint7.y, DrawPoint8.x, DrawPoint8.y, ESPColor); DrawD3DLine(D3DDevice, DrawPoint8.x, DrawPoint8.y, DrawPoint5.x, DrawPoint5.y, ESPColor); DrawD3DLine(D3DDevice, DrawPoint1.x, DrawPoint1.y, DrawPoint5.x, DrawPoint5.y, ESPColor); DrawD3DLine(D3DDevice, DrawPoint2.x, DrawPoint2.y, DrawPoint6.x, DrawPoint6.y, ESPColor); DrawD3DLine(D3DDevice, DrawPoint3.x, DrawPoint3.y, DrawPoint7.x, DrawPoint7.y, ESPColor); DrawD3DLine(D3DDevice, DrawPoint4.x, DrawPoint4.y, DrawPoint8.x, DrawPoint8.y, ESPColor); }; };
Me - rewriting it to improve the code
iFlux - the original code
96neko (01-25-2019),alisonbbzz (02-10-2019),awdacwadc (04-07-2019),BlueeD (01-25-2019),ItsMeiWraz (02-24-2019),malfac009 (01-25-2019),TheG2ek (09-02-2019),TheSnKGaming (02-02-2019),Trojan2567 (01-25-2019),vaisefud3 (01-25-2019),_Mike92 (01-25-2019)
So many leechers lol.. 44 views and no one says thanks, but I guarantee someone took it
Say thanks if you're gonna use something
I will not use it but I already thank you : p
actually its the same as 3d box?
Last edited by _Mike92; 01-26-2019 at 02:05 AM.
could it be smaller? yes, the code also wouldnt look as good (aesthetics and readability matter too, moron)
could I draw less? no, it would take the same amount of drawline calls either way, its a 3d box what do you expect
it doesnt lag at all so i dont see why you're complaining noob
it works just fine
when YOU do better, when YOU release it, please come say something... otherwise dont complain unless its actually constructive
oh, and fyi, " Originally Posted by jayjay153
thats why i do not want to comment. you're always angry.
if you want to share then be calm...
tsk tsk.
ure right haha"
he's not right, I'm never angry
and no I didn't post it just for thanks, so please stop assuming things
whether or not I want thanks is irrelevant, i posted it so people could benefit
the only reason i said something is so that people stop leeching it w/ no credit
Based on this article:
PT-BR ( https://pt.wikipedia.org/wiki/Caixa_...ra_m%C3%ADnima ).
EN-US ( https://en.wikipedia.org/wiki/Bounding_volume ).
Dynamic 3D Boxes based on player AABB.
Code:template<class it, class actor> void CESPFunctions<it, actor>::AABB3D( void ) const { D3DXVECTOR3 vec[ 8 ] { D3DXVECTOR3( 0, 0, 0 ) }; D3DXVECTOR3 max = this->getEntityIterator( )->getLTObject( )->BoxMax; D3DXVECTOR3 min = this->getEntityIterator( )->getLTObject( )->BoxMin; if( pEngine->worldToScreen( min, &vec[ 0 ] ) && pEngine->worldToScreen( max, &vec[ 1 ] ) && pEngine->worldToScreen( D3DXVECTOR3( max.x, min.y, min.z ), &vec[ 2 ] ) && pEngine->worldToScreen( D3DXVECTOR3( min.x, max.y, min.z ), &vec[ 3 ] ) && pEngine->worldToScreen( D3DXVECTOR3( min.x, min.y, max.z ), &vec[ 4 ] ) && pEngine->worldToScreen( D3DXVECTOR3( min.x, max.y, max.z ), &vec[ 5 ] ) && pEngine->worldToScreen( D3DXVECTOR3( max.x, min.y, max.z ), &vec[ 6 ] ) && pEngine->worldToScreen( D3DXVECTOR3( max.x, max.y, min.z ), &vec[ 7 ] ) ) { pRender->Line( vec[ 0 ].x, vec[ 0 ].y, vec[ 4 ].x, vec[ 4 ].y, Color( dwColor ) ); pRender->Line( vec[ 1 ].x, vec[ 1 ].y, vec[ 7 ].x, vec[ 7 ].y, Color( dwColor ) ); pRender->Line( vec[ 2 ].x, vec[ 2 ].y, vec[ 6 ].x, vec[ 6 ].y, Color( dwColor ) ); pRender->Line( vec[ 3 ].x, vec[ 3 ].y, vec[ 5 ].x, vec[ 5 ].y, Color( dwColor ) ); pRender->Line( vec[ 0 ].x, vec[ 0 ].y, vec[ 2 ].x, vec[ 2 ].y, Color( dwColor ) ); pRender->Line( vec[ 0 ].x, vec[ 0 ].y, vec[ 3 ].x, vec[ 3 ].y, Color( dwColor ) ); pRender->Line( vec[ 7 ].x, vec[ 7 ].y, vec[ 2 ].x, vec[ 2 ].y, Color( dwColor ) ); pRender->Line( vec[ 7 ].x, vec[ 7 ].y, vec[ 3 ].x, vec[ 3 ].y, Color( dwColor ) ); pRender->Line( vec[ 1 ].x, vec[ 1 ].y, vec[ 5 ].x, vec[ 5 ].y, Color( dwColor ) ); pRender->Line( vec[ 1 ].x, vec[ 1 ].y, vec[ 6 ].x, vec[ 6 ].y, Color( dwColor ) ); pRender->Line( vec[ 4 ].x, vec[ 4 ].y, vec[ 5 ].x, vec[ 5 ].y, Color( dwColor ) ); pRender->Line( vec[ 4 ].x, vec[ 4 ].y, vec[ 6 ].x, vec[ 6 ].y, Color( dwColor ) ); } }
@Goocolax post TWT no DC/Ban
Sou aprendiz como todos