Well since the radar is drawn locally you can manipulate it like a boss, saw people draw their own radar + use rotatedpic, but i personally like to use the engine to achieve my wishes. So since its almost christmas i have some Advanced UAV code for you guys.
this function does it all
Code:
void __cdecl sub_47F690(int a1, int a2, int a3, int a4, int a5)
it loops trough a struct of 18 big, as far as i know its not clientinfo or entity, feel free to reverse it
Code:
v7 = (char *)&unk_8F2938 + 3640 * a1;
v52 = 18;
do
{
.....
v7 += 140; //see here the struct size = 0x8C = 140 dec
}
while ( v52-- != 1 );
now we're heading to some more important stuff
at the bottom of the function we see a call to drawrotatedpic
Code:
sub_40D420(v51, v55, v56, v48, v47, *(_BYTE *)(a4 + 16), *(_BYTE *)(a4 + 17), v44, (int)&v58, v31);
and we see that v31 holds the shader.
if we scroll up a bit we see this piece of code
Code:
if ( dword_8FF284 || v10 ) // 0x8FF080 is cg_t, means cg_t + 0x204 holds the advanced uav value
{
if ( !v45 || !dword_A041F8 || (v31 = dword_A041F8, sub_4F5920(dword_A041F8)) )
v31 = dword_A04184; // here v31 will hold compassping_enemyfacingdirection
}
so we now know where to toggle the advanced uav, but now we only see the shaders when people shoot. We want those shaders at all time.
Now if we take a look at the top of the function we will find this
Code:
if ( v7[56] & 1 )//guess here they check for isalive
{
v8 = *((_DWORD *)v7 + 16);
v10 = (unsigned __int16)((_WORD)v8 >> 16);
v9 = (*((_DWORD *)v7 + 16) >> 17) & 1;
if ( v43 || v9 || (_WORD)v8 >> 16 || (unsigned __int16)(v8 & 0x8000) )
{
//we need to make sure this if is true
//we can do hard stuff with shifts or bitwise ands, or just take the easy way and pick v43
v12 = dword_96A1DC;
v11 = 1;
if ( *(_DWORD *)v7 > LODWORD(dword_96A1DC) )
*(_DWORD *)v7 = 0;
if ( *(_DWORD *)v7 < LODWORD(v12) - 500 )
goto LABEL_71;
}
else
{
v11 = 0;
}
if we look something above that code we will find this
Code:
v43 = *(_BYTE *)(dword_1C2C39C + 12);
hey! that looks like a cvar! + 0xC is the value, hmm lets make it have a value! (this is g_compassShowEnemies)
Code:
void AdvancedUAV()
{
cg_t->uav = 1; //the 0x8FF284 we found before in cg_t
*(BYTE*)(*(DWORD*)(0x1C2C39C) + 0xC) = 0x1; // the cvar
}
call this every frame and you will have advanced uav at all time, have fun!