-
Автор темы
- #1
Как убрать учёт стен в аиме ???
Код:
void AIM() {
float LimDist = 1000.0f;
float GetHyp;
IActor* MePlayer = NULL;
IActor* Nearest = 0;
IGameFramework* pFrameWork = IGameFramework::GetGameFramework();
IEntitySystem* pEntSys = SSystemGlobalEnvironment::Singleton()->pEntitySystem;
IEntityIt* pEntIt = pEntSys->GetEntityIterator();
Vec3 ScreenPos{ 0,0,0 };
if (pFrameWork->GetClientActor(&MePlayer))
{
auto Iitem = MePlayer->GetCurrentItem();
if (Iitem) {
auto Weapon = Iitem->GetIWeapon();
if (Weapon) {
if (Fun.aimtype == 1) {
Iitem->SetFiringPos({ 0,0,0 });
}
if (MePlayer && pEntIt)
for (; IEntity * pEnt = pEntIt->Next(); )
{
if (IActor * LocPlayer = pFrameWork->GetIActorSystem()->GetActor(pEnt->GetID()))
{
auto WeaponName = Weapon->GetCurrentWeapon();
Vec3 EnemyPos = GetPlayerPos(pEnt);
Vec3 Out;
Vec3 bone = { 0,0,0 };
Vec3 MyBone = GetBonePositionByID(MePlayer->getIEntity(), 13);
if (MePlayer != LocPlayer) {
if (MyTeam(MePlayer, LocPlayer) && (!GetDeadPlayer(LocPlayer))) {
switch (Fun.bonetype) {
case 0: bone = GetBonePositionByID(pEnt, 13); break;
case 1: bone = GetBonePositionByID(pEnt, 1); break;
}
if (Fun.aim360 ? true : WorldToScreen({bone.x, bone.y, bone.z }, &Out)) {
if (Fun.AimAkt) {
if (strstr(pEnt->GetName(), _xor("Iron"))) bone = GetBonePositionByID(pEnt, 9);
if (strstr(pEnt->GetName(), _xor("Drone"))) bone = GetBonePositionByID(pEnt, 12);
if (strstr(pEnt->GetName(), _xor("TurretWall"))) bone = GetBonePositionByID(pEnt, 47);
if (strstr(pEnt->GetName(), _xor("TurretCeil"))) bone = GetBonePositionByID(pEnt, 78);
if (strstr(pEnt->GetName(), _xor("TurretFloor_ASR")) || strstr(pEnt->GetName(), _xor("Turret_ASR_Target"))) bone = GetBonePositionByID(pEnt, 62);
if (strstr(pEnt->GetName(), _xor("CQBHeavy"))) bone = GetBonePositionByID(pEnt, 13);
if (strstr(pEnt->GetName(), _xor("SMGHeavy"))) bone = GetBonePositionByID(pEnt, 13);
if (strstr(pEnt->GetName(), _xor("TurretFloor_cqb")) || strstr(pEnt->GetName(), _xor("TurretFloor_CQB")) || strstr(pEnt->GetName(), _xor("TurretHunt_CQB"))) bone = GetBonePositionByID(pEnt, 58);
if (strstr(pEnt->GetName(), _xor("TurretFloor_mg")) || strstr(pEnt->GetName(), _xor("TurretFloor_MG")) || strstr(pEnt->GetName(), _xor("TurretHunt_MG")) || strstr(pEnt->GetName(), _xor("TurretRail_mg")) || strstr(pEnt->GetName(), _xor("Turret_MG"))) bone = GetBonePositionByID(pEnt, 68);
if (strstr(pEnt->GetName(), _xor("HeavyTurretRail"))) bone = GetBonePositionByID(pEnt, 52);
if (strstr(pEnt->GetName(), _xor("SEDAssault"))) bone = GetBonePositionByID(pEnt, 60);
if (strstr(pEnt->GetName(), _xor("SEDSoldier"))) bone = GetBonePositionByID(pEnt, 58);
bone.z += 0.085f;
if (strstr(WeaponName, _xor("arl")) || strstr(WeaponName, _xor("kn")) || strstr(WeaponName, _xor("fg")) || strstr(WeaponName, _xor("sg")) || strstr(WeaponName, _xor("ap")) || strstr(WeaponName, _xor("mk")) || strstr(WeaponName, _xor("df")) || strstr(WeaponName, _xor("cm")) || strstr(WeaponName, _xor("ak")))
{
continue;
}
if (Fun.Shields) {
if (strstr(pEnt->GetName(), _xor("Shield")))continue;
}
if (Fun.sed) {
if (strstr(pEnt->GetName(), _xor("SED")))continue;
}
if (Fun.turret) {
if (strstr(pEnt->GetName(), _xor("Turret")))continue;
}
if (Fun.bosses) {
if ((strstr(pEnt->GetName(), _xor("mech2300")) ||
strstr(pEnt->GetName(), _xor("_Flagship_MainArtillery")) ||
strstr(pEnt->GetName(), _xor("_Flagship_Artillery")) ||
strstr(pEnt->GetName(), _xor("Black_Wolf")) ||
strstr(pEnt->GetName(), _xor("Mantis")) ||
strstr(pEnt->GetName(), _xor("Iron")) ||
strstr(pEnt->GetName(), _xor("Mech2300")) ||
strstr(pEnt->GetName(), _xor("Tank_Turret")) ||
strstr(pEnt->GetName(), _xor("_TurretAPC")) ||
strstr(pEnt->GetName(), _xor("_Turret_MG_OneShot")) ||
strstr(pEnt->GetName(), _xor("JP_Flamethrower")) ||
strstr(pEnt->GetName(), _xor("Helicopter"))))
continue;
}
if ((Fun.CounterAmmo == 0) || isVisible(bone, MyBone)) {
if (strstr(WeaponName, _xor("ar")) || strstr(WeaponName, _xor("mg")) || strstr(WeaponName, _xor("smg")) || (strstr(WeaponName, _xor("sr"))) || strstr(WeaponName, _xor("rg")) || strstr(WeaponName, _xor("pt")))
{
if (Fun.priority == 0) {
auto CrossLim = GetHypotenuse({ bone.x, bone.y, bone.z });
if (CrossLim < LimDist) {
switch (Fun.aimtype) {
case 0: AimType2(MePlayer, MyBone, { bone.x, bone.y, bone.z });
break;
case 1: Iitem->SetFiringPos({ bone.x, bone.y, bone.z });
break;
}
CrossLim = LimDist;
}
}
if (Fun.priority == 1) {
auto dist = Distance(MyBone, bone);
if (dist < LimDist) {
switch (Fun.aimtype) {
case 0: AimType2(MePlayer, MyBone, { bone.x, bone.y, bone.z });
break;
case 1: Iitem->SetFiringPos({ bone.x, bone.y, bone.z });
break;
}
Nearest = LocPlayer;
dist = LimDist;
}
}
}