From d29273ef9c45dd3381eaa2f0e9bc0fd071587825 Mon Sep 17 00:00:00 2001 From: Cleverson Date: Fri, 9 Feb 2024 13:14:40 -0300 Subject: [PATCH] Fixed accuracy fix traceline and other functions and values --- AccuracyFix/AccuracyFix.cpp | 195 ++++++++------------- AccuracyFix/AccuracyFix.h | 17 +- AccuracyFix/AccuracyFix.vcxproj | 2 + AccuracyFix/AccuracyFix.vcxproj.filters | 9 + AccuracyFix/AccuracyUtil.cpp | 99 +++++++++++ AccuracyFix/AccuracyUtil.h | 16 ++ AccuracyFix/MetaDLL.cpp | 4 +- AccuracyFix/MetaDLL.h | 2 +- AccuracyFix/MetaMod.cpp | 2 +- AccuracyFix/ReGameDLL.cpp | 6 +- AccuracyFix/ReGameDLL.h | 2 +- AccuracyFix/precompiled.h | 5 +- cstrike/addons/accuracyfix/accuracyfix.cfg | 137 ++++++++------- 13 files changed, 282 insertions(+), 214 deletions(-) create mode 100644 AccuracyFix/AccuracyUtil.cpp create mode 100644 AccuracyFix/AccuracyUtil.h diff --git a/AccuracyFix/AccuracyFix.cpp b/AccuracyFix/AccuracyFix.cpp index 42b2830..af75148 100644 --- a/AccuracyFix/AccuracyFix.cpp +++ b/AccuracyFix/AccuracyFix.cpp @@ -4,15 +4,15 @@ CAccuracyFix gAccuracyFix; void CAccuracyFix::ServerActivate() { -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL - this->m_Data.clear(); + this->m_af_accuracy_all = gAccuracyUtil.CvarRegister("af_accuracy_all", "-1.0"); - this->m_af_recoil_all = this->CvarRegister("af_recoil_all", "-1.0"); -#endif + this->m_af_distance_all = gAccuracyUtil.CvarRegister("af_distance_all", "-1.0"); - this->m_af_accuracy_all = this->CvarRegister("af_accuracy_all", "-1.0"); +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL + this->m_Data.clear(); - this->m_af_distance_all = this->CvarRegister("af_distance_all", "-1.0"); + this->m_af_recoil_all = gAccuracyUtil.CvarRegister("af_recoil_all", "-1.0"); +#endif for (int WeaponID = WEAPON_P228; WeaponID <= WEAPON_P90; WeaponID++) { @@ -24,31 +24,37 @@ void CAccuracyFix::ServerActivate() { if (SlotInfo->weaponName) { - char cvarName[32] = { 0 }; + if (SlotInfo->weaponName[0u] != '\0') + { + std::string cvarName = "af_distance_"; - Q_snprintf(cvarName, sizeof(cvarName), "af_accuracy_%s", SlotInfo->weaponName); + cvarName.append(SlotInfo->weaponName); - this->m_af_accuracy[WeaponID] = this->CvarRegister(cvarName, "9999.0"); + this->m_af_distance[WeaponID] = gAccuracyUtil.CvarRegister(cvarName.c_str(), "8192.0"); -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL - Q_snprintf(cvarName, sizeof(cvarName), "af_recoil_%s", SlotInfo->weaponName); + cvarName = "af_accuracy_"; - this->m_af_recoil[WeaponID] = this->CvarRegister(cvarName, "1.0"); -#endif + cvarName.append(SlotInfo->weaponName); + + this->m_af_accuracy[WeaponID] = gAccuracyUtil.CvarRegister(cvarName.c_str(), "9999.0"); + +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL + cvarName = "af_recoil_"; - Q_snprintf(cvarName, sizeof(cvarName), "af_distance_%s", SlotInfo->weaponName); + cvarName.append(SlotInfo->weaponName); - this->m_af_distance[WeaponID] = this->CvarRegister(cvarName, "2048.0"); + this->m_af_recoil[WeaponID] = gAccuracyUtil.CvarRegister(cvarName.c_str(), "1.0"); +#endif + } } } } } - g_engfuncs.pfnServerCommand("exec addons/accuracyfix/accuracyfix.cfg\n"); - g_engfuncs.pfnServerExecute(); + gAccuracyUtil.ServerCommand("exec %s/accuracyfix.cfg", gAccuracyUtil.GetPath()); } -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL void CAccuracyFix::CmdEnd(const edict_t* pEdict) { auto Player = UTIL_PlayerByIndexSafe(ENTINDEX(pEdict)); @@ -65,61 +71,67 @@ void CAccuracyFix::CmdEnd(const edict_t* pEdict) void CAccuracyFix::TraceLine(const float* vStart, const float* vEnd, int fNoMonsters, edict_t* pentToSkip, TraceResult* ptr) { - auto EntityIndex = ENTINDEX(pentToSkip); - - if (EntityIndex > 0 && EntityIndex <= gpGlobals->maxClients) + if (fNoMonsters == dont_ignore_monsters) { - auto Player = UTIL_PlayerByIndexSafe(EntityIndex); - - if (Player) + if (!FNullEnt(pentToSkip)) { - if (Player->IsAlive()) + auto EntityIndex = g_engfuncs.pfnIndexOfEdict(pentToSkip); + + if (EntityIndex > 0 && EntityIndex <= gpGlobals->maxClients) { - if (fNoMonsters == dont_ignore_monsters) + auto Player = UTIL_PlayerByIndexSafe(EntityIndex); + + if (Player) { - if (Player->m_pActiveItem) + if (Player->IsAlive()) { - if (!((BIT(WEAPON_NONE) | BIT(WEAPON_HEGRENADE) | BIT(WEAPON_C4) | BIT(WEAPON_SMOKEGRENADE) | BIT(WEAPON_FLASHBANG) | BIT(WEAPON_KNIFE)) & BIT(Player->m_pActiveItem->m_iId))) + if (Player->m_pActiveItem) { -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL - if ((Player->edict()->v.button & IN_ATTACK) && (Player->m_flLastFired != this->m_Data[EntityIndex].LastFired)) + if ((Player->m_pActiveItem->iItemSlot() == PRIMARY_WEAPON_SLOT) || (Player->m_pActiveItem->iItemSlot() == PISTOL_SLOT)) { - this->m_Data[EntityIndex].LastFired = Player->m_flLastFired; +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL + if ((Player->edict()->v.button & IN_ATTACK) && (Player->m_flLastFired != this->m_Data[EntityIndex].LastFired)) + { + this->m_Data[EntityIndex].LastFired = Player->m_flLastFired; - this->m_Data[EntityIndex].WeaponId = Player->m_pActiveItem->m_iId; - } + this->m_Data[EntityIndex].WeaponId = Player->m_pActiveItem->m_iId; + } #endif - auto aimDistance = this->m_af_distance[Player->m_pActiveItem->m_iId]->value; + auto DistanceLimit = this->m_af_distance[Player->m_pActiveItem->m_iId]->value; - if (this->m_af_distance_all->value > 0) - { - aimDistance = this->m_af_distance_all->value; - } + if (this->m_af_distance_all->value > 0) + { + DistanceLimit = this->m_af_distance_all->value; + } - int TargetIndex = 0, HitBoxPlace = 0; - - if (this->GetUserAiming(pentToSkip, &TargetIndex, &HitBoxPlace, aimDistance) > 0.0f) - { - if (TargetIndex > 0 && TargetIndex <= gpGlobals->maxClients) + if (DistanceLimit > 0.0f) { - auto fwdVelocity = this->m_af_accuracy[Player->m_pActiveItem->m_iId]->value; - - if (this->m_af_accuracy_all->value > 0.0f) - { - fwdVelocity = this->m_af_accuracy_all->value; - } - - if (fwdVelocity > 0.0f) + auto trResult = gAccuracyUtil.GetUserAiming(pentToSkip, DistanceLimit); + + if (!FNullEnt(trResult.pHit)) { - g_engfuncs.pfnMakeVectors(pentToSkip->v.v_angle); + auto TargetIndex = ENTINDEX(trResult.pHit); + + if (TargetIndex > 0 && TargetIndex <= gpGlobals->maxClients) + { + auto fwdVelocity = this->m_af_accuracy[Player->m_pActiveItem->m_iId]->value; - Vector Result = Vector(0.0f, 0.0f, 0.0f); + if (this->m_af_accuracy_all->value > 0.0f) + { + fwdVelocity = this->m_af_accuracy_all->value; + } - Result[0] = (vStart[0] + (gpGlobals->v_forward[0] * fwdVelocity)); - Result[1] = (vStart[1] + (gpGlobals->v_forward[1] * fwdVelocity)); - Result[2] = (vStart[2] + (gpGlobals->v_forward[2] * fwdVelocity)); + g_engfuncs.pfnMakeVectors(pentToSkip->v.v_angle); - g_engfuncs.pfnTraceLine(vStart, Result, fNoMonsters, pentToSkip, ptr); + auto vEndRes = Vector + ( + (vStart[0] + (gpGlobals->v_forward[0] * fwdVelocity)), + (vStart[1] + (gpGlobals->v_forward[1] * fwdVelocity)), + (vStart[2] + (gpGlobals->v_forward[2] * fwdVelocity)) + ); + + g_engfuncs.pfnTraceLine(vStart, vEndRes, fNoMonsters, pentToSkip, ptr); + } } } } @@ -131,7 +143,7 @@ void CAccuracyFix::TraceLine(const float* vStart, const float* vEnd, int fNoMons } } -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL void CAccuracyFix::PostThink(CBasePlayer* Player) { if (Player->IsAlive()) @@ -161,70 +173,3 @@ void CAccuracyFix::PostThink(CBasePlayer* Player) } } #endif - -float CAccuracyFix::GetUserAiming(edict_t* pEdict, int* cpId, int* cpBody, float distance) -{ - float Result = 0.0f; - - if (!FNullEnt(pEdict)) - { - auto Entityindex = ENTINDEX(pEdict); - - if (Entityindex > 0 && Entityindex <= gpGlobals->maxClients) - { - Vector v_forward; - - Vector v_src = pEdict->v.origin + pEdict->v.view_ofs; - - g_engfuncs.pfnAngleVectors(pEdict->v.v_angle, v_forward, NULL, NULL); - - TraceResult trEnd; - - Vector v_dest = v_src + v_forward * distance; - - g_engfuncs.pfnTraceLine(v_src, v_dest, 0, pEdict, &trEnd); - - *cpId = FNullEnt(trEnd.pHit) ? 0 : ENTINDEX(trEnd.pHit); - - *cpBody = trEnd.iHitgroup; - - if (trEnd.flFraction < 1.0f) - { - Result = (trEnd.vecEndPos - v_src).Length(); - } - - return Result; - } - } - - *cpId = 0; - - *cpBody = 0; - - return Result; -} - -cvar_t* CAccuracyFix::CvarRegister(const char* Name, const char* Value) -{ - cvar_t* Pointer = g_engfuncs.pfnCVarGetPointer(Name); - - if (!Pointer) - { - this->m_Cvar[Name].name = Name; - - this->m_Cvar[Name].string = (char*)(Value); - - this->m_Cvar[Name].flags = (FCVAR_SERVER | FCVAR_SPONLY | FCVAR_UNLOGGED); - - g_engfuncs.pfnCVarRegister(&this->m_Cvar[Name]); - - Pointer = g_engfuncs.pfnCVarGetPointer(this->m_Cvar[Name].name); - - if (Pointer) - { - g_engfuncs.pfnCvar_DirectSet(Pointer, Value); - } - } - - return Pointer; -} diff --git a/AccuracyFix/AccuracyFix.h b/AccuracyFix/AccuracyFix.h index 37ca86a..54bec9d 100644 --- a/AccuracyFix/AccuracyFix.h +++ b/AccuracyFix/AccuracyFix.h @@ -1,6 +1,6 @@ #pragma once -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL typedef struct S_PLAYER_DATA { float LastFired; @@ -16,25 +16,20 @@ class CAccuracyFix void CmdEnd(const edict_t* pEdict); void TraceLine(const float* vStart, const float* vEnd, int fNoMonsters, edict_t* pentToSkip, TraceResult* ptr); void PostThink(CBasePlayer* Player); - float GetUserAiming(edict_t* edict, int* cpId, int* cpBody, float distance); - cvar_t* CvarRegister(const char* Name, const char* Value); private: -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL - std::map m_Data; -#endif - std::map m_Cvar; + cvar_t* m_af_distance_all; + std::array m_af_distance; cvar_t* m_af_accuracy_all; std::array m_af_accuracy; -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL + std::map m_Data; + cvar_t* m_af_recoil_all; std::array m_af_recoil; #endif; - - cvar_t* m_af_distance_all; - std::array m_af_distance; }; extern CAccuracyFix gAccuracyFix; \ No newline at end of file diff --git a/AccuracyFix/AccuracyFix.vcxproj b/AccuracyFix/AccuracyFix.vcxproj index a4c4368..fdba582 100644 --- a/AccuracyFix/AccuracyFix.vcxproj +++ b/AccuracyFix/AccuracyFix.vcxproj @@ -15,6 +15,7 @@ + @@ -27,6 +28,7 @@ + diff --git a/AccuracyFix/AccuracyFix.vcxproj.filters b/AccuracyFix/AccuracyFix.vcxproj.filters index 8ccac54..4bf6b14 100644 --- a/AccuracyFix/AccuracyFix.vcxproj.filters +++ b/AccuracyFix/AccuracyFix.vcxproj.filters @@ -25,6 +25,9 @@ {3a2f7dd5-133f-41d5-b627-5e16bbe5f958} + + {119d37cb-5db2-4d96-ae2b-a55ee606254c} + @@ -48,6 +51,9 @@ ReGameDLL + + AccuracyFix\AccuracyUtil + @@ -71,6 +77,9 @@ ReGameDLL + + AccuracyFix\AccuracyUtil + diff --git a/AccuracyFix/AccuracyUtil.cpp b/AccuracyFix/AccuracyUtil.cpp new file mode 100644 index 0000000..2662ba0 --- /dev/null +++ b/AccuracyFix/AccuracyUtil.cpp @@ -0,0 +1,99 @@ +#include "precompiled.h" + +CAccuracyUtil gAccuracyUtil; + +cvar_t* CAccuracyUtil::CvarRegister(const char* Name, const char* Value) +{ + cvar_t* CvarPointer = g_engfuncs.pfnCVarGetPointer(Name); + + if (CvarPointer == nullptr) + { + this->m_CvarData[Name].name = Name; + + this->m_CvarData[Name].string = (char*)(Value); + + this->m_CvarData[Name].flags = (FCVAR_SERVER | FCVAR_SPONLY | FCVAR_UNLOGGED); + + g_engfuncs.pfnCVarRegister(&this->m_CvarData[Name]); + + CvarPointer = g_engfuncs.pfnCVarGetPointer(this->m_CvarData[Name].name); + + if (CvarPointer != nullptr) + { + g_engfuncs.pfnCvar_DirectSet(CvarPointer, Value); + } + } + + return CvarPointer; +} + +const char* CAccuracyUtil::GetPath() +{ + if (this->m_Path.empty()) + { + std::string GameDir = gpMetaUtilFuncs->pfnGetGameInfo(&Plugin_info, GINFO_GAMEDIR); + + if (!GameDir.empty()) + { + this->m_Path = gpMetaUtilFuncs->pfnGetPluginPath(&Plugin_info); + + if (!this->m_Path.empty()) + { + this->m_Path.erase(0, GameDir.length() + 1U); + + std::replace(this->m_Path.begin(), this->m_Path.end(), (char)(92), (char)(47)); + + this->m_Path.erase(this->m_Path.find_last_of((char)(47)), this->m_Path.length()); + + while (std::count(this->m_Path.begin(), this->m_Path.end(), (char)(47)) > 1) + { + this->m_Path.erase(this->m_Path.find_last_of((char)(47)), this->m_Path.length()); + } + } + } + } + + return this->m_Path.c_str(); +} + +void CAccuracyUtil::ServerCommand(const char* Format, ...) +{ + char Command[255] = { 0 }; + + va_list argptr; + + va_start(argptr, Format); + + vsnprintf(Command, sizeof(Command), Format, argptr); + + va_end(argptr); + + Q_strncat(Command, "\n", 1); + + g_engfuncs.pfnServerCommand(Command); +} + +TraceResult CAccuracyUtil::GetUserAiming(edict_t* pEntity, float DistanceLimit) +{ + TraceResult Result = { }; + + if (!FNullEnt(pEntity)) + { + auto EntityIndex = g_engfuncs.pfnIndexOfEdict(pEntity); + + if (EntityIndex > 0 && EntityIndex <= gpGlobals->maxClients) + { + Vector v_forward; + + Vector v_src = pEntity->v.origin + pEntity->v.view_ofs; + + g_engfuncs.pfnAngleVectors(pEntity->v.v_angle, v_forward, NULL, NULL); + + Vector v_dest = v_src + v_forward * DistanceLimit; + + g_engfuncs.pfnTraceLine(v_src, v_dest, 0, pEntity, &Result); + } + } + + return Result; +} diff --git a/AccuracyFix/AccuracyUtil.h b/AccuracyFix/AccuracyUtil.h new file mode 100644 index 0000000..1eb2e3a --- /dev/null +++ b/AccuracyFix/AccuracyUtil.h @@ -0,0 +1,16 @@ +#pragma once + +class CAccuracyUtil +{ +public: + cvar_t* CvarRegister(const char* Name, const char* Value); + void ServerCommand(const char* Format, ...); + const char* GetPath(); + TraceResult GetUserAiming(edict_t* pEntity, float DistanceLimit); + +private: + std::map m_CvarData; + std::string m_Path; +}; + +extern CAccuracyUtil gAccuracyUtil; \ No newline at end of file diff --git a/AccuracyFix/MetaDLL.cpp b/AccuracyFix/MetaDLL.cpp index b9079a6..ddb198a 100644 --- a/AccuracyFix/MetaDLL.cpp +++ b/AccuracyFix/MetaDLL.cpp @@ -27,7 +27,7 @@ C_DLLEXPORT int GetEntityAPI2_Post(DLL_FUNCTIONS* pFunctionTable, int* interface // Register Functions Here // gDLL_FunctionTable_Post.pfnServerActivate = DLL_POST_ServerActivate; -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL gDLL_FunctionTable_Post.pfnCmdEnd = DLL_POST_CmdEnd; #endif @@ -43,7 +43,7 @@ void DLL_POST_ServerActivate(edict_t* pEdictList, int edictCount, int clientMax) RETURN_META(MRES_IGNORED); } -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL void DLL_POST_CmdEnd(const edict_t* pEdict) { gAccuracyFix.CmdEnd(pEdict); diff --git a/AccuracyFix/MetaDLL.h b/AccuracyFix/MetaDLL.h index 477cf60..b2afd49 100644 --- a/AccuracyFix/MetaDLL.h +++ b/AccuracyFix/MetaDLL.h @@ -5,7 +5,7 @@ #pragma region DLL_POST void DLL_POST_ServerActivate(edict_t* pEdictList, int edictCount, int clientMax); -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL void DLL_POST_CmdEnd(const edict_t* pEdict); #endif #pragma endregion \ No newline at end of file diff --git a/AccuracyFix/MetaMod.cpp b/AccuracyFix/MetaMod.cpp index 2dab2d1..2ec0b8c 100644 --- a/AccuracyFix/MetaMod.cpp +++ b/AccuracyFix/MetaMod.cpp @@ -4,7 +4,7 @@ plugin_info_t Plugin_info = { META_INTERFACE_VERSION, "Accuracy Fix", - "1.0.5", + "1.0.7", __DATE__, "SmileY", "https://pugbr.net", diff --git a/AccuracyFix/ReGameDLL.cpp b/AccuracyFix/ReGameDLL.cpp index 65fbe90..5e44955 100644 --- a/AccuracyFix/ReGameDLL.cpp +++ b/AccuracyFix/ReGameDLL.cpp @@ -77,7 +77,7 @@ bool ReGameDLL_Init() return false; } -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL g_ReGameHookchains->CBasePlayer_PostThink()->registerHook(ReGameDLL_CBasePlayer_PostThink); #endif @@ -86,7 +86,7 @@ bool ReGameDLL_Init() bool ReGameDLL_Stop() { -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL g_ReGameHookchains->CBasePlayer_PostThink()->unregisterHook(ReGameDLL_CBasePlayer_PostThink); #endif return true; @@ -107,7 +107,7 @@ CGameRules *ReGameDLL_InstallGameRules(IReGameHook_InstallGameRules *chain) return gamerules; } -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL void ReGameDLL_CBasePlayer_PostThink(IReGameHook_CBasePlayer_PostThink* chain, CBasePlayer* pthis) { chain->callNext(pthis); diff --git a/AccuracyFix/ReGameDLL.h b/AccuracyFix/ReGameDLL.h index 2242b14..3e1a95e 100644 --- a/AccuracyFix/ReGameDLL.h +++ b/AccuracyFix/ReGameDLL.h @@ -9,6 +9,6 @@ extern bool ReGameDLL_Init(); extern bool ReGameDLL_Stop(); CGameRules *ReGameDLL_InstallGameRules(IReGameHook_InstallGameRules* chain); -#ifndef ACCURACY_DISABLE_RECOIL_CONTROL +#ifdef ACCURACY_ENABLE_RECOIL_CONTROL void ReGameDLL_CBasePlayer_PostThink(IReGameHook_CBasePlayer_PostThink* chain, CBasePlayer* pthis); #endif \ No newline at end of file diff --git a/AccuracyFix/precompiled.h b/AccuracyFix/precompiled.h index 17c72a3..e3161cd 100644 --- a/AccuracyFix/precompiled.h +++ b/AccuracyFix/precompiled.h @@ -5,8 +5,8 @@ #define _CRT_SECURE_NO_WARNINGS #endif -// Disable Recoil Fix -// #define ACCURACY_DISABLE_RECOIL_CONTROL +// Emable +#define ACCURACY_ENABLE_RECOIL_CONTROL // If is not MSVC build #ifndef _WIN32 @@ -63,3 +63,4 @@ // Accuracy Fix #include "AccuracyFix.h" +#include "AccuracyUtil.h" diff --git a/cstrike/addons/accuracyfix/accuracyfix.cfg b/cstrike/addons/accuracyfix/accuracyfix.cfg index edca93c..c8e4c89 100644 --- a/cstrike/addons/accuracyfix/accuracyfix.cfg +++ b/cstrike/addons/accuracyfix/accuracyfix.cfg @@ -1,6 +1,47 @@ +// Aim distance check for all weapons +// If is set, it will replace all weapon variables +// The default aim distance check of an weapon is 8192.0 +// Set to -1.0 to disable and use individual weapon values +// +// Default "-1.0" +// +af_distance_all "-1.0" + +// Aim distance check of each weapon +// The default distance check aim is 8192.0 +// +// Default "8192.0" +// +af_distance_weapon_ak47 "8192.0" +af_distance_weapon_aug "8192.0" +af_distance_weapon_awp "8192.0" +af_distance_weapon_deagle "8192.0" +af_distance_weapon_elite "8192.0" +af_distance_weapon_famas "8192.0" +af_distance_weapon_fiveseven "8192.0" +af_distance_weapon_g3sg1 "8192.0" +af_distance_weapon_galil "8192.0" +af_distance_weapon_glock "8192.0" +af_distance_weapon_glock18 "8192.0" +af_distance_weapon_m249 "8192.0" +af_distance_weapon_m3 "1024.0" +af_distance_weapon_m4a1 "8192.0" +af_distance_weapon_mac10 "8192.0" +af_distance_weapon_mp5navy "8192.0" +af_distance_weapon_p228 "8192.0" +af_distance_weapon_p90 "8192.0" +af_distance_weapon_scout "8192.0" +af_distance_weapon_sg550 "8192.0" +af_distance_weapon_sg552 "8192.0" +af_distance_weapon_tmp "8192.0" +af_distance_weapon_ump45 "8192.0" +af_distance_weapon_usp "8192.0" +af_distance_weapon_xm1014 "1024.0" + + // Accuracy of all weapons // If is set, it will replace all weapon variables -// The default distance to fix trace line is 4096.0 +// The default distance to fix trace line is 8192.0 // Set to -1.0 to disable and use individual weapon values // // Default "-1.0" @@ -8,35 +49,35 @@ af_accuracy_all "-1.0" // Accuracy of each weapon -// The default distance to fix trace line is 4096.0 +// The default distance to fix trace line is 9999.0 // -// Default "4096.0" +// Default "9999.0" // -af_accuracy_weapon_ak47 "4096.0" -af_accuracy_weapon_aug "4096.0" -af_accuracy_weapon_awp "4096.0" -af_accuracy_weapon_deagle "4096.0" -af_accuracy_weapon_elite "4096.0" -af_accuracy_weapon_famas "4096.0" -af_accuracy_weapon_fiveseven "4096.0" -af_accuracy_weapon_g3sg1 "4096.0" -af_accuracy_weapon_galil "4096.0" -af_accuracy_weapon_glock "4096.0" -af_accuracy_weapon_glock18 "4096.0" -af_accuracy_weapon_m249 "4096.0" -af_accuracy_weapon_m3 "1024.0" -af_accuracy_weapon_m4a1 "4096.0" -af_accuracy_weapon_mac10 "4096.0" -af_accuracy_weapon_mp5navy "4096.0" -af_accuracy_weapon_p228 "4096.0" -af_accuracy_weapon_p90 "4096.0" -af_accuracy_weapon_scout "4096.0" -af_accuracy_weapon_sg550 "4096.0" -af_accuracy_weapon_sg552 "4096.0" -af_accuracy_weapon_tmp "4096.0" -af_accuracy_weapon_ump45 "4096.0" -af_accuracy_weapon_usp "4096.0" -af_accuracy_weapon_xm1014 "1024.0" +af_accuracy_weapon_ak47 "9999.0" +af_accuracy_weapon_aug "9999.0" +af_accuracy_weapon_awp "9999.0" +af_accuracy_weapon_deagle "9999.0" +af_accuracy_weapon_elite "9999.0" +af_accuracy_weapon_famas "9999.0" +af_accuracy_weapon_fiveseven "9999.0" +af_accuracy_weapon_g3sg1 "9999.0" +af_accuracy_weapon_galil "9999.0" +af_accuracy_weapon_glock "9999.0" +af_accuracy_weapon_glock18 "9999.0" +af_accuracy_weapon_m249 "9999.0" +af_accuracy_weapon_m3 "9999.0" +af_accuracy_weapon_m4a1 "9999.0" +af_accuracy_weapon_mac10 "9999.0" +af_accuracy_weapon_mp5navy "9999.0" +af_accuracy_weapon_p228 "9999.0" +af_accuracy_weapon_p90 "9999.0" +af_accuracy_weapon_scout "9999.0" +af_accuracy_weapon_sg550 "9999.0" +af_accuracy_weapon_sg552 "9999.0" +af_accuracy_weapon_tmp "9999.0" +af_accuracy_weapon_ump45 "9999.0" +af_accuracy_weapon_usp "9999.0" +af_accuracy_weapon_xm1014 "9999.0" // Recoil of all weapons // If is set, it will replace all weapon variables @@ -78,43 +119,3 @@ af_recoil_weapon_tmp "1.0" af_recoil_weapon_ump45 "1.0" af_recoil_weapon_usp "1.0" af_recoil_weapon_xm1014 "1.0" - -// Aim distance check for all weapons -// If is set, it will replace all weapon variables -// The default aim distance check of an weapon is 4096.0 -// Set to -1.0 to disable and use individual weapon values -// -// Default "-1.0" -// -af_distance_all "-1.0" - -// Aim distance check of each weapon -// The default distance check aim is 4096.0 -// -// Default "4096.0" -// -af_distance_weapon_ak47 "4096.0" -af_distance_weapon_aug "4096.0" -af_distance_weapon_awp "4096.0" -af_distance_weapon_deagle "4096.0" -af_distance_weapon_elite "4096.0" -af_distance_weapon_famas "4096.0" -af_distance_weapon_fiveseven "4096.0" -af_distance_weapon_g3sg1 "4096.0" -af_distance_weapon_galil "4096.0" -af_distance_weapon_glock "4096.0" -af_distance_weapon_glock18 "4096.0" -af_distance_weapon_m249 "4096.0" -af_distance_weapon_m3 "1024.0" -af_distance_weapon_m4a1 "4096.0" -af_distance_weapon_mac10 "4096.0" -af_distance_weapon_mp5navy "4096.0" -af_distance_weapon_p228 "4096.0" -af_distance_weapon_p90 "4096.0" -af_distance_weapon_scout "4096.0" -af_distance_weapon_sg550 "4096.0" -af_distance_weapon_sg552 "4096.0" -af_distance_weapon_tmp "4096.0" -af_distance_weapon_ump45 "4096.0" -af_distance_weapon_usp "4096.0" -af_distance_weapon_xm1014 "1024.0"