Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void RenderFrame() {
- int iLocalIndex = g_pEngine->GetLocalPlayer();
- LocalEntity.Update(iLocalIndex);
- if (!LocalEntity.IsValid()) {
- return;
- }
- for (int iIndex = 1; iIndex <= 64; iIndex++) {
- EntityList[iIndex].Update(iIndex);
- if (EntityList[iIndex].IsValid() && (iLocalIndex != iIndex)) {
- Vector3 vHead = EntityList[iIndex].GetBonePosition(10);
- vHead += Vector3(0, 0, 9);
- Vector3 vFeet;
- if (EntityList[iIndex].GetFlags() & FL_DUCKING) {
- vFeet = vHead - Vector3(0, 0, 50);
- } else {
- vFeet = vHead - Vector3(0, 0, 75);
- }
- Vector3 vTop, vBot;
- if (g_pEngine->WorldToScreen(vHead, vTop) && g_pEngine->WorldToScreen(vFeet, vBot)) {
- float h = vBot.y - vTop.y;
- float w = h / 5.0f;
- g_pRenderer->DrawBorderBoxOut(vTop.x - w, vTop.y, w * 2, h, 1, Color::Cyan(), Color::Black());
- g_pRenderer->DrawText(hFont, vTop.x, vTop.y + h, FONT_RENDER_CENTER_H, Color::White(), EntityList[iIndex].GetName());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement