void Resolver::OnCreateMove() // cancer v2
{
if (!g_Menu.Config.Resolver)
return;
if (!Globals::LocalPlayer->IsAlive())
return;
if (!Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->IsKnifeorNade())
return;
for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
{
C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);
if (!pPlayerEntity
|| !pPlayerEntity->IsAlive()
|| pPlayerEntity->IsDormant()
|| pPlayerEntity == Globals::LocalPlayer
|| pPlayerEntity->GetTeam() == Globals::LocalPlayer->GetTeam())
{
UseFreestandAngle = false;
continue;
}
if (abs(pPlayerEntity->GetVelocity().Length2D()) > 29.f)
UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
if (abs(pPlayerEntity->GetVelocity().Length2D()) <= 29.f && !UseFreestandAngle[pPlayerEntity->EntIndex()])
{
bool Autowalled = false, HitSide1 = false, HitSide2 = false;
float angToLocal = g_Math.CalcAngle(Globals::LocalPlayer->GetOrigin(), pPlayerEntity->GetOrigin()).y;
Vector ViewPoint = Globals::LocalPlayer->GetOrigin() + Vector(0, 0, 90);
Vector2D Side1 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal))),(45 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
Vector2D Side2 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(45 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };
Vector2D Side3 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal))),(50 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
Vector2D Side4 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(50 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };
Vector Origin = pPlayerEntity->GetOrigin();
Vector2D OriginLeftRight[] = { Vector2D(Side1.x, Side1.y), Vector2D(Side2.x, Side2.y) };
Vector2D OriginLeftRightLocal[] = { Vector2D(Side3.x, Side3.y), Vector2D(Side4.x, Side4.y) };
for (int side = 0; side < 2; side++)
{
Vector OriginAutowall = { Origin.x + OriginLeftRight[side].x, Origin.y - OriginLeftRight[side].y , Origin.z + 90 };
Vector OriginAutowall2 = { ViewPoint.x + OriginLeftRightLocal[side].x, ViewPoint.y - OriginLeftRightLocal[side].y , ViewPoint.z };
if (g_Autowall.CanHitFloatingPoint(OriginAutowall, ViewPoint))
{
if (side == 0)
{
HitSide1 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = 90;
}
else if (side == 1)
{
HitSide2 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = -90;
}
Autowalled = true;
}
else
{
for (int side222 = 0; side222 < 2; side222++)
{
Vector OriginAutowall222 = { Origin.x + OriginLeftRight[side222].x, Origin.y - OriginLeftRight[side222].y , Origin.z + 90 };
if (g_Autowall.CanHitFloatingPoint(OriginAutowall222, OriginAutowall2))
{
if (side222 == 0)
{
HitSide1 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = 90;
}
else if (side222 == 1)
{
HitSide2 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = -90;
}
Autowalled = true;
}
}
}
}
if (Autowalled)
{
if (HitSide1 && HitSide2)
UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
else
UseFreestandAngle[pPlayerEntity->EntIndex()] = true;
}
}
}
}
void Resolver::OnCreateMove() // cancer v2
{
if (!g_Menu.Config.Resolver)
return;
if (!Globals::LocalPlayer->IsAlive())
return;
if (!Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->IsKnifeorNade())
return;
for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
{
C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);
if (!pPlayerEntity
|| !pPlayerEntity->IsAlive()
|| pPlayerEntity->IsDormant()
|| pPlayerEntity == Globals::LocalPlayer
|| pPlayerEntity->GetTeam() == Globals::LocalPlayer->GetTeam())
{
UseFreestandAngle = false;
continue;
}
if (abs(pPlayerEntity->GetVelocity().Length2D()) > 29.f)
UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
if (abs(pPlayerEntity->GetVelocity().Length2D()) <= 29.f && !UseFreestandAngle[pPlayerEntity->EntIndex()])
{
bool Autowalled = false, HitSide1 = false, HitSide2 = false;
float angToLocal = g_Math.CalcAngle(Globals::LocalPlayer->GetOrigin(), pPlayerEntity->GetOrigin()).y;
Vector ViewPoint = Globals::LocalPlayer->GetOrigin() + Vector(0, 0, 90);
Vector2D Side1 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal))),(45 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
Vector2D Side2 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(45 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };
Vector2D Side3 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal))),(50 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
Vector2D Side4 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(50 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };
Vector Origin = pPlayerEntity->GetOrigin();
Vector2D OriginLeftRight[] = { Vector2D(Side1.x, Side1.y), Vector2D(Side2.x, Side2.y) };
Vector2D OriginLeftRightLocal[] = { Vector2D(Side3.x, Side3.y), Vector2D(Side4.x, Side4.y) };
for (int side = 0; side < 2; side++)
{
Vector OriginAutowall = { Origin.x + OriginLeftRight[side].x, Origin.y - OriginLeftRight[side].y , Origin.z + 90 };
Vector OriginAutowall2 = { ViewPoint.x + OriginLeftRightLocal[side].x, ViewPoint.y - OriginLeftRightLocal[side].y , ViewPoint.z };
if (g_Autowall.CanHitFloatingPoint(OriginAutowall, ViewPoint))
{
if (side == 0)
{
HitSide1 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = 90;
}
else if (side == 1)
{
HitSide2 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = -90;
}
Autowalled = true;
}
else
{
for (int side222 = 0; side222 < 2; side222++)
{
Vector OriginAutowall222 = { Origin.x + OriginLeftRight[side222].x, Origin.y - OriginLeftRight[side222].y , Origin.z + 90 };
if (g_Autowall.CanHitFloatingPoint(OriginAutowall222, OriginAutowall2))
{
if (side222 == 0)
{
HitSide1 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = 90;
}
else if (side222 == 1)
{
HitSide2 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = -90;
}
Autowalled = true;
}
}
}
}
if (Autowalled)
{
if (HitSide1 && HitSide2)
UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
else
UseFreestandAngle[pPlayerEntity->EntIndex()] = true;
}
}
}
}
void Resolver::OnCreateMove() // cancer v2
{
if (!g_Menu.Config.Resolver)
return;
if (!Globals::LocalPlayer->IsAlive())
return;
if (!Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->IsKnifeorNade())
return;
for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
{
C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);
if (!pPlayerEntity
|| !pPlayerEntity->IsAlive()
|| pPlayerEntity->IsDormant()
|| pPlayerEntity == Globals::LocalPlayer
|| pPlayerEntity->GetTeam() == Globals::LocalPlayer->GetTeam())
{
UseFreestandAngle = false;
continue;
}
if (abs(pPlayerEntity->GetVelocity().Length2D()) > 29.f)
UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
if (abs(pPlayerEntity->GetVelocity().Length2D()) <= 29.f && !UseFreestandAngle[pPlayerEntity->EntIndex()])
{
bool Autowalled = false, HitSide1 = false, HitSide2 = false;
float angToLocal = g_Math.CalcAngle(Globals::LocalPlayer->GetOrigin(), pPlayerEntity->GetOrigin()).y;
Vector ViewPoint = Globals::LocalPlayer->GetOrigin() + Vector(0, 0, 90);
Vector2D Side1 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal))),(45 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
Vector2D Side2 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(45 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };
Vector2D Side3 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal))),(50 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
Vector2D Side4 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(50 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };
Vector Origin = pPlayerEntity->GetOrigin();
Vector2D OriginLeftRight[] = { Vector2D(Side1.x, Side1.y), Vector2D(Side2.x, Side2.y) };
Vector2D OriginLeftRightLocal[] = { Vector2D(Side3.x, Side3.y), Vector2D(Side4.x, Side4.y) };
for (int side = 0; side < 2; side++)
{
Vector OriginAutowall = { Origin.x + OriginLeftRight[side].x, Origin.y - OriginLeftRight[side].y , Origin.z + 90 };
Vector OriginAutowall2 = { ViewPoint.x + OriginLeftRightLocal[side].x, ViewPoint.y - OriginLeftRightLocal[side].y , ViewPoint.z };
if (g_Autowall.CanHitFloatingPoint(OriginAutowall, ViewPoint))
{
if (side == 0)
{
HitSide1 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = 90;
}
else if (side == 1)
{
HitSide2 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = -90;
}
Autowalled = true;
}
else
{
for (int side222 = 0; side222 < 2; side222++)
{
Vector OriginAutowall222 = { Origin.x + OriginLeftRight[side222].x, Origin.y - OriginLeftRight[side222].y , Origin.z + 90 };
if (g_Autowall.CanHitFloatingPoint(OriginAutowall222, OriginAutowall2))
{
if (side222 == 0)
{
HitSide1 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = 90;
}
else if (side222 == 1)
{
HitSide2 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = -90;
}
Autowalled = true;
}
}
}
}
if (Autowalled)
{
if (HitSide1 && HitSide2)
UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
else
UseFreestandAngle[pPlayerEntity->EntIndex()] = true;
}
}
}
}
void Resolver::OnCreateMove() // cancer v2
{
if (!g_Menu.Config.Resolver)
return;
if (!Globals::LocalPlayer->IsAlive())
return;
if (!Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->IsKnifeorNade())
return;
for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
{
C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);
if (!pPlayerEntity
|| !pPlayerEntity->IsAlive()
|| pPlayerEntity->IsDormant()
|| pPlayerEntity == Globals::LocalPlayer
|| pPlayerEntity->GetTeam() == Globals::LocalPlayer->GetTeam())
{
UseFreestandAngle = false;
continue;
}
if (abs(pPlayerEntity->GetVelocity().Length2D()) > 29.f)
UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
if (abs(pPlayerEntity->GetVelocity().Length2D()) <= 29.f && !UseFreestandAngle[pPlayerEntity->EntIndex()])
{
bool Autowalled = false, HitSide1 = false, HitSide2 = false;
float angToLocal = g_Math.CalcAngle(Globals::LocalPlayer->GetOrigin(), pPlayerEntity->GetOrigin()).y;
Vector ViewPoint = Globals::LocalPlayer->GetOrigin() + Vector(0, 0, 90);
Vector2D Side1 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal))),(45 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
Vector2D Side2 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(45 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };
Vector2D Side3 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal))),(50 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
Vector2D Side4 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(50 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };
Vector Origin = pPlayerEntity->GetOrigin();
Vector2D OriginLeftRight[] = { Vector2D(Side1.x, Side1.y), Vector2D(Side2.x, Side2.y) };
Vector2D OriginLeftRightLocal[] = { Vector2D(Side3.x, Side3.y), Vector2D(Side4.x, Side4.y) };
for (int side = 0; side < 2; side++)
{
Vector OriginAutowall = { Origin.x + OriginLeftRight[side].x, Origin.y - OriginLeftRight[side].y , Origin.z + 90 };
Vector OriginAutowall2 = { ViewPoint.x + OriginLeftRightLocal[side].x, ViewPoint.y - OriginLeftRightLocal[side].y , ViewPoint.z };
if (g_Autowall.CanHitFloatingPoint(OriginAutowall, ViewPoint))
{
if (side == 0)
{
HitSide1 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = 90;
}
else if (side == 1)
{
HitSide2 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = -90;
}
Autowalled = true;
}
else
{
for (int side222 = 0; side222 < 2; side222++)
{
Vector OriginAutowall222 = { Origin.x + OriginLeftRight[side222].x, Origin.y - OriginLeftRight[side222].y , Origin.z + 90 };
if (g_Autowall.CanHitFloatingPoint(OriginAutowall222, OriginAutowall2))
{
if (side222 == 0)
{
HitSide1 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = 90;
}
else if (side222 == 1)
{
HitSide2 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = -90;
}
Autowalled = true;
}
}
}
}
if (Autowalled)
{
if (HitSide1 && HitSide2)
UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
else
UseFreestandAngle[pPlayerEntity->EntIndex()] = true;
}
}
}
}
void Resolver::OnCreateMove() // cancer v2
{
if (!g_Menu.Config.Resolver)
return;
if (!Globals::LocalPlayer->IsAlive())
return;
if (!Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->IsKnifeorNade())
return;
for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
{
C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);
if (!pPlayerEntity
|| !pPlayerEntity->IsAlive()
|| pPlayerEntity->IsDormant()
|| pPlayerEntity == Globals::LocalPlayer
|| pPlayerEntity->GetTeam() == Globals::LocalPlayer->GetTeam())
{
UseFreestandAngle = false;
continue;
}
if (abs(pPlayerEntity->GetVelocity().Length2D()) > 29.f)
UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
if (abs(pPlayerEntity->GetVelocity().Length2D()) <= 29.f && !UseFreestandAngle[pPlayerEntity->EntIndex()])
{
bool Autowalled = false, HitSide1 = false, HitSide2 = false;
float angToLocal = g_Math.CalcAngle(Globals::LocalPlayer->GetOrigin(), pPlayerEntity->GetOrigin()).y;
Vector ViewPoint = Globals::LocalPlayer->GetOrigin() + Vector(0, 0, 90);
Vector2D Side1 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal))),(45 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
Vector2D Side2 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(45 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };
Vector2D Side3 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal))),(50 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
Vector2D Side4 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(50 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };
Vector Origin = pPlayerEntity->GetOrigin();
Vector2D OriginLeftRight[] = { Vector2D(Side1.x, Side1.y), Vector2D(Side2.x, Side2.y) };
Vector2D OriginLeftRightLocal[] = { Vector2D(Side3.x, Side3.y), Vector2D(Side4.x, Side4.y) };
for (int side = 0; side < 2; side++)
{
Vector OriginAutowall = { Origin.x + OriginLeftRight[side].x, Origin.y - OriginLeftRight[side].y , Origin.z + 90 };
Vector OriginAutowall2 = { ViewPoint.x + OriginLeftRightLocal[side].x, ViewPoint.y - OriginLeftRightLocal[side].y , ViewPoint.z };
if (g_Autowall.CanHitFloatingPoint(OriginAutowall, ViewPoint))
{
if (side == 0)
{
HitSide1 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = 90;
}
else if (side == 1)
{
HitSide2 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = -90;
}
Autowalled = true;
}
else
{
for (int side222 = 0; side222 < 2; side222++)
{
Vector OriginAutowall222 = { Origin.x + OriginLeftRight[side222].x, Origin.y - OriginLeftRight[side222].y , Origin.z + 90 };
if (g_Autowall.CanHitFloatingPoint(OriginAutowall222, OriginAutowall2))
{
if (side222 == 0)
{
HitSide1 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = 90;
}
else if (side222 == 1)
{
HitSide2 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = -90;
}
Autowalled = true;
}
}
}
}
if (Autowalled)
{
if (HitSide1 && HitSide2)
UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
else
UseFreestandAngle[pPlayerEntity->EntIndex()] = true;
}
}
}
}
void Resolver::OnCreateMove() // cancer v2
{
if (!g_Menu.Config.Resolver)
return;
if (!Globals::LocalPlayer->IsAlive())
return;
if (!Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->IsKnifeorNade())
return;
for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
{
C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);
if (!pPlayerEntity
|| !pPlayerEntity->IsAlive()
|| pPlayerEntity->IsDormant()
|| pPlayerEntity == Globals::LocalPlayer
|| pPlayerEntity->GetTeam() == Globals::LocalPlayer->GetTeam())
{
UseFreestandAngle = false;
continue;
}
if (abs(pPlayerEntity->GetVelocity().Length2D()) > 29.f)
UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
if (abs(pPlayerEntity->GetVelocity().Length2D()) <= 29.f && !UseFreestandAngle[pPlayerEntity->EntIndex()])
{
bool Autowalled = false, HitSide1 = false, HitSide2 = false;
float angToLocal = g_Math.CalcAngle(Globals::LocalPlayer->GetOrigin(), pPlayerEntity->GetOrigin()).y;
Vector ViewPoint = Globals::LocalPlayer->GetOrigin() + Vector(0, 0, 90);
Vector2D Side1 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal))),(45 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
Vector2D Side2 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(45 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };
Vector2D Side3 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal))),(50 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
Vector2D Side4 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(50 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };
Vector Origin = pPlayerEntity->GetOrigin();
Vector2D OriginLeftRight[] = { Vector2D(Side1.x, Side1.y), Vector2D(Side2.x, Side2.y) };
Vector2D OriginLeftRightLocal[] = { Vector2D(Side3.x, Side3.y), Vector2D(Side4.x, Side4.y) };
for (int side = 0; side < 2; side++)
{
Vector OriginAutowall = { Origin.x + OriginLeftRight[side].x, Origin.y - OriginLeftRight[side].y , Origin.z + 90 };
Vector OriginAutowall2 = { ViewPoint.x + OriginLeftRightLocal[side].x, ViewPoint.y - OriginLeftRightLocal[side].y , ViewPoint.z };
if (g_Autowall.CanHitFloatingPoint(OriginAutowall, ViewPoint))
{
if (side == 0)
{
HitSide1 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = 90;
}
else if (side == 1)
{
HitSide2 = true;
FreestandAngle [pPlayerEntity-> EntIndex ()] = -90;
}
Autowalled = true;
}
else
{
for (int side222 = 0; side222 <2; side222 ++)
{
Vector OriginAutowall222 = {Origin.x + OriginLeftRight [side222] .x, Origin.y - OriginLeftRight [side222] .y, Origin.z + 90};
if (g_Autowall.CanHitFloatingPoint (OriginAutowall222, OriginAutowall2))
{
if (side222 == 0)
{
HitSide1 = true;
FreestandAngle [pPlayerEntity-> EntIndex ()] = 90;
}
else if (side222 == 1)
{
HitSide2 = true;
FreestandAngle[pPlayerEntity->EntIndex()] = -90;
}
Autowalled = true;
}
}
}
}
if (Autowalled)
{
if (HitSide1 && HitSide2)
UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
else
UseFreestandAngle[pPlayerEntity->EntIndex()] = true;
}
}
}
}