Official site anti-cheat Ultra Core Protector

Home Download F.A.Q. Addons Monitor Forum Support Advertise English version site UCP Anti-Cheat    Russian version site UCP Anti-Cheat
Ultra Core Protector - is the client-server anti-cheat freeware, for server protection from unscrupulous players.

Abilities Supported games  
Half-Life
Condition Zero
Counter-Strike 1.6
Day of Defeat
Adrenaline Gamer
Team Fortress Classic
Counter-Strike Source
MU Online
Ragnarok Online
Half-Life 2 Deathmatch
Adrenaline Gamer 2
Team Fortress 2
CSGO: Backtrack skeleton drawing

Hello,
I have a problem with drawing skeleton, it works but it’s bugged. It sometimes draws random line on the screen ;/ Thanks for help

storing:

if (!entity->SetupBones(bonematrixes[i][cmd->command_number % ticks].bonematrix, 128, BONE_USED_BY_HITBOX, g_GlobalVars->curtime))
continue;

drawing:
for (int t = 0; t < ticks; ++t) { Vector screenbacktrack[64][64]; if (headPositions[i][t].simtime && headPositions[i][t].simtime + 1 > g_LocalPlayer->m_flSimulationTime())
{
studiohdr_t* pStudioModel = g_MdlInfo->GetStudioModel(entity->GetModel());

if (!pStudioModel)
continue;

for (int ii = 0; ii < pStudioModel->numbones; ii++)
{
mstudiobone_t* pBone = pStudioModel->GetBone(i);
if (!pBone || !(pBone->flags & 256) || pBone->parent == -1)
continue;

Vector vBonePos1;
if (!Math::WorldToScreen(Vector(bonematrixes[i][t].bonematrix[ii][0][3], bonematrixes[i][t].bonematrix[ii][1][3], bonematrixes[i][t].bonematrix[ii][2][3]), vBonePos1))
continue;

Vector vBonePos2;

if (!Math::WorldToScreen(Vector(bonematrixes[i][t].bonematrix[pBone->parent][0][3], bonematrixes[i][t].bonematrix[pBone->parent][1][3], bonematrixes[i][t].bonematrix[pBone->parent][2][3]), vBonePos2))
continue;

g_VGuiSurface->DrawSetColor(Color(255, 255, 255));
g_VGuiSurface->DrawLine(vBonePos1.x, vBonePos1.y, vBonePos2.x, vBonePos2.y);
}

}
}

I would make a seperate function to draw the skeleton with one of the arguments the entities bonematrix (that you will store) or any other information to store their position (I’m not really an expert in that shit). Test first of all if the skeleton itself is drawn correctly (by applying it to entities without the stored information) and then try to draw the skeleton (call your function that draws a skeleton with the info stored) on every tick with the stored matrix.

Right now, it doesn’t even look like it’s drawing a skeleton properly. I’m just saying what I would do, I’m not saying that it’s the most efficient way. but I’m 90% sure this will work.

Btw, what is that:
Vector screenbacktrack[64][64];
I don’t think you need a 64 by 64 matrix of 3 dimentional vectors for this. Just use an array.

Just a reminder that I didn’t test this, I just want to help the OP.


 



Home | Download | F.A.Q. | Addons | Forum | Banners | Sitemap | Directory | Support
Copyright © 2008-2015 UCP. All rights reserved. Privacy Policy. Siter.