Crit hack is now a CV_KEY, not a CV_SWITCH.
This commit is contained in:
parent
d7c86c6ae9
commit
aaff2a3d8c
@ -15,15 +15,19 @@ std::unordered_map<int, int> command_number_mod {};
|
||||
|
||||
int* g_PredictionRandomSeed = nullptr;
|
||||
|
||||
bool CritKeyDown() {
|
||||
return g_IInputSystem->IsButtonDown(static_cast<ButtonCode_t>((int)hacks::shared::misc::crit_hack));
|
||||
}
|
||||
|
||||
bool AllowAttacking() {
|
||||
if (!(hacks::shared::misc::crit_hack || ((GetWeaponMode(LOCAL_E) == weapon_melee) && hacks::shared::misc::crit_melee)) && !hacks::shared::misc::crit_suppress) return true;
|
||||
if (!(CritKeyDown() || ((GetWeaponMode(LOCAL_E) == weapon_melee) && hacks::shared::misc::crit_melee)) && !hacks::shared::misc::crit_suppress) return true;
|
||||
bool crit = IsAttackACrit(g_pUserCmd);
|
||||
LoadSavedState();
|
||||
if (hacks::shared::misc::crit_suppress && !(hacks::shared::misc::crit_hack || ((GetWeaponMode(LOCAL_E) == weapon_melee) && hacks::shared::misc::crit_melee))) {
|
||||
if (hacks::shared::misc::crit_suppress && !(CritKeyDown() || ((GetWeaponMode(LOCAL_E) == weapon_melee) && hacks::shared::misc::crit_melee))) {
|
||||
if (crit && !IsPlayerCritBoosted(LOCAL_E)) {
|
||||
return false;
|
||||
}
|
||||
} else if ((hacks::shared::misc::crit_hack || ((GetWeaponMode(LOCAL_E) == weapon_melee) && hacks::shared::misc::crit_melee)) && RandomCrits() && WeaponCanCrit() && (g_pLocalPlayer->weapon()->m_iClassID != g_pClassID->CTFKnife)) {
|
||||
} else if ((CritKeyDown() || ((GetWeaponMode(LOCAL_E) == weapon_melee) && hacks::shared::misc::crit_melee)) && RandomCrits() && WeaponCanCrit() && (g_pLocalPlayer->weapon()->m_iClassID != g_pClassID->CTFKnife)) {
|
||||
if (!crit) return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -24,6 +24,7 @@ struct crithack_saved_state {
|
||||
void Load(IClientEntity* entity);
|
||||
};
|
||||
|
||||
bool CritKeyDown();
|
||||
bool AllowAttacking();
|
||||
bool RandomCrits();
|
||||
bool WeaponCanCrit();
|
||||
|
@ -219,7 +219,7 @@ void CreateMove() {
|
||||
|
||||
void Draw() {
|
||||
if (crit_info && CE_GOOD(LOCAL_W)) {
|
||||
if (crit_hack) {
|
||||
if (CritKeyDown()) {
|
||||
AddCenterString("FORCED CRITS!", colors::red);
|
||||
}
|
||||
if (TF2) {
|
||||
@ -319,7 +319,7 @@ void Schema_Reload() {
|
||||
CatVar debug_info(CV_SWITCH, "debug_info", "0", "Debug info", "Shows some debug info in-game");
|
||||
CatVar flashlight_spam(CV_SWITCH, "flashlight", "0", "Flashlight spam", "HL2DM flashlight spam");
|
||||
CatVar crit_info(CV_SWITCH, "crit_info", "0", "Show crit info"); // TODO separate
|
||||
CatVar crit_hack(CV_SWITCH, "crit_hack", "0", "Crithack");
|
||||
CatVar crit_hack(CV_KEY, "crit_hack", "0", "Crit Key");
|
||||
CatVar crit_melee(CV_SWITCH, "crit_melee", "0", "Melee crits");
|
||||
CatVar crit_suppress(CV_SWITCH, "crit_suppress", "0", "Disable random crits", "Can help saving crit bucket for forced crits");
|
||||
CatVar anti_afk(CV_SWITCH, "anti_afk", "0", "Anti-AFK", "Sends random commands to prevent being kicked from server");
|
||||
|
Reference in New Issue
Block a user