Work in progress
This commit is contained in:
parent
ba5aefc53c
commit
0f633f60e7
@ -218,7 +218,7 @@ void CreateMove()
|
|||||||
|
|
||||||
for (angle.y = -180.0f; angle.y < 180.0f; angle.y += 20.0f)
|
for (angle.y = -180.0f; angle.y < 180.0f; angle.y += 20.0f)
|
||||||
{
|
{
|
||||||
if (unifiedCanBackstab(besttarget, angle, i.entorigin, i.hitboxes.at(spine_3).min, i.hitboxes.at(spine_3).max))
|
if (unifiedCanBackstab(besttarget, angle, i.entorigin, i.collidable.min, i.collidable.max))
|
||||||
{
|
{
|
||||||
current_user_cmd->tick_count = i.tickcount;
|
current_user_cmd->tick_count = i.tickcount;
|
||||||
current_user_cmd->viewangles = angle;
|
current_user_cmd->viewangles = angle;
|
||||||
|
@ -263,19 +263,27 @@ int getTicks()
|
|||||||
|
|
||||||
bool ValidTick(BacktrackData &i, CachedEntity *ent)
|
bool ValidTick(BacktrackData &i, CachedEntity *ent)
|
||||||
{
|
{
|
||||||
if (istickvalid[ent->m_IDX][i.index])
|
// TODO: Fix this func
|
||||||
return true;
|
|
||||||
if (istickinvalid[ent->m_IDX][i.index])
|
|
||||||
|
// if (istickvalid[ent->m_IDX][i.index])
|
||||||
|
// return true;
|
||||||
|
// if (istickinvalid[ent->m_IDX][i.index])
|
||||||
|
// return false;
|
||||||
|
// if (IsVectorVisible(g_pLocalPlayer->v_Eye, i.hitboxes[head].center, true))
|
||||||
|
// if (fabsf(NET_FLOAT(RAW_ENT(ent), netvar.m_flSimulationTime) * 1000.0f -
|
||||||
|
// getLatency() - i.simtime * 1000.0f) <= 200.0f)
|
||||||
|
// {
|
||||||
|
// istickvalid[ent->m_IDX][i.index] = true;
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// istickinvalid[ent->m_IDX][i.index] = true;
|
||||||
|
// return false;
|
||||||
|
|
||||||
|
if (!(fabsf(NET_FLOAT(RAW_ENT(ent), netvar.m_flSimulationTime) * 1000.0f -
|
||||||
|
getLatency() - i.simtime * 1000.0f) < 200.0f))
|
||||||
return false;
|
return false;
|
||||||
if (IsVectorVisible(g_pLocalPlayer->v_Eye, i.hitboxes[head].center, true))
|
return true;
|
||||||
if (fabsf(NET_FLOAT(RAW_ENT(ent), netvar.m_flSimulationTime) * 1000.0f -
|
|
||||||
getLatency() - i.simtime * 1000.0f) <= 200.0f)
|
|
||||||
{
|
|
||||||
istickvalid[ent->m_IDX][i.index] = true;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
istickinvalid[ent->m_IDX][i.index] = true;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmptyBacktrackData(BacktrackData &i)
|
void EmptyBacktrackData(BacktrackData &i)
|
||||||
|
@ -118,30 +118,7 @@ void draw::UpdateWTS()
|
|||||||
|
|
||||||
bool draw::WorldToScreen(const Vector &origin, Vector &screen)
|
bool draw::WorldToScreen(const Vector &origin, Vector &screen)
|
||||||
{
|
{
|
||||||
float w, odw;
|
return g_IVDebugOverlay->ScreenPosition(origin, screen) == 0;
|
||||||
screen.z = 0;
|
|
||||||
w = wts[3][0] * origin[0] + wts[3][1] * origin[1] + wts[3][2] * origin[2] +
|
|
||||||
wts[3][3];
|
|
||||||
if (w > 0.001)
|
|
||||||
{
|
|
||||||
odw = 1.0f / w;
|
|
||||||
screen.x = (draw::width / 2) +
|
|
||||||
(0.5 *
|
|
||||||
((wts[0][0] * origin[0] + wts[0][1] * origin[1] +
|
|
||||||
wts[0][2] * origin[2] + wts[0][3]) *
|
|
||||||
odw) *
|
|
||||||
draw::width +
|
|
||||||
0.5);
|
|
||||||
screen.y = (draw::height / 2) -
|
|
||||||
(0.5 *
|
|
||||||
((wts[1][0] * origin[0] + wts[1][1] * origin[1] +
|
|
||||||
wts[1][2] * origin[2] + wts[1][3]) *
|
|
||||||
odw) *
|
|
||||||
draw::height +
|
|
||||||
0.5);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_GLContext context = nullptr;
|
SDL_GLContext context = nullptr;
|
||||||
|
Reference in New Issue
Block a user