|
CSGO: Backtrack skeleton drawing
Hello,
if (!entity->SetupBones(bonematrixes[i][cmd->command_number % ticks].bonematrix, 128, BONE_USED_BY_HITBOX, g_GlobalVars->curtime)) drawing: if (!pStudioModel) for (int ii = 0; ii < pStudioModel->numbones; ii++) Vector vBonePos1; 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)) g_VGuiSurface->DrawSetColor(Color(255, 255, 255)); } 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: Just a reminder that I didn’t test this, I just want to help the OP. |
|