text: #pragma once
  #include "HookIncludes.h"
  
  
  namespace Globals
  {
      int TargetID;
  	int Shots;
  	int missedshots;
  	float RealAngle;
  	float FakeAngle;
  	Vector AimPoint;
  	bool shouldflip;
  	bool ySwitch;
  	float NextTime;
  	int resolvemode = 1;
  	float fakeAngle;
  	float OldSimulationTime[65];
  	bool error;
  }
  
  
  
  void Resolverr1()
  {
  
  		C_BaseEntity *pLocal = Interfaces::EntityList()->GetClientEntity(Interfaces::Engine()->GetLocalPlayer());
  		{
  			for (auto i = 0; i < Interfaces::EntityList()->GetHighestEntityIndex(); i++)
  			{
  				C_BaseEntity* pEnt = Interfaces::EntityList()->GetClientEntity(i);
  
  				if (!pEnt) continue;
  
  				if (pEnt == pLocal) continue;
  
  				if (pEnt->IsDormant()) continue;
  
  				PlayerInfo pTemp;
  
  				if (!Interfaces::Engine()->GetPlayerInfo(i, &pTemp))
  					continue;
  
  				if (pEnt->GetTeamNum() == pLocal->GetTeamNum()) continue;
  
  				auto FYaw = pEnt->GetLowerBodyYaw();
  				auto pitch = pEnt->GetEyeAngles()->x;
  
  				pEnt->GetEyeAngles()->y = FYaw;
  				float PlayerIsMoving = abs(pEnt->GetVelocity().Length2D());
  				bool bLowerBodyUpdated = false;
  				bool IsBreakingLBY = false;
  
  				bool isFakeHeading = false;
  
  				float oldLBY = pEnt->GetLowerBodyYaw();
  
  
  				if (oldLBY != pEnt->GetLowerBodyYaw())
  				{
  					bLowerBodyUpdated = true;
  				}
  				else
  				{
  					bLowerBodyUpdated = false;
  				}
  
  				if (pEnt->GetEyeAngles()->y - pEnt->GetLowerBodyYaw() > 35)
  				{
  					isFakeHeading = true;
  				}
  				else
  				{
  					isFakeHeading = false;
  				}
  
  				float bodyeyedelta = fabs(pEnt->GetEyeAngles()->y - pEnt->GetLowerBodyYaw());
  				if (PlayerIsMoving || bLowerBodyUpdated)// || LastUpdatedNetVars->eyeangles.x != CurrentNetVars->eyeangles.x || LastUpdatedNetVars->eyeyaw != CurrentNetVars->eyeangles.y)
  				{
  					Globals::resolvemode = 3;
  
  					pEnt->GetEyeAngles()->y = FYaw;
  					oldLBY = pEnt->GetEyeAngles()->y;
  
  					IsBreakingLBY = false;
  				}
  				else
  				{
  					Globals::resolvemode = 1;
  
  					if (bodyeyedelta == 0.f && pEnt->GetVelocity().Length2D() >= 0 && pEnt->GetVelocity().Length2D() < 36)
  					{
  						pEnt->GetEyeAngles()->y = oldLBY;
  						IsBreakingLBY = true;
  					}
  					else
  					{
  						IsBreakingLBY = false;
  					}
  				}
  
  				if (IsBreakingLBY)
  				{
  					Globals::resolvemode = 2;
  
  					pEnt->GetEyeAngles()->y = oldLBY;
  
  					switch (Globals::Shots % 3)
  					{
  					case 1: pEnt->GetEyeAngles()->y = 180; break;
  					case 2: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 180;
  					case 3: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + pEnt->GetEyeAngles()->y + rand() % 35;
  					}
  				}
  				else if (!IsBreakingLBY && !isFakeHeading)
  				{
  					Globals::resolvemode = 3;
  
  					pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw();
  
  					switch (Globals::Shots % 4)
  					{
  					case 1: pEnt->GetEyeAngles()->y = 45 + rand() % 180;
  					case 2: pEnt->GetEyeAngles()->y = oldLBY + rand() % 90;
  					case 3: pEnt->GetEyeAngles()->y = 180 + rand() % 90;
  					case 4: pEnt->GetEyeAngles()->y = oldLBY + pEnt->GetEyeAngles()->y + rand() % 45;
  					}
  				}
  				else if (isFakeHeading)
  				{
  					Globals::resolvemode = 2;
  
  					pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() - pEnt->GetEyeAngles()->y;
  
  					switch (Globals::Shots % 2)
  					{
  					case 1: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 90; break;
  					case 2: pEnt->GetEyeAngles()->y = pEnt->GetEyeAngles()->y + rand() % 360; break;
  					}
  				}
  				else if (Globals::Shots >= g_Options.Ragebot.bruteAfterX && g_Options.Ragebot.bruteAfterX != 0)
  				{
  					Globals::resolvemode = 2;
  
  					pEnt->GetEyeAngles()->y = 180;
  
  					switch (Globals::Shots % 4)
  					{
  					case 1: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw(); break;
  					case 2: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 90; break;
  					case 3: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 180; break;
  					case 4: pEnt->GetEyeAngles()->y = oldLBY + rand() % 45; break;
  					}
  				}
  				else
  				{
  					Globals::resolvemode = 1;
  
  					pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 180;
  
  					switch (Globals::Shots % 13)
  					{
  					case 1: pEnt->GetEyeAngles()->y = 180; break;
  					case 2: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 180;
  					case 3: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + pEnt->GetEyeAngles()->y + rand() % 35;
  					case 4: pEnt->GetEyeAngles()->y = 45 + rand() % 180;
  					case 5: pEnt->GetEyeAngles()->y = oldLBY + rand() % 90;
  					case 6: pEnt->GetEyeAngles()->y = 180 + rand() % 90;
  					case 7: pEnt->GetEyeAngles()->y = oldLBY + pEnt->GetEyeAngles()->y + rand() % 45;
  					case 8: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw(); break;
  					case 9: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 90; break;
  					case 10: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 180; break;
  					case 11: pEnt->GetEyeAngles()->y = oldLBY + rand() % 45; break;
  					case 12: pEnt->GetEyeAngles()->y = pEnt->GetLowerBodyYaw() + rand() % 90; break;
  					case 13: pEnt->GetEyeAngles()->y = pEnt->GetEyeAngles()->y + rand() % 360; break;
  					}
  				}
  			}
  		}
  	}
  