This repository has been archived by the owner on Nov 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 494
NoShoot Changes #739
Open
rennmaus25
wants to merge
1
commit into
AimTuxOfficial:master
Choose a base branch
from
rennmaus25:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+60
−11
Open
NoShoot Changes #739
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ static bool autoPistolEnabled = false; | |
static bool autoShootEnabled = false; | ||
static bool autoScopeEnabled = false; | ||
static bool noShootEnabled = false; | ||
static NoShootType noShootType = NoShootType::NOT_AT_ALL; | ||
static bool ignoreJumpEnabled = false; | ||
static bool smokeCheck = false; | ||
static bool flashCheck = false; | ||
|
@@ -68,6 +69,7 @@ void UI::ReloadWeaponSettings() | |
autoShootEnabled = Settings::Aimbot::weapons.at(index).autoShootEnabled; | ||
autoScopeEnabled = Settings::Aimbot::weapons.at(index).autoScopeEnabled; | ||
noShootEnabled = Settings::Aimbot::weapons.at(index).noShootEnabled; | ||
noShootType = Settings::Aimbot::weapons.at(index).noShootType; | ||
ignoreJumpEnabled = Settings::Aimbot::weapons.at(index).ignoreJumpEnabled; | ||
smokeCheck = Settings::Aimbot::weapons.at(index).smokeCheck; | ||
flashCheck = Settings::Aimbot::weapons.at(index).flashCheck; | ||
|
@@ -94,7 +96,7 @@ void UI::UpdateWeaponSettings() | |
autoAimEnabled, autoAimValue, aimStepEnabled, aimStepValue, | ||
rcsEnabled, rcsAlwaysOn, rcsAmountX, rcsAmountY, | ||
autoPistolEnabled, autoShootEnabled, autoScopeEnabled, | ||
noShootEnabled, ignoreJumpEnabled, smokeCheck, flashCheck, autoWallEnabled, autoWallValue, autoAimRealDistance, autoSlow, autoSlowMinDamage, predEnabled | ||
noShootEnabled,noShootType, ignoreJumpEnabled, smokeCheck, flashCheck, autoWallEnabled, autoWallValue, autoAimRealDistance, autoSlow, autoSlowMinDamage, predEnabled | ||
}; | ||
|
||
for (int bone = (int) Hitbox::HITBOX_HEAD; bone <= (int) Hitbox::HITBOX_ARMS; bone++) | ||
|
@@ -114,6 +116,7 @@ void Aimbot::RenderTab() | |
{ | ||
const char* targets[] = { "PELVIS", "", "", "HIP", "LOWER SPINE", "MIDDLE SPINE", "UPPER SPINE", "NECK", "HEAD" }; | ||
const char* smoothTypes[] = { "Slow Near End", "Constant Speed", "Fast Near End" }; | ||
const char* noShootTypes[] = { "None", "On target", "Spray" }; | ||
static char filterWeapons[32]; | ||
|
||
if (ImGui::Checkbox("Enabled", &enabled)) | ||
|
@@ -324,9 +327,6 @@ void Aimbot::RenderTab() | |
} | ||
ImGui::NextColumn(); | ||
{ | ||
if (ImGui::Checkbox("No Shoot", &noShootEnabled)) | ||
UI::UpdateWeaponSettings(); | ||
SetTooltip("Stops you shooting when locking to an enemy"); | ||
if (ImGui::Checkbox("Auto Scope", &autoScopeEnabled)) | ||
UI::UpdateWeaponSettings(); | ||
SetTooltip("Automatically scopes weapons that have them"); | ||
|
@@ -358,7 +358,13 @@ void Aimbot::RenderTab() | |
ImGui::PopItemWidth(); | ||
} | ||
} | ||
|
||
|
||
if (ImGui::Checkbox("No Shoot", &noShootEnabled)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct indentation |
||
UI::UpdateWeaponSettings(); | ||
SetTooltip("Stops you shooting when locking to an enemy"); | ||
if (ImGui::Combo("##NOSHOOTTYPE", (int*)& noShootType, noShootTypes, IM_ARRAYSIZE(noShootTypes))) | ||
UI::UpdateWeaponSettings(); | ||
|
||
ImGui::Columns(1); | ||
ImGui::Separator(); | ||
ImGui::Text("AutoWall"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ float Settings::Aimbot::RCS::valueX = 2.0f; | |
float Settings::Aimbot::RCS::valueY = 2.0f; | ||
bool Settings::Aimbot::AutoCrouch::enabled = false; | ||
bool Settings::Aimbot::NoShoot::enabled = false; | ||
NoShootType Settings::Aimbot::NoShoot::type = NoShootType::NOT_AT_ALL; | ||
bool Settings::Aimbot::IgnoreJump::enabled = false; | ||
bool Settings::Aimbot::SmokeCheck::enabled = false; | ||
bool Settings::Aimbot::FlashCheck::enabled = false; | ||
|
@@ -48,6 +49,8 @@ bool shouldAim; | |
QAngle AimStepLastAngle; | ||
QAngle RCSLastPunch; | ||
|
||
bool noshoot; | ||
|
||
std::unordered_map<Hitbox, std::vector<const char*>, Util::IntHash<Hitbox>> hitboxes = { | ||
{ Hitbox::HITBOX_HEAD, { "head_0" } }, | ||
{ Hitbox::HITBOX_NECK, { "neck_0" } }, | ||
|
@@ -58,7 +61,7 @@ std::unordered_map<Hitbox, std::vector<const char*>, Util::IntHash<Hitbox>> hitb | |
}; | ||
|
||
std::unordered_map<ItemDefinitionIndex, AimbotWeapon_t, Util::IntHash<ItemDefinitionIndex>> Settings::Aimbot::weapons = { | ||
{ ItemDefinitionIndex::INVALID, { false, false, false, Bone::BONE_HEAD, ButtonCode_t::MOUSE_MIDDLE, false, false, 1.0f, SmoothType::SLOW_END, false, 0.0f, false, 0.0f, true, 180.0f, false, 25.0f, false, false, 2.0f, 2.0f, false, false, false, false, false, false, false, false, 10.0f, false, false, false, 5.0f } }, | ||
{ ItemDefinitionIndex::INVALID, { false, false, false, Bone::BONE_HEAD, ButtonCode_t::MOUSE_MIDDLE, false, false, 1.0f, SmoothType::SLOW_END, false, 0.0f, false, 0.0f, true, 180.0f, false, 25.0f, false, false, 2.0f, 2.0f, false, false, false, false,NoShootType::NOT_AT_ALL, false, false, false, false, 10.0f, false, false, false, 5.0f } }, | ||
}; | ||
|
||
static const char* targets[] = { "pelvis", "", "", "spine_0", "spine_1", "spine_2", "spine_3", "neck_0", "head_0" }; | ||
|
@@ -479,7 +482,32 @@ void Aimbot::NoShoot(C_BaseCombatWeapon* activeWeapon, C_BasePlayer* player, CUs | |
{ | ||
if (*activeWeapon->GetItemDefinitionIndex() == ItemDefinitionIndex::WEAPON_C4) | ||
return; | ||
|
||
C_BasePlayer* localplayer = (C_BasePlayer*) entityList->GetClientEntity(engine->GetLocalPlayer()); | ||
Vector traceStart, traceEnd; | ||
trace_t tr; | ||
QAngle viewAngles; | ||
engine->GetViewAngles(viewAngles); | ||
QAngle viewAngles_rcs = viewAngles + *localplayer->GetAimPunchAngle() * 2.0f; | ||
Math::AngleVectors(viewAngles_rcs, traceEnd); | ||
traceStart = localplayer->GetEyePosition(); | ||
traceEnd = traceStart + (traceEnd * 8192.0f); | ||
Ray_t ray; | ||
ray.Init(traceStart, traceEnd); | ||
CTraceFilter traceFilter; | ||
traceFilter.pSkip = localplayer; | ||
trace->TraceRay(ray, 0x46004003, &traceFilter, &tr); | ||
C_BasePlayer* target = (C_BasePlayer*) tr.m_pEntityHit; | ||
//if the player your aiming at is the aimbot target you can shoot | ||
if(Settings::Aimbot::NoShoot::type == NoShootType::AFTER_FIRST_SHOT&&(target==player||noshoot)) | ||
{ | ||
noshoot=true; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spaces before and after operators |
||
return; | ||
} | ||
else if(Settings::Aimbot::NoShoot::type == NoShootType::IF_ON_TARGET &&target==player) | ||
return; | ||
|
||
|
||
|
||
if (*activeWeapon->GetItemDefinitionIndex() == ItemDefinitionIndex::WEAPON_REVOLVER) | ||
cmd->buttons &= ~IN_ATTACK2; | ||
else | ||
|
@@ -560,7 +588,8 @@ void Aimbot::CreateMove(CUserCmd* cmd) | |
} | ||
} | ||
} | ||
|
||
if(!player||!(cmd->buttons&IN_ATTACK)) | ||
noshoot=false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see above |
||
Aimbot::AimStep(player, angle, cmd); | ||
Aimbot::AutoCrouch(player, cmd); | ||
Aimbot::AutoSlow(player, oldForward, oldSideMove, bestDamage, activeWeapon, cmd); | ||
|
@@ -636,6 +665,7 @@ void Aimbot::UpdateValues() | |
Settings::Aimbot::RCS::valueX = currentWeaponSetting.rcsAmountX; | ||
Settings::Aimbot::RCS::valueY = currentWeaponSetting.rcsAmountY; | ||
Settings::Aimbot::NoShoot::enabled = currentWeaponSetting.noShootEnabled; | ||
Settings::Aimbot::NoShoot::type = currentWeaponSetting.noShootType; | ||
Settings::Aimbot::IgnoreJump::enabled = currentWeaponSetting.ignoreJumpEnabled; | ||
Settings::Aimbot::Smooth::Salting::enabled = currentWeaponSetting.smoothSaltEnabled; | ||
Settings::Aimbot::Smooth::Salting::multiplier = currentWeaponSetting.smoothSaltMultiplier; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
capitalize target