mirror of
https://github.com/rei-2/Amalgam.git
synced 2026-10-12 02:08:13 +08:00
fixes
This commit is contained in:
1 parent
8d8a2cdd0b
commit
ccb696a760
13 files changed
+40
-35
No files matched your search
@@ -699,16 +699,16 @@ void CAimbotHitscan::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pC
|
||||
const int nWeaponID = pWeapon->GetWeaponID();
|
||||
|
||||
static int iStaticAimType = Vars::Aimbot::General::AimType.Value;
|
||||
const int iRealAimType = Vars::Aimbot::General::AimType.Value;
|
||||
const int iLastAimType = iStaticAimType;
|
||||
iStaticAimType = iRealAimType;
|
||||
const int iRealAimType = Vars::Aimbot::General::AimType.Value;
|
||||
|
||||
switch (nWeaponID)
|
||||
{
|
||||
case TF_WEAPON_SNIPERRIFLE_CLASSIC:
|
||||
if (!iRealAimType && iLastAimType && G::Attacking)
|
||||
if (G::Attacking && !iRealAimType && iLastAimType)
|
||||
Vars::Aimbot::General::AimType.Value = iLastAimType;
|
||||
}
|
||||
iStaticAimType = Vars::Aimbot::General::AimType.Value;
|
||||
|
||||
if (F::AimbotGlobal.ShouldHoldAttack(pWeapon))
|
||||
pCmd->buttons |= IN_ATTACK;
|
||||
|
||||
@@ -422,11 +422,13 @@ void CAimbotMelee::Aim(CUserCmd* pCmd, Vec3& vAngle)
|
||||
|
||||
void CAimbotMelee::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd)
|
||||
{
|
||||
static int iAimType = 0;
|
||||
if (pWeapon->m_flSmackTime() < 0.f)
|
||||
iAimType = Vars::Aimbot::General::AimType.Value;
|
||||
else if (iAimType)
|
||||
Vars::Aimbot::General::AimType.Value = iAimType;
|
||||
static int iStaticAimType = Vars::Aimbot::General::AimType.Value;
|
||||
const int iLastAimType = iStaticAimType;
|
||||
const int iRealAimType = Vars::Aimbot::General::AimType.Value;
|
||||
|
||||
if (pWeapon->m_flSmackTime() > 0.f && !iRealAimType && iLastAimType)
|
||||
Vars::Aimbot::General::AimType.Value = iLastAimType;
|
||||
iStaticAimType = Vars::Aimbot::General::AimType.Value;
|
||||
|
||||
if (F::AimbotGlobal.ShouldHoldAttack(pWeapon))
|
||||
pCmd->buttons |= IN_ATTACK;
|
||||
|
||||
@@ -898,9 +898,14 @@ static inline void SolveProjectileSpeed(CTFWeaponBase* pWeapon, const Vec3& vLoc
|
||||
case Demoman_s_TheQuickiebombLauncher:
|
||||
case Demoman_s_TheScottishResistance: flDrag = Math::RemapVal(flVelocity, 922.f, k_flMaxVelocity, 0.085f, 0.190f); break; // 0.085 low, 0.190 capped, 0.230 v2400
|
||||
case Scout_s_TheFlyingGuillotine:
|
||||
case Scout_s_TheFlyingGuillotineG: flDrag = 0.31f; break;
|
||||
case Scout_s_TheFlyingGuillotineG: flDrag = 0.310f; break;
|
||||
case Scout_t_TheSandman: flDrag = 0.180f; break;
|
||||
case Scout_t_TheWrapAssassin: flDrag = 0.285f; break;
|
||||
case Scout_s_MadMilk:
|
||||
case Scout_s_MutatedMilk:
|
||||
case Sniper_s_Jarate:
|
||||
case Sniper_s_FestiveJarate:
|
||||
case Sniper_s_TheSelfAwareBeautyMark: flDrag = 0.057f; break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1712,22 +1717,21 @@ bool CAimbotProjectile::RunMain(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUser
|
||||
|
||||
static int iStaticAimType = Vars::Aimbot::General::AimType.Value;
|
||||
const int iLastAimType = iStaticAimType;
|
||||
const int iRealAimType = iStaticAimType = Vars::Aimbot::General::AimType.Value;
|
||||
const int iRealAimType = Vars::Aimbot::General::AimType.Value;
|
||||
|
||||
switch (nWeaponID)
|
||||
{
|
||||
case TF_WEAPON_COMPOUND_BOW:
|
||||
case TF_WEAPON_PIPEBOMBLAUNCHER:
|
||||
case TF_WEAPON_CANNON:
|
||||
if (!Vars::Aimbot::General::AutoShoot.Value && !iRealAimType && iLastAimType && G::Attacking)
|
||||
if (!Vars::Aimbot::General::AutoShoot.Value && G::Attacking && !iRealAimType && iLastAimType)
|
||||
Vars::Aimbot::General::AimType.Value = iLastAimType;
|
||||
break;
|
||||
default:
|
||||
if (G::Throwing && !iRealAimType && iLastAimType)
|
||||
Vars::Aimbot::General::AimType.Value = iLastAimType;
|
||||
}
|
||||
|
||||
static int iAimType = 0;
|
||||
if (!G::Throwing)
|
||||
iAimType = Vars::Aimbot::General::AimType.Value;
|
||||
else if (iAimType)
|
||||
Vars::Aimbot::General::AimType.Value = iAimType;
|
||||
iStaticAimType = Vars::Aimbot::General::AimType.Value;
|
||||
|
||||
if (F::AimbotGlobal.ShouldHoldAttack(pWeapon))
|
||||
pCmd->buttons |= IN_ATTACK;
|
||||
@@ -1883,14 +1887,6 @@ bool CAimbotProjectile::RunMain(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUser
|
||||
}
|
||||
}
|
||||
|
||||
switch (nWeaponID)
|
||||
{
|
||||
case TF_WEAPON_BAT_WOOD:
|
||||
case TF_WEAPON_BAT_GIFTWRAP:
|
||||
case TF_WEAPON_LUNCHBOX:
|
||||
if (iRealAimType && G::Throwing == 1)
|
||||
G::Attacking = 1;
|
||||
}
|
||||
Aim(pCmd, tTarget.m_vAngleTo);
|
||||
if (G::PSilentAngles)
|
||||
{
|
||||
|
||||
@@ -604,6 +604,7 @@ void CAutoHeal::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd)
|
||||
{
|
||||
m_mMedicCallers.clear();
|
||||
m_iResistType = -1;
|
||||
m_flDamagedTime = 0.f;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "../../../SDK/SDK.h"
|
||||
|
||||
#define DEBUG_VACCINATOR
|
||||
//#define DEBUG_VACCINATOR
|
||||
|
||||
class CAutoHeal
|
||||
{
|
||||
|
||||
@@ -94,7 +94,10 @@ static inline void GetBinds(int iParent, CTFPlayer* pLocal, CTFWeaponBase* pWeap
|
||||
}
|
||||
case BindEnum::WeaponType:
|
||||
{
|
||||
tBind.m_bActive = tBind.m_iInfo + 1 == int(SDK::GetWeaponType(pWeapon));
|
||||
if (tBind.m_iInfo != BindEnum::WeaponTypeEnum::Throwable)
|
||||
tBind.m_bActive = tBind.m_iInfo + 1 == int(SDK::GetWeaponType(pWeapon));
|
||||
else
|
||||
tBind.m_bActive = G::Throwing;
|
||||
if (tBind.m_bNot)
|
||||
tBind.m_bActive = !tBind.m_bActive;
|
||||
break;
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace BindEnum
|
||||
{
|
||||
Enum(Key, Hold, Toggle, DoubleClick)
|
||||
Enum(Class, Scout, Soldier, Pyro, Demoman, Heavy, Engineer, Medic, Sniper, Spy)
|
||||
Enum(WeaponType, Hitscan, Projectile, Melee)
|
||||
Enum(WeaponType, Hitscan, Projectile, Melee, Throwable)
|
||||
//Enum(ItemType, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth)
|
||||
}
|
||||
Enum(BindVisibility, Always, WhileActive, Hidden)
|
||||
|
||||
@@ -2494,7 +2494,7 @@ namespace ImGui
|
||||
{
|
||||
case BindEnum::Key: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 2); FDropdown("Behavior", &tBind.m_iInfo, { "Hold", "Toggle", "Double click" }, {}, FDropdownEnum::Right, 0, "None", &bHovered); break;
|
||||
case BindEnum::Class: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 8); FDropdown("Class", &tBind.m_iInfo, { "Scout", "Soldier", "Pyro", "Demoman", "Heavy", "Engineer", "Medic", "Sniper", "Spy" }, {}, FDropdownEnum::Right, 0, "None", &bHovered); break;
|
||||
case BindEnum::WeaponType: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 2); FDropdown("Weapon type", &tBind.m_iInfo, { "Hitscan", "Projectile", "Melee" }, {}, FDropdownEnum::Right, 0, "None", &bHovered); break;
|
||||
case BindEnum::WeaponType: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 3); FDropdown("Weapon type", &tBind.m_iInfo, { "Hitscan", "Projectile", "Melee", "Throwable" }, {}, FDropdownEnum::Right, 0, "None", &bHovered); break;
|
||||
case BindEnum::ItemSlot: tBind.m_iInfo = std::max(tBind.m_iInfo, 0); FDropdown("Item slot", &tBind.m_iInfo, { "1", "2", "3", "4", "5", "6", "7", "8", "9" }, {}, FDropdownEnum::Right, 0, "None", &bHovered); break;
|
||||
}
|
||||
bLastHovered = bLastHovered || bHovered;
|
||||
|
||||
@@ -2889,7 +2889,7 @@ void CMenu::MenuSettings(int iTab)
|
||||
{
|
||||
case BindEnum::Key: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 2); FDropdown("Behavior", &tBind.m_iInfo, { "Hold", "Toggle", "Double click" }, {}, FDropdownEnum::Right); break;
|
||||
case BindEnum::Class: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 8); FDropdown("Class", &tBind.m_iInfo, { "Scout", "Soldier", "Pyro", "Demoman", "Heavy", "Engineer", "Medic", "Sniper", "Spy" }, {}, FDropdownEnum::Right); break;
|
||||
case BindEnum::WeaponType: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 2); FDropdown("Weapon type", &tBind.m_iInfo, { "Hitscan", "Projectile", "Melee" }, {}, FDropdownEnum::Right); break;
|
||||
case BindEnum::WeaponType: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 3); FDropdown("Weapon type", &tBind.m_iInfo, { "Hitscan", "Projectile", "Melee", "Throwable" }, {}, FDropdownEnum::Right); break;
|
||||
case BindEnum::ItemSlot: tBind.m_iInfo = std::max(tBind.m_iInfo, 0); FDropdown("Item slot", &tBind.m_iInfo, { "1", "2", "3", "4", "5", "6", "7", "8", "9" }, {}, FDropdownEnum::Right); break;
|
||||
}
|
||||
} EndChild();
|
||||
@@ -2982,6 +2982,7 @@ void CMenu::MenuSettings(int iTab)
|
||||
case BindEnum::WeaponTypeEnum::Hitscan: { sInfo = "hitscan"; break; }
|
||||
case BindEnum::WeaponTypeEnum::Projectile: { sInfo = "projectile"; break; }
|
||||
case BindEnum::WeaponTypeEnum::Melee: { sInfo = "melee"; break; }
|
||||
case BindEnum::WeaponTypeEnum::Throwable: { sInfo = "throwable"; break; }
|
||||
}
|
||||
break;
|
||||
case BindEnum::ItemSlot:
|
||||
@@ -3880,6 +3881,7 @@ void CMenu::DrawBinds()
|
||||
case BindEnum::WeaponTypeEnum::Hitscan: { sInfo = "hitscan"; break; }
|
||||
case BindEnum::WeaponTypeEnum::Projectile: { sInfo = "projectile"; break; }
|
||||
case BindEnum::WeaponTypeEnum::Melee: { sInfo = "melee"; break; }
|
||||
case BindEnum::WeaponTypeEnum::Throwable: { sInfo = "throwable"; break; }
|
||||
}
|
||||
break;
|
||||
case BindEnum::ItemSlot:
|
||||
|
||||
@@ -299,7 +299,7 @@ void CGlow::SetupEnd(Glow_t glow, IMatRenderContext* pRenderContext, IMaterial*
|
||||
I::ModelRender->ForcedMaterialOverride(nullptr);
|
||||
}
|
||||
|
||||
void CGlow::DrawModel(CBaseEntity* pEntity, bool bModel)
|
||||
void CGlow::DrawModel(CBaseEntity* pEntity)
|
||||
{
|
||||
m_bRendering = true;
|
||||
|
||||
@@ -393,7 +393,7 @@ void CGlow::RenderMain()
|
||||
for (auto& tInfo : vInfo)
|
||||
{
|
||||
m_bExtra = tInfo.m_bExtra;
|
||||
DrawModel(tInfo.m_pEntity, true);
|
||||
DrawModel(tInfo.m_pEntity);
|
||||
m_bExtra = false;
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ void CGlow::RenderMain()
|
||||
I::RenderView->SetColorModulation(tInfo.m_cColor.r / 255.f, tInfo.m_cColor.g / 255.f, tInfo.m_cColor.b / 255.f);
|
||||
I::RenderView->SetBlend(tInfo.m_cColor.a / 255.f);
|
||||
m_bExtra = tInfo.m_bExtra;
|
||||
DrawModel(tInfo.m_pEntity, false);
|
||||
DrawModel(tInfo.m_pEntity);
|
||||
m_bExtra = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class CGlow
|
||||
void SetupMid(IMatRenderContext* pRenderContext, int w, int h);
|
||||
void SetupEnd(Glow_t glow, IMatRenderContext* pRenderContext, IMaterial* m_pMatBlurX, IMaterial* m_pMatBlurY, IMaterial* m_pMatHaloAddToScreen, int w, int h);
|
||||
|
||||
void DrawModel(CBaseEntity* pEntity, bool bModel = false);
|
||||
void DrawModel(CBaseEntity* pEntity);
|
||||
|
||||
void RenderBacktrack(const DrawModelState_t& pState, const ModelRenderInfo_t& pInfo);
|
||||
void RenderFakeAngle(const DrawModelState_t& pState, const ModelRenderInfo_t& pInfo);
|
||||
|
||||
@@ -446,6 +446,7 @@ void CVisuals::DrawDebugInfo(CTFPlayer* pLocal)
|
||||
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOPLEFT, std::format("CanSecondaryAttack: {} ([{:.3f} | {:.3f}] <= {:.3f})", G::CanSecondaryAttack, flSecondaryAttack, flAttack, flTime).c_str());
|
||||
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOPLEFT, std::format("Attack: {:.3f}, {:.3f}; {:.3f}", flTime - flPrimaryAttack, flTime - flSecondaryAttack, flTime - flAttack).c_str());
|
||||
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOPLEFT, std::format("Reload: {} ({} || {} != 0)", G::Reloading, pWeapon->m_bInReload(), pWeapon->m_iReloadMode()).c_str());
|
||||
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOPLEFT, std::format("Throw: {}, Smack: {}", G::Throwing, pWeapon->m_flSmackTime()).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -548,7 +548,7 @@ int SDK::IsAttacking(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, const CUserCmd*
|
||||
if (G::CanPrimaryAttack && pWeapon->HasPrimaryAmmoForShot() && pCmd->buttons & iAttack && iThrowTick == -5)
|
||||
iThrowTick = 12;
|
||||
if (iThrowTick > -5)
|
||||
G::Throwing = G::CanSecondaryAttack = true;
|
||||
G::Throwing = G::CanPrimaryAttack = true;
|
||||
if (iThrowTick > 1)
|
||||
G::Throwing = 2;
|
||||
return iThrowTick == 1;
|
||||
|
||||
Reference in new issue
Block a user