Вопрос Почему не работает Silent Aim?

Начинающий
Статус
Оффлайн
Регистрация
13 Июл 2022
Сообщения
8
Реакции[?]
0
Поинты[?]
0
Попробовал спастить сало аим с помощью соседних тем на форуме и сурса друга, в итоге когда появляются противники чит начинает стрелять в пол.
Код:
    while (IEntity* pEntity = pEntityIt->Next())
    {
        if (!pEntity) continue;

        if (!pRules->LegendSiftingOutMyTeam(pClient->LegendGetEntityId(), pActor->LegendGetEntityId()))
        {
            pWeapon->SetFiringPos(pEntity->GetBonePositionByName(pEntity, skCrypt("Bip01 Head")));
        }
        else
        {
            pWeapon->SetFiringPos(Vec3{ 0,0,0 });
        }
    }
Код:
    int GetBoneId(IEntity* pIEntity, string BoneName)
    {
        if (!pIEntity) return { ZERO };
        ICharacterInstance* pICharacterInstance = pIEntity->GetCharacter(0); if (!pICharacterInstance) return { ZERO };
        ISkeletonPose* pISkeletonPose = pICharacterInstance->GetISkeletonPose(); if (!pISkeletonPose) return { ZERO };
        return pISkeletonPose->GetJointIdByName(BoneName);
    }
    Vec3 GetBonePositionByName(IEntity* pIEntity, string BoneName)
    {
        Vec3 result = ZERO;
        ICharacterInstance* pICharacterInstance = pIEntity->GetCharacter(0); if (!pICharacterInstance) return { ZERO };
        ISkeletonPose* pISkeletonPose = pICharacterInstance->GetISkeletonPose(); if (!pISkeletonPose) return { ZERO };
        if (GetBoneId(pIEntity, BoneName) != -1)
        {
            Matrix34 mOut = pIEntity->GetEntityWorldTM() * Matrix34(pISkeletonPose->GetAbsJointByID(GetBoneId(pIEntity, BoneName)));
            result = mOut.GetTranslation();
        }
        return result;
    }
 
Начинающий
Статус
Оффлайн
Регистрация
13 Июл 2022
Сообщения
8
Реакции[?]
0
Поинты[?]
0
Нет проверки на актора и мёртвых.
Сделал вот так всё равно стреляет в пол
Код:
    while (IEntity* pEntity = pEntityIt->Next())
    {
        AABB aabb;
        pEntity->GetWorldBounds(aabb);
        LegendIActor* LegendActor = LegendNActorSystem->GetActor(pEntity->LegendGetEntityId());
        if (!pEntity) continue;
        if (!LegendActor) continue;
        if (LegendActor->LegendIsDead()) continue;

        if (LegendActor)
        {
            pWeapon->SetFiringPos(pEntity->GetBonePositionByName(pEntity, skCrypt("Bip01 Head")));
        }
        else
        {
            pWeapon->SetFiringPos(Vec3{ 0,0,0 });
        }
    }
    pEntityIt->Release();
}
}
 
Последнее редактирование:
Сверху Снизу