get good, get zeus, for ever
-
Автор темы
- #1
конкретно на ботах аим убивает только некоторых с чем это связанно хз буду рад если ктото подскажет
Код:
void AIM() {
SSystemGlobalEnvironment* pSystemGlobalEnvironment = SSystemGlobalEnvironment::Singleton(); if (!pSystemGlobalEnvironment) return;
IGameFramework* pGameFramework = IGameFramework::Singleton(); if (!pGameFramework) return;
IActorSystem* pActorSystem = pGameFramework->GetActorSystem(); if (!pActorSystem) return;
IActor* pActor;
if (pGameFramework->GetClientActor(&pActor))
{
IItem* pItem = pActor->GetCurrentItem(0); if (!pItem) return;
IWeapon* pWeapon = pItem->GetIWeapon(); if (!pWeapon) return;
IEntityIt* pEntityIt = pSystemGlobalEnvironment->GetIEntitySystem()->GetEntityIterator();
if (pActor->IsDead())
return;
if (pActor && pEntityIt)
while (IEntity * pEntity = pEntityIt->Next())
{
IEntityProxy* pEntityProxy = pEntity->GetProxy(ENTITY_PROXY_RENDER); if (!pEntityProxy) continue;
if (IActor* tActor = pActorSystem->GetActor(pEntity->GetId()))
{
if (tActor->IsDead())
return;
if (IsMyTeam(tActor, pActor))
return;
if (pActor != tActor) {
Vec3 Out;
Vec3 ClientBone;
Vec3 EnemyBone = { 0,0,0 };
if (WorldToScreen(EnemyBone, Out))
{
EnemyBone = GetBonePositionByID(pEntity, 13);
ClientBone = GetBonePositionByID(pActor->m_pEntity, 13);
if (!IsVisible(EnemyBone))
{
EnemyBone.z += 0.090f;
pWeapon->SetFiringPos({ EnemyBone.x, EnemyBone.y, EnemyBone.z });
pWeapon->DefFire();
}
}
}
}
}
}
}