Migrations fix

This commit is contained in:
Stephen 2023-01-16 05:05:30 -05:00 committed by LightCat
parent 65cdba825e
commit 9f80a1c365
35 changed files with 883 additions and 895 deletions

View File

@ -48,7 +48,7 @@ var source = `
namespace client_classes { namespace client_classes {
std::unordered_map<std::string, int*> classid_mapping {}; boost::unordered_flat_map<std::string, int*> classid_mapping {};
dynamic::dynamic() { dynamic::dynamic() {
${POPULATED_MAP} ${POPULATED_MAP}

View File

@ -38,7 +38,7 @@ public:
class netvar_tree class netvar_tree
{ {
struct node; struct node;
using map_type = std::unordered_map<const char *, std::shared_ptr<node>, hash_char, equal_char>; using map_type = boost::unordered_flat_map<const char *, std::shared_ptr<node>, hash_char, equal_char>;
struct node struct node
{ {

View File

@ -17,20 +17,8 @@ namespace hacks::shared::aimbot
extern settings::Boolean ignore_cloak; extern settings::Boolean ignore_cloak;
extern unsigned last_target_ignore_timer; extern unsigned last_target_ignore_timer;
// Used to store aimbot data to prevent calculating it again // Used to store aimbot data to prevent calculating it again
struct AimbotCalculatedData_s
{
unsigned long predict_tick{ 0 };
bool predict_type{ 0 };
Vector aim_position{ 0 };
unsigned long vcheck_tick{ 0 };
bool visible{ false };
float fov{ 0 };
int hitbox{ 0 };
};
// Functions used to calculate aimbot data, and if already calculated use it // Functions used to calculate aimbot data, and if already calculated use it
Vector PredictEntity(CachedEntity *entity); Vector PredictEntity(CachedEntity *entity);
bool BacktrackVisCheck(CachedEntity *entity);
// Functions called by other functions for when certian game calls are run // Functions called by other functions for when certian game calls are run
void Reset(); void Reset();
@ -54,5 +42,4 @@ bool isHitboxMedium(int hitbox);
int ClosestHitbox(CachedEntity *target); int ClosestHitbox(CachedEntity *target);
void DoSlowAim(Vector &inputAngle); void DoSlowAim(Vector &inputAngle);
bool UpdateAimkey(); bool UpdateAimkey();
float EffectiveTargetingRange();
} // namespace hacks::shared::aimbot } // namespace hacks::shared::aimbot

View File

@ -19,7 +19,7 @@ struct brutedata
namespace hacks::shared::anti_anti_aim namespace hacks::shared::anti_anti_aim
{ {
extern std::unordered_map<unsigned, brutedata> resolver_map; extern boost::unordered_flat_map<unsigned, brutedata> resolver_map;
void increaseBruteNum(int idx); void increaseBruteNum(int idx);
void frameStageNotify(ClientFrameStage_t stage); void frameStageNotify(ClientFrameStage_t stage);
// void resolveEnt(int IDX, IClientEntity *entity = nullptr); // void resolveEnt(int IDX, IClientEntity *entity = nullptr);

View File

@ -15,7 +15,6 @@ namespace hacks::shared::esp
{ {
// Init // Init
void Init();
void Shutdown(); void Shutdown();
// Strings // Strings
void SetEntityColor(CachedEntity *entity, const rgba_t &color); void SetEntityColor(CachedEntity *entity, const rgba_t &color);

View File

@ -121,9 +121,9 @@ struct def_attribute_modifier
std::vector<attribute_s> modifiers{}; std::vector<attribute_s> modifiers{};
}; };
extern std::unordered_map<int, def_attribute_modifier> modifier_map; extern boost::unordered_flat_map<int, def_attribute_modifier> modifier_map;
extern patched_weapon_cookie cookie; extern patched_weapon_cookie cookie;
// extern std::unordered_map<int, patched_weapon_cookie> cookie_map; // extern boost::unordered_flat_map<int, patched_weapon_cookie> cookie_map;
def_attribute_modifier &GetModifier(int idx); def_attribute_modifier &GetModifier(int idx);
// patched_weapon_cookie& GetCookie(int idx); // patched_weapon_cookie& GetCookie(int idx);

View File

@ -26,7 +26,7 @@ struct ac_data
extern int amount[MAX_PLAYERS]; extern int amount[MAX_PLAYERS];
void ResetEverything(); void ResetEverything();
std::unordered_map<int, Vector> &player_orgs(); boost::unordered_flat_map<int, Vector> &player_orgs();
void ResetPlayer(int idx); void ResetPlayer(int idx);
void Init(); void Init();

View File

@ -97,9 +97,22 @@ void VectorAngles(Vector &forward, Vector &angles);
void AngleVectors2(const QAngle &angles, Vector *forward); void AngleVectors2(const QAngle &angles, Vector *forward);
void AngleVectors3(const QAngle &angles, Vector *forward, Vector *right, Vector *up); void AngleVectors3(const QAngle &angles, Vector *forward, Vector *right, Vector *up);
bool isRapidFire(IClientEntity *wep); bool isRapidFire(IClientEntity *wep);
void fClampAngle(Vector &qaAng);
inline Vector GetAimAtAngles(Vector origin, Vector target, CachedEntity *punch_correct = nullptr)
{
Vector angles, tr;
tr = (target - origin);
VectorAngles(tr, angles);
// Apply punchangle correction
if (punch_correct)
angles -= CE_VECTOR(punch_correct, netvar.vecPunchAngle);
fClampAngle(angles);
return angles;
}
extern std::mutex trace_lock; extern std::mutex trace_lock;
bool IsEntityVisible(CachedEntity *entity, int hb); bool IsEntityVisible(CachedEntity *entity, int hb);
bool IsEntityVectorVisible(CachedEntity *entity, Vector endpos, bool use_weapon_offset = false, unsigned int mask = MASK_SHOT_HULL, trace_t *trace = nullptr); bool IsEntityVectorVisible(CachedEntity *entity, Vector endpos, bool use_weapon_offset = false, unsigned int mask = MASK_SHOT_HULL, trace_t *trace = nullptr, bool hit = false);
bool VisCheckEntFromEnt(CachedEntity *startEnt, CachedEntity *endEnt); bool VisCheckEntFromEnt(CachedEntity *startEnt, CachedEntity *endEnt);
bool VisCheckEntFromEntVector(Vector startVector, CachedEntity *startEnt, CachedEntity *endEnt); bool VisCheckEntFromEntVector(Vector startVector, CachedEntity *startEnt, CachedEntity *endEnt);
Vector VischeckCorner(CachedEntity *player, CachedEntity *target, float maxdist, bool checkWalkable); Vector VischeckCorner(CachedEntity *player, CachedEntity *target, float maxdist, bool checkWalkable);
@ -112,14 +125,14 @@ bool LineIntersectsBox(Vector &bmin, Vector &bmax, Vector &lmin, Vector &lmax);
void GenerateBoxVertices(const Vector &vOrigin, const QAngle &angles, const Vector &vMins, const Vector &vMaxs, Vector pVerts[8]); void GenerateBoxVertices(const Vector &vOrigin, const QAngle &angles, const Vector &vMins, const Vector &vMaxs, Vector pVerts[8]);
float DistToSqr(CachedEntity *entity); float DistToSqr(CachedEntity *entity);
void fClampAngle(Vector &qaAng);
// const char* MakeInfoString(IClientEntity* player); // const char* MakeInfoString(IClientEntity* player);
bool GetProjectileData(CachedEntity *weapon, float &speed, float &gravity, float &start_velocity); bool GetProjectileData(CachedEntity *weapon, float &speed, float &gravity, float &start_velocity);
bool IsVectorVisible(Vector a, Vector b, bool enviroment_only = false, CachedEntity *self = LOCAL_E, unsigned int mask = MASK_SHOT_HULL); bool IsVectorVisible(Vector a, Vector b, bool enviroment_only = false, CachedEntity *self = LOCAL_E, unsigned int mask = MASK_SHOT_HULL);
// A Special function for navparser to check if a Vector is visible. // A Special function for navparser to check if a Vector is visible.
bool IsVectorVisibleNavigation(Vector a, Vector b, unsigned int mask = MASK_SHOT_HULL); bool IsVectorVisibleNavigation(Vector a, Vector b, unsigned int mask = MASK_SHOT_HULL);
float ProjGravMult(int class_id, float x_speed); float ProjGravMult(int class_id, float x_speed);
bool didProjectileHit(Vector start_point, Vector end_point, CachedEntity *entity, float projectile_size); bool didProjectileHit(Vector start_point, Vector end_point, CachedEntity *entity, float projectile_size, bool grav_comp);
Vector getShootPos(Vector angle); Vector getShootPos(Vector angle);
Vector GetForwardVector(Vector origin, Vector viewangles, float distance, CachedEntity *punch_entity = nullptr); Vector GetForwardVector(Vector origin, Vector viewangles, float distance, CachedEntity *punch_entity = nullptr);
Vector GetForwardVector(float distance, CachedEntity *punch_entity = nullptr); Vector GetForwardVector(float distance, CachedEntity *punch_entity = nullptr);
@ -162,18 +175,6 @@ void ChangeName(std::string name);
void WhatIAmLookingAt(int *result_eindex, Vector *result_pos); void WhatIAmLookingAt(int *result_eindex, Vector *result_pos);
inline Vector GetAimAtAngles(Vector origin, Vector target, CachedEntity *punch_correct = nullptr)
{
Vector angles, tr;
tr = (target - origin);
VectorAngles(tr, angles);
// Apply punchangle correction
if (punch_correct)
angles -= CE_VECTOR(punch_correct, netvar.vecPunchAngle);
fClampAngle(angles);
return angles;
}
void AimAt(Vector origin, Vector target, CUserCmd *cmd, bool compensate_punch = true); void AimAt(Vector origin, Vector target, CUserCmd *cmd, bool compensate_punch = true);
void FastStop(); void FastStop();
void AimAtHitbox(CachedEntity *ent, int hitbox, CUserCmd *cmd, bool compensate_punch = true); void AimAtHitbox(CachedEntity *ent, int hitbox, CUserCmd *cmd, bool compensate_punch = true);

View File

@ -159,8 +159,8 @@ public:
void RegisterItem(std::string modelpath, k_EItemType type); void RegisterItem(std::string modelpath, k_EItemType type);
k_EItemType GetItemType(CachedEntity *entity); k_EItemType GetItemType(CachedEntity *entity);
std::unordered_map<std::string, k_EItemType> models; boost::unordered_flat_map<std::string, k_EItemType> models;
std::unordered_map<uintptr_t, k_EItemType> map; boost::unordered_flat_map<uintptr_t, k_EItemType> map;
}; };
class ItemManager class ItemManager
@ -171,7 +171,7 @@ public:
void RegisterSpecialMapping(ItemCheckerFn fn, k_EItemType type); void RegisterSpecialMapping(ItemCheckerFn fn, k_EItemType type);
k_EItemType GetItemType(CachedEntity *ent); k_EItemType GetItemType(CachedEntity *ent);
std::unordered_map<ItemCheckerFn, k_EItemType> special_map; boost::unordered_flat_map<ItemCheckerFn, k_EItemType> special_map;
std::vector<ItemSpecialMapperFn> specials; std::vector<ItemSpecialMapperFn> specials;
ItemModelMapper mapper_special; ItemModelMapper mapper_special;
ItemModelMapper mapper; ItemModelMapper mapper;

View File

@ -1034,7 +1034,7 @@ public:
described below. described below.
@tparam ObjectType the container to store objects (e.g., `std::map` or @tparam ObjectType the container to store objects (e.g., `std::map` or
`std::unordered_map`) `boost::unordered_flat_map`)
@tparam StringType the type of the keys or names (e.g., `std::string`). @tparam StringType the type of the keys or names (e.g., `std::string`).
The comparison function `std::less<StringType>` is used to order elements The comparison function `std::less<StringType>` is used to order elements
inside the container. inside the container.
@ -1791,7 +1791,7 @@ public:
`unordered_multiset` with a `value_type` from which a @ref basic_json `unordered_multiset` with a `value_type` from which a @ref basic_json
value can be constructed. value can be constructed.
- **objects**: @ref object_t and all kinds of compatible associative - **objects**: @ref object_t and all kinds of compatible associative
containers such as `std::map`, `std::unordered_map`, `std::multimap`, containers such as `std::map`, `boost::unordered_flat_map`, `std::multimap`,
and `std::unordered_multimap` with a `key_type` compatible to and `std::unordered_multimap` with a `key_type` compatible to
@ref string_t and a `value_type` from which a @ref basic_json value can @ref string_t and a `value_type` from which a @ref basic_json value can
be constructed. be constructed.
@ -3003,7 +3003,7 @@ public:
to other types. There a few things to note: (1) Floating-point numbers can to other types. There a few things to note: (1) Floating-point numbers can
be converted to integers\, (2) A JSON array can be converted to a standard be converted to integers\, (2) A JSON array can be converted to a standard
`std::vector<short>`\, (3) A JSON object can be converted to C++ `std::vector<short>`\, (3) A JSON object can be converted to C++
associative containers such as `std::unordered_map<std::string\, associative containers such as `boost::unordered_flat_map<std::string\,
json>`.,get__ValueType_const} json>`.,get__ValueType_const}
@since version 2.1.0 @since version 2.1.0
@ -3222,7 +3222,7 @@ public:
to other types. There a few things to note: (1) Floating-point numbers can to other types. There a few things to note: (1) Floating-point numbers can
be converted to integers\, (2) A JSON array can be converted to a standard be converted to integers\, (2) A JSON array can be converted to a standard
`std::vector<short>`\, (3) A JSON object can be converted to C++ `std::vector<short>`\, (3) A JSON object can be converted to C++
associative containers such as `std::unordered_map<std::string\, associative containers such as `boost::unordered_flat_map<std::string\,
json>`.,operator__ValueType} json>`.,operator__ValueType}
@since version 1.0.0 @since version 1.0.0

View File

@ -47,7 +47,7 @@ struct userdata
unsigned kills{ 0 }; unsigned kills{ 0 };
}; };
extern std::unordered_map<unsigned, userdata> data; extern boost::unordered_flat_map<unsigned, userdata> data;
void Save(); void Save();
void Load(); void Load();

View File

@ -46,6 +46,6 @@ public:
void applyDefaults(); void applyDefaults();
IVariable *lookup(const std::string &string); IVariable *lookup(const std::string &string);
std::unordered_map<std::string, VariableDescriptor> registered{}; boost::unordered_flat_map<std::string, VariableDescriptor> registered{};
}; };
} // namespace settings } // namespace settings

View File

@ -86,6 +86,6 @@ public:
std::vector<std::unique_ptr<BaseMenuObject>> modal_stack{}; std::vector<std::unique_ptr<BaseMenuObject>> modal_stack{};
Tooltip tooltip{}; Tooltip tooltip{};
tinyxml2::XMLDocument xml_source{}; tinyxml2::XMLDocument xml_source{};
std::unordered_map<std::string, tinyxml2::XMLElement *> prefabs{}; boost::unordered_flat_map<std::string, tinyxml2::XMLElement *> prefabs{};
}; };
} // namespace zerokernel } // namespace zerokernel

View File

@ -21,7 +21,7 @@ static settings::Boolean taunting{ "player-tools.ignore.taunting", "true" };
static settings::Boolean hoovy{ "player-tools.ignore.hoovy", "true" }; static settings::Boolean hoovy{ "player-tools.ignore.hoovy", "true" };
static settings::Boolean ignoreCathook{ "player-tools.ignore.cathook", "true" }; static settings::Boolean ignoreCathook{ "player-tools.ignore.cathook", "true" };
static std::unordered_map<unsigned, unsigned> betrayal_list{}; static boost::unordered_flat_map<unsigned, unsigned> betrayal_list{};
static CatCommand forgive_all("pt_forgive_all", "Clear betrayal list", []() { betrayal_list.clear(); }); static CatCommand forgive_all("pt_forgive_all", "Clear betrayal list", []() { betrayal_list.clear(); });

View File

@ -6,7 +6,7 @@
namespace client_classes namespace client_classes
{ {
std::unordered_map<std::string, int *> classid_mapping{}; boost::unordered_flat_map<std::string, int *> classid_mapping{};
dynamic::dynamic() dynamic::dynamic()
{ {

View File

@ -5,7 +5,7 @@
#include "netadr.h" #include "netadr.h"
#include "AntiCheatBypass.hpp" #include "AntiCheatBypass.hpp"
std::unordered_map<int, int> command_number_mod{}; boost::unordered_flat_map<int, int> command_number_mod{};
namespace criticals namespace criticals
{ {

View File

@ -89,7 +89,16 @@ static settings::Float specfov("aimbot.spectator.fov", "0");
static settings::Int specslow("aimbot.spectator.slow", "0"); static settings::Int specslow("aimbot.spectator.slow", "0");
settings::Boolean engine_projpred{ "aimbot.debug.engine-pp", "1" }; settings::Boolean engine_projpred{ "aimbot.debug.engine-pp", "1" };
struct AimbotCalculatedData_s
{
unsigned long predict_tick{ 0 };
bool predict_type{ 0 };
Vector aim_position{ 0 };
unsigned long vcheck_tick{ 0 };
bool visible{ false };
float fov{ 0 };
int hitbox{ 0 };
} static cd;
int slow_aim; int slow_aim;
float fov; float fov;
bool enable; bool enable;
@ -115,6 +124,18 @@ float cur_proj_grav{ 0.0f };
float cur_proj_start_vel{ 0.0f }; float cur_proj_start_vel{ 0.0f };
bool shouldbacktrack_cache = false; bool shouldbacktrack_cache = false;
// Func to find value of how far to target ents
inline float EffectiveTargetingRange()
{
if (GetWeaponMode() == weapon_melee)
return (float) re::C_TFWeaponBaseMelee::GetSwingRange(RAW_ENT(LOCAL_W));
else if (LOCAL_W->m_iClassID() == CL_CLASS(CTFFlameThrower))
return 310.0f; // Pyros only have so much until their flames hit
else if (LOCAL_W->m_iClassID() == CL_CLASS(CTFWeaponFlameBall))
return 512.0f; // Dragons Fury is fast but short range
return (float) max_range;
}
inline bool isHitboxMedium(int hitbox) inline bool isHitboxMedium(int hitbox)
{ {
switch (hitbox) switch (hitbox)
@ -241,7 +262,6 @@ void spectatorUpdate()
} }
} }
#define GET_MIDDLE(c1, c2) (corners[c1] + corners[c2]) / 2.0f #define GET_MIDDLE(c1, c2) (corners[c1] + corners[c2]) / 2.0f
// Get all the valid aim positions // Get all the valid aim positions
@ -253,15 +273,11 @@ std::vector<Vector> getValidHitpoints(CachedEntity *ent, int hitbox)
trace_t trace; trace_t trace;
if (IsEntityVectorVisible(ent, hb->center, true, MASK_SHOT_HULL, &trace)) if (IsEntityVectorVisible(ent, hb->center, true, MASK_SHOT_HULL, &trace, true))
{ {
if (trace.hitbox == hitbox) if (trace.hitbox == hitbox)
hitpoints.push_back(hb->center); hitpoints.push_back(hb->center);
} }
if (!*multipoint)
return hitpoints;
// Multipoint // Multipoint
auto bboxmin = hb->bbox->bbmin; auto bboxmin = hb->bbox->bbmin;
auto bboxmax = hb->bbox->bbmax; auto bboxmax = hb->bbox->bbmax;
@ -302,7 +318,7 @@ std::vector<Vector> getValidHitpoints(CachedEntity *ent, int hitbox)
{ {
trace_t trace; trace_t trace;
if (IsEntityVectorVisible(ent, positions[i], true, MASK_SHOT_HULL, &trace)) if (IsEntityVectorVisible(ent, positions[i], true, MASK_SHOT_HULL, &trace, true))
{ {
if (trace.hitbox == hitbox) if (trace.hitbox == hitbox)
hitpoints.push_back(positions[i]); hitpoints.push_back(positions[i]);
@ -315,10 +331,14 @@ std::vector<Vector> getValidHitpoints(CachedEntity *ent, int hitbox)
return hitpoints; return hitpoints;
} }
int i = 0; int i = 0;
while (hitpoints.empty() && i <= 17) // Prevents returning empty at all costs. Loops through every hitbox const u_int8_t max_box = ent->hitboxes.GetNumHitboxes();
while (hitpoints.empty() && i < max_box ) // Prevents returning empty at all costs. Loops through every hitbox
{ {
if (hitbox == i) if (hitbox == i)
{
++i; ++i;
continue;
}
hitpoints = getHitpointsVischeck(ent, i); hitpoints = getHitpointsVischeck(ent, i);
++i; ++i;
} }
@ -330,11 +350,6 @@ std::vector<Vector> getHitpointsVischeck(CachedEntity *ent, int hitbox)
{ {
std::vector<Vector> hitpoints; std::vector<Vector> hitpoints;
auto hb = ent->hitboxes.GetHitbox(hitbox); auto hb = ent->hitboxes.GetHitbox(hitbox);
if (!*multipoint)
{
hitpoints.push_back(hb->center);
return hitpoints;
}
auto bboxmin = hb->bbox->bbmin; auto bboxmin = hb->bbox->bbmin;
auto bboxmax = hb->bbox->bbmax; auto bboxmax = hb->bbox->bbmax;
@ -374,7 +389,7 @@ std::vector<Vector> getHitpointsVischeck(CachedEntity *ent, int hitbox)
{ {
trace_t trace; trace_t trace;
if (IsEntityVectorVisible(ent, positions[i], true, MASK_SHOT_HULL, &trace)) if (IsEntityVectorVisible(ent, positions[i], true, MASK_SHOT_HULL, &trace, true))
{ {
if (trace.hitbox == hitbox) if (trace.hitbox == hitbox)
hitpoints.push_back(positions[i]); hitpoints.push_back(positions[i]);
@ -390,7 +405,7 @@ std::optional<Vector> getBestHitpoint(CachedEntity *ent, int hitbox)
std::optional<Vector> best_pos = std::nullopt; std::optional<Vector> best_pos = std::nullopt;
float max_score = FLT_MAX; float max_score = FLT_MAX;
for (auto &position : positions) for (auto const &position : positions)
{ {
float score = GetFov(g_pLocalPlayer->v_OrigViewangles, g_pLocalPlayer->v_Eye, position); float score = GetFov(g_pLocalPlayer->v_OrigViewangles, g_pLocalPlayer->v_Eye, position);
if (score < max_score) if (score < max_score)
@ -403,10 +418,6 @@ std::optional<Vector> getBestHitpoint(CachedEntity *ent, int hitbox)
return best_pos; return best_pos;
} }
// Reduce Backtrack lag by checking if the ticks hitboxes are within a reasonable FOV range // Reduce Backtrack lag by checking if the ticks hitboxes are within a reasonable FOV range
bool validateTickFOV(tf2::backtrack::BacktrackData &tick) bool validateTickFOV(tf2::backtrack::BacktrackData &tick)
{ {
@ -428,7 +439,6 @@ bool validateTickFOV(tf2::backtrack::BacktrackData &tick)
return true; return true;
} }
void doAutoZoom(bool target_found) void doAutoZoom(bool target_found)
{ {
bool isIdle = target_found ? false : hacks::shared::followbot::isIdle(); bool isIdle = target_found ? false : hacks::shared::followbot::isIdle();
@ -466,7 +476,7 @@ void doAutoZoom(bool target_found)
CachedEntity *target_last = 0; CachedEntity *target_last = 0;
bool aimed_this_tick = false; bool aimed_this_tick = false;
Vector viewangles_this_tick(0.0f); Vector viewangles_this_tick(0.0f);
AimbotCalculatedData_s cd;
// If slow aimbot allows autoshoot // If slow aimbot allows autoshoot
bool slow_can_shoot = false; bool slow_can_shoot = false;
bool projectileAimbotRequired; bool projectileAimbotRequired;
@ -1014,7 +1024,7 @@ bool IsTargetStateGood(CachedEntity *entity)
cd.hitbox = BestHitbox(entity); cd.hitbox = BestHitbox(entity);
if (*vischeck_hitboxes && !*multipoint && is_player) if (*vischeck_hitboxes && !*multipoint && is_player)
{ {
if (*vischeck_hitboxes == 1 && playerlist::AccessData(entity).state != playerlist::k_EState::RAGE) if (*vischeck_hitboxes == 1 && playerlist::AccessData(entity).state != playerlist::k_EState::RAGE || (projectileAimbotRequired && 0.01f < cur_proj_grav) )
{ {
return true; return true;
} }
@ -1024,17 +1034,22 @@ bool IsTargetStateGood(CachedEntity *entity)
int i = 0; int i = 0;
trace_t first_tracer; trace_t first_tracer;
if (IsEntityVectorVisible(entity, entity->hitboxes.GetHitbox(cd.hitbox)->center, true, MASK_SHOT_HULL, &first_tracer)) if (IsEntityVectorVisible(entity, entity->hitboxes.GetHitbox(cd.hitbox)->center, true, MASK_SHOT_HULL, &first_tracer, true))
return true; return true;
while (i <= 17) // Prevents returning empty at all costs. Loops through every hitbox
const u_int8_t max_box = entity->hitboxes.GetNumHitboxes();
while (i < max_box) // Prevents returning empty at all costs. Loops through every hitbox
{
if (i == cd.hitbox)
{ {
if (i == cd.hitbox && i != 17)
++i; ++i;
continue;
}
trace_t test_trace; trace_t test_trace;
std::vector<Vector> centered_hitbox = getHitpointsVischeck(entity, i); Vector centered_hitbox = entity->hitboxes.GetHitbox(i)->center;
if (IsEntityVectorVisible(entity, centered_hitbox[0], true, MASK_SHOT_HULL, &test_trace)) if (IsEntityVectorVisible(entity, centered_hitbox, true, MASK_SHOT_HULL, &test_trace, true))
{ {
cd.hitbox = i; cd.hitbox = i;
return true; return true;
@ -1162,19 +1177,14 @@ bool Aim(CachedEntity *entity)
// Get angles from eye to target // Get angles from eye to target
Vector is_it_good = PredictEntity(entity); Vector is_it_good = PredictEntity(entity);
if (!projectileAimbotRequired) if (!projectileAimbotRequired)
{ if (!IsEntityVectorVisible(entity, is_it_good, true, MASK_SHOT_HULL, nullptr, true))
if (!IsEntityVectorVisible(entity, is_it_good, false))
return false; return false;
}
Vector angles = GetAimAtAngles(g_pLocalPlayer->v_Eye, is_it_good, LOCAL_E); Vector angles = GetAimAtAngles(g_pLocalPlayer->v_Eye, is_it_good, LOCAL_E);
if (projectileAimbotRequired) // unfortunately you have to check this twice, otherwise you'd have to run GetAimAtAngles far too early if (projectileAimbotRequired) // unfortunately you have to check this twice, otherwise you'd have to run GetAimAtAngles far too early
{ if (!didProjectileHit(getShootPos(angles), is_it_good, entity, projectileHitboxSize(LOCAL_W->m_iClassID()), (0.01f < cur_proj_grav)))
if (!didProjectileHit(getShootPos(angles), is_it_good, entity, projectileHitboxSize(LOCAL_W->m_iClassID())))
return false; return false;
}
if (fov > 0 && cd.fov > fov) if (fov > 0 && cd.fov > fov)
return false; return false;
// Slow aim // Slow aim
@ -1183,9 +1193,7 @@ bool Aim(CachedEntity *entity)
#if ENABLE_VISUALS #if ENABLE_VISUALS
if (entity->m_Type() == ENTITY_PLAYER) if (entity->m_Type() == ENTITY_PLAYER)
{
hacks::shared::esp::SetEntityColor(entity, colors::target); hacks::shared::esp::SetEntityColor(entity, colors::target);
}
#endif #endif
// Set angles // Set angles
current_user_cmd->viewangles = angles; current_user_cmd->viewangles = angles;
@ -1335,11 +1343,15 @@ Vector PredictEntity(CachedEntity *entity)
else else
{ {
// Allow multipoint logic to run // Allow multipoint logic to run
if (!*multipoint)
{
result = entity->hitboxes.GetHitbox(cd.hitbox)->center;
break;
}
std::optional<Vector> best_pos = getBestHitpoint(entity, cd.hitbox); std::optional<Vector> best_pos = getBestHitpoint(entity, cd.hitbox);
if (best_pos) if (best_pos)
result = *best_pos; result = *best_pos;
else
GetHitbox(entity, cd.hitbox, result);
} }
} }
break; break;
@ -1471,7 +1483,6 @@ int autoHitbox(CachedEntity *target)
return preferred; return preferred;
} }
// Function to find the closesnt hitbox to the crosshair for a given ent // Function to find the closesnt hitbox to the crosshair for a given ent
int ClosestHitbox(CachedEntity *target) int ClosestHitbox(CachedEntity *target)
{ {
@ -1574,19 +1585,6 @@ bool UpdateAimkey()
return allow_aimkey; return allow_aimkey;
} }
// Func to find value of how far to target ents
float EffectiveTargetingRange()
{
if (GetWeaponMode() == weapon_melee)
return (float) re::C_TFWeaponBaseMelee::GetSwingRange(RAW_ENT(LOCAL_W));
else if (LOCAL_W->m_iClassID() == CL_CLASS(CTFFlameThrower))
return 310.0f; // Pyros only have so much until their flames hit
else if (LOCAL_W->m_iClassID() == CL_CLASS(CTFWeaponFlameBall))
return 512.0f; // Dragons Fury is fast but short range
return (float) max_range;
}
// Used mostly by navbot to not accidentally look at path when aiming // Used mostly by navbot to not accidentally look at path when aiming
bool isAiming() bool isAiming()
{ {

View File

@ -11,7 +11,7 @@ namespace hacks::shared::anti_anti_aim
static settings::Boolean enable{ "anti-anti-aim.enable", "false" }; static settings::Boolean enable{ "anti-anti-aim.enable", "false" };
static settings::Boolean debug{ "anti-anti-aim.debug.enable", "false" }; static settings::Boolean debug{ "anti-anti-aim.debug.enable", "false" };
std::unordered_map<unsigned, brutedata> resolver_map; boost::unordered_flat_map<unsigned, brutedata> resolver_map;
std::array<CachedEntity *, 32> sniperdot_array; std::array<CachedEntity *, 32> sniperdot_array;
static inline void modifyAngles() static inline void modifyAngles()

View File

@ -62,7 +62,7 @@ struct AchivementItem
}; };
// A map that allows us to map item ids to achievement names and achievement ids // A map that allows us to map item ids to achievement names and achievement ids
static std::unordered_map<int /*item_id*/, AchivementItem> ach_items; static boost::unordered_flat_map<int /*item_id*/, AchivementItem> ach_items;
static std::array<std::vector<std::string>, 3> craft_groups; static std::array<std::vector<std::string>, 3> craft_groups;
bool checkAchMgr() bool checkAchMgr()

View File

@ -65,7 +65,7 @@ struct catbot_user_state
int treacherous_kills{ 0 }; int treacherous_kills{ 0 };
}; };
static std::unordered_map<unsigned, catbot_user_state> human_detecting_map{}; static boost::unordered_flat_map<unsigned, catbot_user_state> human_detecting_map{};
int globerr(const char *path, int eerrno) int globerr(const char *path, int eerrno)
{ {

View File

@ -50,7 +50,7 @@ private:
std::vector<std::string> commands; std::vector<std::string> commands;
}; };
static std::unordered_map<std::string, ChatCommand> commands; static boost::unordered_flat_map<std::string, ChatCommand> commands;
void handleChatMessage(std::string message, int senderid) void handleChatMessage(std::string message, int senderid)
{ {

View File

@ -19,7 +19,7 @@ struct CritsayStorage
std::string message{}; std::string message{};
}; };
static std::unordered_map<int, CritsayStorage> critsay_storage{}; static boost::unordered_flat_map<int, CritsayStorage> critsay_storage{};
// Thanks HellJustFroze for linking me http://daviseford.com/shittalk/ // Thanks HellJustFroze for linking me http://daviseford.com/shittalk/
const std::vector<std::string> builtin_default = { "Woops, i slipped", "*critical hit* -> %name%", "ok now let's do it again, %name%", "nice" }; const std::vector<std::string> builtin_default = { "Woops, i slipped", "*critical hit* -> %name%", "ok now let's do it again, %name%", "nice" };

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@ struct KillsayStorage
std::string message{}; std::string message{};
}; };
static std::unordered_map<int, KillsayStorage> killsay_storage{}; static boost::unordered_flat_map<int, KillsayStorage> killsay_storage{};
// Thanks HellJustFroze for linking me http://daviseford.com/shittalk/ // Thanks HellJustFroze for linking me http://daviseford.com/shittalk/
const std::vector<std::string> builtin_default = { "Don't worry guys, I'm a garbage collector. I'm used to carrying trash.", "%name% is the human equivalent of a participation award.", "I would insult %name%, but nature did a better job.", "%name%, perhaps your strategy should include trying.", "Some people get paid to suck, you do it for free, %name%.", "You must really like that respawn timer, %name%.", "If your main is %class%, you should give up.", "Hey %name%, i see you can't play %class%. Try quitting the game.", "%name%@gmail.com to vacreview@valvesoftware.com\nFOUND CHEATER", "\n☐ Not rekt\n ☑ Rekt\n ☑ Really Rekt\n ☑ Tyrannosaurus Rekt" }; const std::vector<std::string> builtin_default = { "Don't worry guys, I'm a garbage collector. I'm used to carrying trash.", "%name% is the human equivalent of a participation award.", "I would insult %name%, but nature did a better job.", "%name%, perhaps your strategy should include trying.", "Some people get paid to suck, you do it for free, %name%.", "You must really like that respawn timer, %name%.", "If your main is %class%, you should give up.", "Hey %name%, i see you can't play %class%. Try quitting the game.", "%name%@gmail.com to vacreview@valvesoftware.com\nFOUND CHEATER", "\n☐ Not rekt\n ☑ Rekt\n ☑ Really Rekt\n ☑ Tyrannosaurus Rekt" };

View File

@ -13,7 +13,7 @@ namespace hacks::tf2::killstreak
{ {
static settings::Boolean enable{ "killstreak.enable", "false" }; static settings::Boolean enable{ "killstreak.enable", "false" };
static std::unordered_map<int, int> ks_map; static boost::unordered_flat_map<int, int> ks_map;
int killstreak{ 0 }; int killstreak{ 0 };
void reset() void reset()

View File

@ -783,10 +783,12 @@ static CatCommand debug_print_weaponid("debug_weaponid", "Print the weapon IDs o
#if ENABLE_VISUALS && !ENFORCE_STREAM_SAFETY #if ENABLE_VISUALS && !ENFORCE_STREAM_SAFETY
// This makes us able to see enemy class and status in scoreboard and player panel // This makes us able to see enemy class and status in scoreboard and player panel
/*
static std::unique_ptr<BytePatch> patch_playerpanel; static std::unique_ptr<BytePatch> patch_playerpanel;
static std::unique_ptr<BytePatch> patch_scoreboard1; static std::unique_ptr<BytePatch> patch_scoreboard1;
static std::unique_ptr<BytePatch> patch_scoreboard2; static std::unique_ptr<BytePatch> patch_scoreboard2;
static std::unique_ptr<BytePatch> patch_scoreboard3; static std::unique_ptr<BytePatch> patch_scoreboard3;
*/
// Credits to UNKN0WN // Credits to UNKN0WN
namespace ScoreboardColoring namespace ScoreboardColoring
@ -1005,10 +1007,12 @@ void Shutdown()
#if ENABLE_VISUALS && !ENFORCE_STREAM_SAFETY #if ENABLE_VISUALS && !ENFORCE_STREAM_SAFETY
// unpatching local player // unpatching local player
render_zoomed = false; render_zoomed = false;
/*
patch_playerpanel->Shutdown(); patch_playerpanel->Shutdown();
patch_scoreboard1->Shutdown(); patch_scoreboard1->Shutdown();
patch_scoreboard2->Shutdown(); patch_scoreboard2->Shutdown();
patch_scoreboard3->Shutdown(); patch_scoreboard3->Shutdown();
*/
if (ScoreboardColoring::addr1 == 3 || ScoreboardColoring::addr2 == 2) if (ScoreboardColoring::addr1 == 3 || ScoreboardColoring::addr2 == 2)
return; return;
@ -1081,7 +1085,7 @@ static InitRoutine init(
#if !ENFORCE_STREAM_SAFETY #if !ENFORCE_STREAM_SAFETY
if (render_zoomed) if (render_zoomed)
tryPatchLocalPlayerShouldDraw(true); tryPatchLocalPlayerShouldDraw(true);
render_zoomed.installChangeCallback([](settings::VariableBase<bool> &, bool after) { tryPatchLocalPlayerShouldDraw(after); }); /*render_zoomed.installChangeCallback([](settings::VariableBase<bool> &, bool after) { tryPatchLocalPlayerShouldDraw(after); });
patch_playerpanel = std::make_unique<BytePatch>(gSignatures.GetClientSignature, "0F 94 45 ? 85 C0 0F 8E", 0x0, std::vector<unsigned char>{ 0xC6, 0x45, 0xDF, 0x01 }); patch_playerpanel = std::make_unique<BytePatch>(gSignatures.GetClientSignature, "0F 94 45 ? 85 C0 0F 8E", 0x0, std::vector<unsigned char>{ 0xC6, 0x45, 0xDF, 0x01 });
uintptr_t addr_scrbrd = gSignatures.GetClientSignature("8B 10 89 74 24 04 89 04 24 FF 92 ? ? ? ? 83 F8 02 75 09"); uintptr_t addr_scrbrd = gSignatures.GetClientSignature("8B 10 89 74 24 04 89 04 24 FF 92 ? ? ? ? 83 F8 02 75 09");
@ -1096,7 +1100,7 @@ static InitRoutine init(
patch_scoreboard1->Patch(); patch_scoreboard1->Patch();
patch_scoreboard2->Patch(); patch_scoreboard2->Patch();
patch_scoreboard3->Patch(); patch_scoreboard3->Patch();
*/
static BytePatch stealth_kill{ gSignatures.GetClientSignature, "84 C0 75 28 A1", 2, { 0x90, 0x90 } }; // stealth kill patch static BytePatch stealth_kill{ gSignatures.GetClientSignature, "84 C0 75 28 A1", 2, { 0x90, 0x90 } }; // stealth kill patch
stealth_kill.Patch(); stealth_kill.Patch();
static BytePatch cyoa_patch{ gSignatures.GetClientSignature, "75 ? 80 BB ? ? ? ? 00 74 ? A1 ? ? ? ? 8B 10 C7 44 24", 0, { 0xEB } }; static BytePatch cyoa_patch{ gSignatures.GetClientSignature, "75 ? 80 BB ? ? ? ? 00 74 ? A1 ? ? ? ? 8B 10 C7 44 24", 0, { 0xEB } };

View File

@ -22,8 +22,8 @@ struct LevelInfo
static std::array<LevelInfo, 10> mafia_levels{ LevelInfo(0, 9, "Crook"), LevelInfo(50, 50, "Crook"), LevelInfo(10, 10, "Bad Cop"), LevelInfo(0, 10, "Hoody"), LevelInfo(0, 5, "Gangster"), LevelInfo(1, 1, "Poor Man"), LevelInfo(10, 10, "Rich Man"), LevelInfo(10, 34, "Hitman"), LevelInfo(15, 99, "Boss"), LevelInfo(60, 100, "God Father") }; static std::array<LevelInfo, 10> mafia_levels{ LevelInfo(0, 9, "Crook"), LevelInfo(50, 50, "Crook"), LevelInfo(10, 10, "Bad Cop"), LevelInfo(0, 10, "Hoody"), LevelInfo(0, 5, "Gangster"), LevelInfo(1, 1, "Poor Man"), LevelInfo(10, 10, "Rich Man"), LevelInfo(10, 34, "Hitman"), LevelInfo(15, 99, "Boss"), LevelInfo(60, 100, "God Father") };
#if ENABLE_VISUALS #if ENABLE_VISUALS
std::unordered_map<unsigned, std::pair<std::string, int>> choosen_entry{}; boost::unordered_flat_map<unsigned, std::pair<std::string, int>> choosen_entry{};
std::unordered_map<unsigned, int> previous_entry_amount{}; boost::unordered_flat_map<unsigned, int> previous_entry_amount{};
std::string random_mafia_entry(int level, unsigned steamid) std::string random_mafia_entry(int level, unsigned steamid)
{ {
std::vector<std::string> store; std::vector<std::string> store;

View File

@ -483,12 +483,12 @@ void updateEnemyBlacklist(int slot)
return; return;
// Store the danger of the invidual nav areas // Store the danger of the invidual nav areas
std::unordered_map<CNavArea *, int> dormant_slight_danger; boost::unordered_flat_map<CNavArea *, int> dormant_slight_danger;
std::unordered_map<CNavArea *, int> normal_slight_danger; boost::unordered_flat_map<CNavArea *, int> normal_slight_danger;
// This is used to cache Dangerous areas between ents // This is used to cache Dangerous areas between ents
std::unordered_map<CachedEntity *, std::vector<CNavArea *>> ent_marked_dormant_slight_danger; boost::unordered_flat_map<CachedEntity *, std::vector<CNavArea *>> ent_marked_dormant_slight_danger;
std::unordered_map<CachedEntity *, std::vector<CNavArea *>> ent_marked_normal_slight_danger; boost::unordered_flat_map<CachedEntity *, std::vector<CNavArea *>> ent_marked_normal_slight_danger;
std::vector<std::pair<CachedEntity *, Vector>> checked_origins; std::vector<std::pair<CachedEntity *, Vector>> checked_origins;
for (auto const &ent: entity_cache::player_cache) for (auto const &ent: entity_cache::player_cache)

View File

@ -561,8 +561,8 @@ def_attribute_modifier &GetModifier(int idx)
} }
} }
// A map that maps an Item Definition Index to a modifier // A map that maps an Item Definition Index to a modifier
std::unordered_map<int, def_attribute_modifier> modifier_map{}; boost::unordered_flat_map<int, def_attribute_modifier> modifier_map{};
// A map that maps an Entity Index to a cookie // A map that maps an Entity Index to a cookie
// std::unordered_map<int, patched_weapon_cookie> cookie_map {}; // boost::unordered_flat_map<int, patched_weapon_cookie> cookie_map {};
patched_weapon_cookie cookie{ 0 }; patched_weapon_cookie cookie{ 0 };
} // namespace hacks::tf2::skinchanger } // namespace hacks::tf2::skinchanger

View File

@ -62,20 +62,20 @@ spelltypes getSpellMode()
// Too much random noise on these maps to force spells // Too much random noise on these maps to force spells
// static std::array<std::string, 1> noisy_maps{ "" }; // static std::array<std::string, 1> noisy_maps{ "" };
static std::unordered_map<int, int> spellmap_normal({ { 0, 4206970 }, { 1, 4206969 }, { 2, 4206972 }, { 3, 4206997 }, { 4, 4206971 }, { 5, 4206977 }, { 7, 4206973 }, { 8, 4206982 }, { 9, 4206976 } }); static boost::unordered_flat_map<int, int> spellmap_normal({ { 0, 4206970 }, { 1, 4206969 }, { 2, 4206972 }, { 3, 4206997 }, { 4, 4206971 }, { 5, 4206977 }, { 7, 4206973 }, { 8, 4206982 }, { 9, 4206976 } });
static std::unordered_map<int, int> spellmap_normal_rare({ { 7, 4206987 }, { 8, 4206982 }, { 9, 4207006 }, { 10, 4206983 }, { 11, 4206984 } }); static boost::unordered_flat_map<int, int> spellmap_normal_rare({ { 7, 4206987 }, { 8, 4206982 }, { 9, 4207006 }, { 10, 4206983 }, { 11, 4206984 } });
static std::unordered_map<int, int> spellmap_helltower({ { 0, 4206998 }, { 1, 4206984 }, { 2, 4206985 }, { 3, 4206986 }, { 4, 4206987 }, { 5, 4206982 }, { 6, 4206983 } }); static boost::unordered_flat_map<int, int> spellmap_helltower({ { 0, 4206998 }, { 1, 4206984 }, { 2, 4206985 }, { 3, 4206986 }, { 4, 4206987 }, { 5, 4206982 }, { 6, 4206983 } });
static std::unordered_map<int, int> spellmap_doomsday_normal({ { 0, 4206982 }, { 2, 4207006 }, { 4, 4206983 }, { 5, 4206984 } }); static boost::unordered_flat_map<int, int> spellmap_doomsday_normal({ { 0, 4206982 }, { 2, 4207006 }, { 4, 4206983 }, { 5, 4206984 } });
static std::unordered_map<int, int> spellmap_doomsday_rare({ { 7, 4207009 }, { 8, 4207014 }, { 9, 4207008 }, { 10, 4207007 } }); static boost::unordered_flat_map<int, int> spellmap_doomsday_rare({ { 7, 4207009 }, { 8, 4207014 }, { 9, 4207008 }, { 10, 4207007 } });
static std::unordered_map<int, int> spellmap_bumpercar({ { 12, 4206982 }, { 13, 4206983 }, { 14, 4206987 }, { 15, 4206988 } }); static boost::unordered_flat_map<int, int> spellmap_bumpercar({ { 12, 4206982 }, { 13, 4206983 }, { 14, 4206987 }, { 15, 4206988 } });
// static std::unordered_map<int, int> hasslecastle_normal({ { 0, 4206990 }, { 1, 4206989 }, { 2, 4206986 }, { 3, 4206997 }, { 4, 4206984 }, { 5, 4206983 }, { 7, 4207000 }, { 8, 4206982 }, { 9, 4207027 } }); // static boost::unordered_flat_map<int, int> hasslecastle_normal({ { 0, 4206990 }, { 1, 4206989 }, { 2, 4206986 }, { 3, 4206997 }, { 4, 4206984 }, { 5, 4206983 }, { 7, 4207000 }, { 8, 4206982 }, { 9, 4207027 } });
int getCommandForSpellID(int spellidx, int spelltype) int getCommandForSpellID(int spellidx, int spelltype)
{ {
std::unordered_map<int, int> spellmap; boost::unordered_flat_map<int, int> spellmap;
// if (levelname.find("koth_slasher") != levelname.npos || levelname.find("pl_bloodwater") != levelname.npos || levelname.find("pl_rumble_event") != levelname.npos) // if (levelname.find("koth_slasher") != levelname.npos || levelname.find("pl_bloodwater") != levelname.npos || levelname.find("pl_rumble_event") != levelname.npos)

View File

@ -19,9 +19,9 @@ static settings::Int detections_warning{ "find-cheaters.aimbot.detections", "3"
ac_data data_table[MAX_PLAYERS]; ac_data data_table[MAX_PLAYERS];
int amount[MAX_PLAYERS]; int amount[MAX_PLAYERS];
std::unordered_map<int, Vector> Player_origs{}; boost::unordered_flat_map<int, Vector> Player_origs{};
std::unordered_map<int, Vector> &player_orgs() boost::unordered_flat_map<int, Vector> &player_orgs()
{ {
return Player_origs; return Player_origs;
} }

View File

@ -651,7 +651,7 @@ powerup_type GetPowerupOnPlayer(CachedEntity *player)
return powerup_type::supernova; return powerup_type::supernova;
return powerup_type::not_powerup; return powerup_type::not_powerup;
} }
bool didProjectileHit(Vector start_point, Vector end_point, CachedEntity *entity, float projectile_size) bool didProjectileHit(Vector start_point, Vector end_point, CachedEntity *entity, float projectile_size, bool grav_comp)
{ {
trace::filter_default.SetSelf(RAW_ENT(g_pLocalPlayer->entity)); trace::filter_default.SetSelf(RAW_ENT(g_pLocalPlayer->entity));
@ -659,7 +659,7 @@ bool didProjectileHit(Vector start_point, Vector end_point, CachedEntity *entity
trace_t trace_obj; trace_t trace_obj;
ray.Init(start_point, end_point, Vector(0, -projectile_size, -projectile_size), Vector(0, projectile_size, projectile_size)); ray.Init(start_point, end_point, Vector(0, -projectile_size, -projectile_size), Vector(0, projectile_size, projectile_size));
g_ITrace->TraceRay(ray, MASK_SHOT_HULL, &trace::filter_default, &trace_obj); g_ITrace->TraceRay(ray, MASK_SHOT_HULL, &trace::filter_default, &trace_obj);
return (((IClientEntity *) trace_obj.m_pEnt) == RAW_ENT(entity) || !trace_obj.DidHit()); return (((IClientEntity *) trace_obj.m_pEnt) == RAW_ENT(entity) || (grav_comp ? !trace_obj.DidHit(): false));
} }
// A function to find a weapon by WeaponID // A function to find a weapon by WeaponID
@ -1024,7 +1024,7 @@ bool IsEntityVisible(CachedEntity *entity, int hb)
return entity->hitboxes.VisibilityCheck(hb); return entity->hitboxes.VisibilityCheck(hb);
} }
bool IsEntityVectorVisible(CachedEntity *entity, Vector endpos, bool use_weapon_offset, unsigned int mask, trace_t *trace) bool IsEntityVectorVisible(CachedEntity *entity, Vector endpos, bool use_weapon_offset, unsigned int mask, trace_t *trace, bool hit)
{ {
trace_t trace_object; trace_t trace_object;
@ -1046,7 +1046,7 @@ bool IsEntityVectorVisible(CachedEntity *entity, Vector endpos, bool use_weapon_
g_ITrace->TraceRay(ray, mask, &trace::filter_default, trace); g_ITrace->TraceRay(ray, mask, &trace::filter_default, trace);
} }
return (((IClientEntity *) trace->m_pEnt) == RAW_ENT(entity) || !trace->DidHit()); return (((IClientEntity *) trace->m_pEnt) == RAW_ENT(entity) || (hit ? false: !trace->DidHit()) );
} }
// Get all the corners of a box. Taken from sauce engine. // Get all the corners of a box. Taken from sauce engine.

View File

@ -244,13 +244,6 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time, CUs
time_replaced = false; time_replaced = false;
curtime_old = g_GlobalVars->curtime; curtime_old = g_GlobalVars->curtime;
if (*fuckmode)
{
static int prevbuttons = 0;
current_user_cmd->buttons |= prevbuttons;
prevbuttons |= current_user_cmd->buttons;
}
if (!g_Settings.bInvalid && CE_GOOD(g_pLocalPlayer->entity)) if (!g_Settings.bInvalid && CE_GOOD(g_pLocalPlayer->entity))
{ {
servertime = (float) CE_INT(g_pLocalPlayer->entity, netvar.nTickBase) * g_GlobalVars->interval_per_tick; servertime = (float) CE_INT(g_pLocalPlayer->entity, netvar.nTickBase) * g_GlobalVars->interval_per_tick;

View File

@ -16,7 +16,7 @@
namespace playerlist namespace playerlist
{ {
std::unordered_map<unsigned, userdata> data{}; boost::unordered_flat_map<unsigned, userdata> data{};
const std::string k_Names[] = { "DEFAULT", "FRIEND", "RAGE", "IPC", "TEXTMODE", "CAT", "PARTY" }; const std::string k_Names[] = { "DEFAULT", "FRIEND", "RAGE", "IPC", "TEXTMODE", "CAT", "PARTY" };
const char *const k_pszNames[] = { "DEFAULT", "FRIEND", "RAGE", "IPC", "TEXTMODE", "CAT", "PARTY" }; const char *const k_pszNames[] = { "DEFAULT", "FRIEND", "RAGE", "IPC", "TEXTMODE", "CAT", "PARTY" };

View File

@ -110,7 +110,7 @@ void zerokernel::special::SettingsManagerList::addCollapsible(std::string name,
list.addObject(std::move(entry)); list.addObject(std::move(entry));
} }
static std::unordered_map<std::string, bool> marks{}; static boost::unordered_flat_map<std::string, bool> marks{};
void zerokernel::special::SettingsManagerList::markVariable(std::string name) void zerokernel::special::SettingsManagerList::markVariable(std::string name)
{ {