rendered paste body/*004CF5A0 /$ A1 E43C5101 mov eax, [1513CE4]004CF5A5 |. F6C4 03 test ah, 3004CF5A8 |. 0F84 CF000000 je 004CF67D004CF5AE |. 56 push esi004CF5AF |. 8B35 D8415101 mov esi, [15141D8]004CF5B5 |. 69F6 24020000 imul esi, esi, 224004CF5BB |. 81C6 802A5E01 add esi, 015E2A80004CF5C1 |. 8B86 20020000 mov eax, [esi+220]004CF5C7 |. 8B96 F0000000 mov edx, [esi+F0]004CF5CD |. 8D04C0 lea eax, [eax+eax*8]004CF5D0 |. C1E0 07 shl eax, 7004CF5D3 |. 03C2 add eax, edx004CF5D5 |. 66:8B0445 80B>mov ax, [eax*2+C5BC80]004CF5DD |. 66:85C0 test ax, ax004CF5E0 |. 0F84 96000000 je 004CF67C004CF5E6 |. 0FBFC8 movsx ecx, ax004CF5E9 |. 6BC9 64 imul ecx, ecx, 64004CF5EC |. 81C1 009CC200 add ecx, 00C29C00004CF5F2 |. 0F84 84000000 je 004CF67C004CF5F8 |. 0FB705 BA3994>movzx eax, word ptr [19439BA]004CF5FF |. 68 08665101 push 01516608 ;origin004CF604 |. 56 push esi ;cent004CF605 |. E8 66D8FFFF call 004CCE70 <------------------------------------004CF60A |. 83C4 08 add esp, 8004CF60D |. 85C0 test eax, eax004CF60F |. 75 0F jnz short 004CF620004CF611 |. 68 E45A5B00 push 005B5AE4 ; ASCII 15,"Turret has no bone: t"*/// ----------------------------------------------------------------------VOID trap_GetOriginForTag( centity_t *cent, DWORD dwTagHandle, vec3_t origin ) { __asm { mov esi, [cent] MOV EAX,DWORD PTR DS:[ESI+0x220] MOV EDX,DWORD PTR DS:[ESI+0xF0] LEA EAX,DWORD PTR DS:[EAX+EAX*8] SHL EAX,7 ADD EAX,EDX MOV AX,WORD PTR DS:[EAX*2 + 0xC5BC80] MOVSX ECX,AX IMUL ECX,ECX,0x64 ADD ECX, 0x00C29C00 MOVZX EAX,WORD PTR DS:[dwTagHandle] push origin push cent mov edx, [Client.orig_CG_GetHeadOrigin] call edx pop eax pop eax }}// ----------------------------------------------------------------------#define MAX_TAGS 20BOOL CG_GetEntityOriginForTag( int iEntity, int iTagNum, vec3_t &origin ){ if ( iTagNum < 0 || iTagNum >= MAX_TAGS ) return FALSE; DWORD * Handle = (DWORD*)(Client.dwTagHandleStartOffset + sizeof(WORD) * iTagNum); trap_GetOriginForTag( &Client.pce[iEntity], *Handle, origin ); return TRUE;}// ----------------------------------------------------------------------void CG_DrawTagsForEntity( int iEntity ) { static vec3_t origin; static FLOAT x, y; static vec4_t color = { 1.0f, 1.0f, 1.0f, 1.0f }; for ( int i = 0; i < MAX_TAGS; i++ ) { CG_GetEntityOriginForTag( iEntity, i, origin ); if ( !CG_WorldCoordToScreenCoord( origin, &x, &y ) ) continue; CG_DrawStringCentered( x, y, 0.7f, color, Client.ftNormal, "." ); }}