Hola, estoy tratando de aprender esto de las sources ya aprendi a dibujar o poner textos pero tengo problemas con las barras de progress pueden ayudarme? 
pero cambiandola solo se agranda la barra de vida pero no la barra que define el progreso de vida.
pero al hacerlo la barra de progress se agranda pero no hace el calculo correcto por lo cual el bicho muere estando la barra en 50% 
void DrawNewHealthBar() // OK
{
	int PosX, PosY, LifeProgress, ShieldProgress;
	float LifeBarWidth = 40.0f;
	char LifeDisplay[50];
	VAngle Angle;
	for(int n=0;n < MAX_MAIN_VIEWPORT;n++)
	{
		DWORD ViewportAddress = ((DWORD(__thiscall*)(void*,DWORD))0x0096A4C0)(((void*(*)())0x00402BC0)(),n);
		gObjUser.m_Logo[n].Active = 0;
		if(!ViewportAddress)
		{
			continue;
		}
		if(*(BYTE*)(ViewportAddress+0x30C) == 0)
		{
			continue;
		}
		Angle.X = *(float*)(ViewportAddress+0x404);
		Angle.Y = *(float*)(ViewportAddress+0x408);
		Angle.Z = *(float*)(ViewportAddress+0x40C) + *(float*)(ViewportAddress+0x3E8) + 200.0f;
		pGetPosFromAngle(&Angle, &PosX, &PosY);
		if (*(BYTE*)(ViewportAddress+0x320) == 1) //Check User Type
        {
           	gObjUser.m_Logo[n].Active = 1;
			gObjUser.m_Logo[n].X = PosX;
			gObjUser.m_Logo[n].Y = PosY;
        }
		PosX -= (int)floor(LifeBarWidth / (double)2.0);
		PosY -= 16;
		NEW_HEALTH_BAR* lpNewHealthBar = GetNewHealthBar(*(WORD*)(ViewportAddress+0x7E),*(BYTE*)(ViewportAddress+0x320));
		if(lpNewHealthBar == 0)
		{
			continue;
		}
		int LifePercent = lpNewHealthBar->rate/10;
		int ShieldPercent	= lpNewHealthBar->rate2/10;
		if((pCursorX >= PosX - 2) && ((float)pCursorX <= (float)PosX + LifeBarWidth + 2) && (pCursorY >= PosY - 2) && (pCursorY < PosY + 10))
		{
			if (ShieldPercent>0) 
			{
				wsprintf(LifeDisplay, "HP : %d0%% | SD : %d0%%", LifePercent, ShieldPercent);
				pSetTextColor(pTextThis(), 0xFF, 0xE6, 0xD2, 0xFF);
				pDrawText(pTextThis(), PosX - 20, PosY - 10, LifeDisplay, 0, 0, (LPINT)1, 0);
			}
			else
			{
				wsprintf(LifeDisplay, "HP : %d0%%", LifePercent);
				pSetTextColor(pTextThis(), 0xFF, 0xE6, 0xD2, 0xFF);
				pDrawText(pTextThis(), PosX, PosY - 8, LifeDisplay, 0, 0, (LPINT)1, 0);
			}
		}
		pSetBlend(true);
		float Tamanho = (ShieldPercent>0)?Tamanho=10.0f:Tamanho=5.0f;
		glColor4f(0.0, 0.0, 0.0, 0.5);
		pDrawBarForm((float)(PosX - 2), (float)(PosY + 1), LifeBarWidth + 4.0f, Tamanho, 0.0f, 0);
		pGLSwitchBlend();
		glColor3f(0.2f, 0.0, 0.0);
		pDrawBarForm((float)PosX, (float)PosY + 2, LifeBarWidth, 2.0f, 0.0, 0);
		if (ShieldPercent>0) 
		{
			glColor3f(0.22039216f, 0.239215688f, 0.0);
			pDrawBarForm((float)PosX, (float)PosY + 6, LifeBarWidth, 2.0f, 0.0, 0);
		}
		if(LifePercent > 10)
		{
			LifeProgress = 10;
		}
		else
		{
			LifeProgress = LifePercent;
		}
		if(ShieldPercent > 10)
		{
			ShieldProgress = 10;
		}
		else
		{
			ShieldProgress = ShieldPercent;
		}
		glColor3f(0.98039216f, 0.039215688f, 0.0);
		for(int i = 0; i < LifeProgress; i++)
		{
			pDrawBarForm((float)(i * 4 + PosX + 0), (float)(PosY + 2), 4.0, 2.0, 0.0, 0);
		}
		if (ShieldPercent>0) 
		{
			glColor3f(0.98039216f, 5.039215688f, 0.0);
			for(int i = 0; i < ShieldProgress; i++)
			{
				pDrawBarForm((float)(i * 4 + PosX + 0), (float)(PosY + 6), 4.0, 2.0, 0.0, 0);
			}
		}
		pGLSwitch();
	}
	pGLSwitch();
	glColor3f(1.0, 1.0, 1.0);
}
si alguien puede ayudarme y/o dejarme unos consejos lo agradesceria mucho.