|
|
|
@ -81,12 +81,9 @@ void ProcessPlayer(Entity& LPlayer, Entity& target, uint64_t entitylist, int ind
|
|
|
|
|
|
|
|
|
|
if (!target.isAlive())
|
|
|
|
|
{
|
|
|
|
|
float localyaw = LPlayer.GetYaw();
|
|
|
|
|
float targetyaw = target.GetYaw();
|
|
|
|
|
|
|
|
|
|
if(localyaw==targetyaw)
|
|
|
|
|
if(target.Observing(LPlayer.ptr))
|
|
|
|
|
{
|
|
|
|
|
if(LPlayer.getTeamId() == entity_team)
|
|
|
|
|
if (LPlayer.getTeamId() == entity_team)
|
|
|
|
|
tmp_all_spec++;
|
|
|
|
|
else
|
|
|
|
|
tmp_spec++;
|
|
|
|
@ -141,7 +138,6 @@ void DoActions()
|
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
|
|
|
|
bool tmp_thirdperson = false;
|
|
|
|
|
bool tmp_chargerifle = false;
|
|
|
|
|
uint32_t counter = 0;
|
|
|
|
|
|
|
|
|
|
while (g_Base!=0 && c_Base!=0)
|
|
|
|
|
{
|
|
|
|
@ -254,22 +250,8 @@ void DoActions()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!spectators && !allied_spectators)
|
|
|
|
|
{
|
|
|
|
|
spectators = tmp_spec;
|
|
|
|
|
allied_spectators = tmp_all_spec;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//refresh spectators count every ~2 seconds
|
|
|
|
|
counter++;
|
|
|
|
|
if(counter==70)
|
|
|
|
|
{
|
|
|
|
|
spectators = tmp_spec;
|
|
|
|
|
allied_spectators = tmp_all_spec;
|
|
|
|
|
counter = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
spectators = tmp_spec;
|
|
|
|
|
allied_spectators = tmp_all_spec;
|
|
|
|
|
|
|
|
|
|
if(!lock)
|
|
|
|
|
aimentity = tmp_aimentity;
|
|
|
|
|