commit
00530dcc64
21
include/core/cvwrapper.hpp
Executable file → Normal file
21
include/core/cvwrapper.hpp
Executable file → Normal file
@ -41,7 +41,16 @@ public:
|
|||||||
int max_value;
|
int max_value;
|
||||||
int size;
|
int size;
|
||||||
};
|
};
|
||||||
|
namespace hacks
|
||||||
|
{
|
||||||
|
namespace tf2
|
||||||
|
{
|
||||||
|
namespace global
|
||||||
|
{
|
||||||
|
void runcfg();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// TODO reverse, no idea how catcommands are handled
|
// TODO reverse, no idea how catcommands are handled
|
||||||
class CatCommand
|
class CatCommand
|
||||||
{
|
{
|
||||||
@ -78,10 +87,11 @@ public: // TODo, unknown reverse
|
|||||||
|
|
||||||
inline operator bool() const
|
inline operator bool() const
|
||||||
{
|
{
|
||||||
if (this && convar_parent && convar_parent->IsRegistered() && this->registered)
|
if (this && convar_parent && convar_parent->IsRegistered() &&
|
||||||
return !!convar_parent->m_nValue;
|
this->registered)
|
||||||
else
|
return !!convar_parent->m_nValue;
|
||||||
return false;
|
else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
inline operator int() const
|
inline operator int() const
|
||||||
{
|
{
|
||||||
@ -109,6 +119,7 @@ public: // TODo, unknown reverse
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Register();
|
void Register();
|
||||||
|
|
||||||
typedef std::function<void(CatVar *)> RegisterCallbackFn;
|
typedef std::function<void(CatVar *)> RegisterCallbackFn;
|
||||||
void OnRegister(RegisterCallbackFn fn);
|
void OnRegister(RegisterCallbackFn fn);
|
||||||
void InstallChangeCallback(FnChangeCallback_t callback);
|
void InstallChangeCallback(FnChangeCallback_t callback);
|
||||||
|
@ -24,7 +24,11 @@ public:
|
|||||||
}
|
}
|
||||||
inline static int GetSwingRange(IClientEntity *self)
|
inline static int GetSwingRange(IClientEntity *self)
|
||||||
{
|
{
|
||||||
return 128;
|
if (self->GetClientClass()->m_ClassID == CL_CLASS(CTFSword) ||
|
||||||
|
self->GetClientClass()->m_ClassID == CL_CLASS(CTFKatana))
|
||||||
|
return 128;
|
||||||
|
else
|
||||||
|
return (128.0f * 0.67) - 0.5f;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
1
include/visual/drawing.hpp
Executable file → Normal file
1
include/visual/drawing.hpp
Executable file → Normal file
@ -22,7 +22,6 @@ namespace fonts
|
|||||||
|
|
||||||
extern std::unique_ptr<glez::font> esp;
|
extern std::unique_ptr<glez::font> esp;
|
||||||
extern std::unique_ptr<glez::font> menu;
|
extern std::unique_ptr<glez::font> menu;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace fonts
|
namespace fonts
|
||||||
|
@ -15,34 +15,53 @@ int GetRebasedCatVarCount()
|
|||||||
{
|
{
|
||||||
return rebased_count;
|
return rebased_count;
|
||||||
}
|
}
|
||||||
|
enum torun
|
||||||
static CatCommand cfg_rebase("cfg_setbase", "Rebase config", []() {
|
{
|
||||||
for (auto &cv : CatVarList())
|
rebase = 0,
|
||||||
|
resetbase,
|
||||||
|
save,
|
||||||
|
save_complete
|
||||||
|
};
|
||||||
|
int torun = -1;
|
||||||
|
std::string Args[3];
|
||||||
|
namespace hacks
|
||||||
|
{
|
||||||
|
namespace tf2
|
||||||
|
{
|
||||||
|
namespace global
|
||||||
|
{
|
||||||
|
void runcfg()
|
||||||
|
{
|
||||||
|
if (torun == -1)
|
||||||
|
return;
|
||||||
|
if (torun == rebase)
|
||||||
{
|
{
|
||||||
std::string value(cv->GetString());
|
for (auto &cv : CatVarList())
|
||||||
if (value != cv->defaults)
|
|
||||||
{
|
{
|
||||||
cv->current_base = value;
|
std::string value(cv->GetString());
|
||||||
rebased_count++;
|
if (value != cv->defaults)
|
||||||
|
{
|
||||||
|
cv->current_base = value;
|
||||||
|
rebased_count++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
logging::Info("Successfully rebased %d variables", rebased_count);
|
||||||
}
|
}
|
||||||
logging::Info("Successfully rebased %d variables", rebased_count);
|
else if (torun == resetbase)
|
||||||
});
|
|
||||||
|
|
||||||
static CatCommand cfg_resetbase("cfg_resetbase", "Reset config base", []() {
|
|
||||||
for (auto &cv : CatVarList())
|
|
||||||
{
|
{
|
||||||
cv->current_base = cv->defaults;
|
for (auto &cv : CatVarList())
|
||||||
}
|
|
||||||
rebased_count = 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
static CatCommand save_settings(
|
|
||||||
"save", "Save settings (optional filename)", [](const CCommand &args) {
|
|
||||||
std::string filename("lastcfg");
|
|
||||||
if (args.ArgC() > 1)
|
|
||||||
{
|
{
|
||||||
filename = std::string(args.Arg(1));
|
cv->current_base = cv->defaults;
|
||||||
|
}
|
||||||
|
rebased_count = 0;
|
||||||
|
}
|
||||||
|
else if (torun == save)
|
||||||
|
{
|
||||||
|
std::string filename("lastcfg");
|
||||||
|
if (Args[0] != "")
|
||||||
|
{
|
||||||
|
filename = Args[0];
|
||||||
|
Args[0] = "";
|
||||||
}
|
}
|
||||||
std::string path = format("tf/cfg/cat_", filename, ".cfg");
|
std::string path = format("tf/cfg/cat_", filename, ".cfg");
|
||||||
logging::Info("Saving settings to %s", path.c_str());
|
logging::Info("Saving settings to %s", path.c_str());
|
||||||
@ -55,6 +74,7 @@ static CatCommand save_settings(
|
|||||||
if (file.bad())
|
if (file.bad())
|
||||||
{
|
{
|
||||||
logging::Info("Couldn't open the file!");
|
logging::Info("Couldn't open the file!");
|
||||||
|
torun = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (const auto &i : CatVarList())
|
for (const auto &i : CatVarList())
|
||||||
@ -70,15 +90,14 @@ static CatCommand save_settings(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file.close();
|
file.close();
|
||||||
});
|
}
|
||||||
|
else if (torun == save_complete)
|
||||||
static CatCommand save_settings_complete(
|
{
|
||||||
"save_complete", "Save all settings (optional filename)",
|
|
||||||
[](const CCommand &args) {
|
|
||||||
std::string filename("lastcfg");
|
std::string filename("lastcfg");
|
||||||
if (args.ArgC() > 1)
|
if (Args[0] != "")
|
||||||
{
|
{
|
||||||
filename = std::string(args.Arg(1));
|
filename = Args[0];
|
||||||
|
Args[0] = "";
|
||||||
}
|
}
|
||||||
std::string path = format("tf/cfg/cat_", filename, ".cfg");
|
std::string path = format("tf/cfg/cat_", filename, ".cfg");
|
||||||
logging::Info("Saving settings to %s", path.c_str());
|
logging::Info("Saving settings to %s", path.c_str());
|
||||||
@ -102,7 +121,38 @@ static CatCommand save_settings_complete(
|
|||||||
file << CON_PREFIX << i->name << " \"" << i->GetString() << "\"\n";
|
file << CON_PREFIX << i->name << " \"" << i->GetString() << "\"\n";
|
||||||
}
|
}
|
||||||
file.close();
|
file.close();
|
||||||
});
|
}
|
||||||
|
torun = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static CatCommand cfg_rebase("cfg_setbase", "Rebase config",
|
||||||
|
[]() { torun = rebase; });
|
||||||
|
|
||||||
|
static CatCommand cfg_resetbase("cfg_resetbase", "Reset config base",
|
||||||
|
[]() { torun = resetbase; });
|
||||||
|
|
||||||
|
static CatCommand save_settings("save", "Save settings (optional filename)",
|
||||||
|
[](const CCommand &args) {
|
||||||
|
if (args.ArgC() > 1)
|
||||||
|
{
|
||||||
|
Args[0] = std::string(args.Arg(1));
|
||||||
|
}
|
||||||
|
torun = save;
|
||||||
|
});
|
||||||
|
|
||||||
|
static CatCommand
|
||||||
|
save_settings_complete("save_complete",
|
||||||
|
"Save all settings (optional filename)",
|
||||||
|
[](const CCommand &args) {
|
||||||
|
if (args.ArgC() > 1)
|
||||||
|
{
|
||||||
|
Args[0] = std::string(args.Arg(1));
|
||||||
|
}
|
||||||
|
torun = save_complete;
|
||||||
|
});
|
||||||
|
|
||||||
// Prevent initialization errors.
|
// Prevent initialization errors.
|
||||||
std::vector<CatVar *> ®istrationArray()
|
std::vector<CatVar *> ®istrationArray()
|
||||||
|
@ -467,8 +467,9 @@ CachedEntity *RetrieveBestTarget(bool aimkey_state)
|
|||||||
if (GetWeaponMode() == weaponmode::weapon_melee ||
|
if (GetWeaponMode() == weaponmode::weapon_melee ||
|
||||||
(int) priority_mode == 2)
|
(int) priority_mode == 2)
|
||||||
{
|
{
|
||||||
scr = 4096.0f - calculated_data_array[i].aim_position.DistTo(
|
scr = 4096.0f -
|
||||||
g_pLocalPlayer->v_Eye);
|
calculated_data_array[i].aim_position.DistTo(
|
||||||
|
g_pLocalPlayer->v_Eye);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -880,7 +881,7 @@ void DoAutoshoot()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
begansticky = 0;
|
begansticky = 0;
|
||||||
bool attack = true;
|
bool attack = true;
|
||||||
|
|
||||||
// Rifle check
|
// Rifle check
|
||||||
IF_GAME(IsTF())
|
IF_GAME(IsTF())
|
||||||
@ -1328,7 +1329,7 @@ void DrawText()
|
|||||||
tan(DEG2RAD(fov_real) / 2) * (width);
|
tan(DEG2RAD(fov_real) / 2) * (width);
|
||||||
|
|
||||||
glez::draw::circle(width / 2, height / 2, radius, color, 1,
|
glez::draw::circle(width / 2, height / 2, radius, color, 1,
|
||||||
100);
|
100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1347,10 +1348,10 @@ void DrawText()
|
|||||||
draw::WorldToScreen(ent->m_vecOrigin(), oscreen))
|
draw::WorldToScreen(ent->m_vecOrigin(), oscreen))
|
||||||
{
|
{
|
||||||
glez::draw::rect(screen.x - 2, screen.y - 2, 4, 4,
|
glez::draw::rect(screen.x - 2, screen.y - 2, 4, 4,
|
||||||
colors::white);
|
colors::white);
|
||||||
glez::draw::line(oscreen.x, oscreen.y, screen.x - oscreen.x,
|
glez::draw::line(oscreen.x, oscreen.y, screen.x - oscreen.x,
|
||||||
screen.y - oscreen.y, colors::EntityF(ent),
|
screen.y - oscreen.y, colors::EntityF(ent),
|
||||||
0.5f);
|
0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,8 @@ void CreateMove()
|
|||||||
return;
|
return;
|
||||||
if (CE_BYTE(LOCAL_E, netvar.m_bFeignDeathReady))
|
if (CE_BYTE(LOCAL_E, netvar.m_bFeignDeathReady))
|
||||||
return;
|
return;
|
||||||
|
if (HasCondition<TFCond_Cloaked>(LOCAL_E) || HasCondition<TFCond_CloakFlicker>(LOCAL_E))
|
||||||
|
return;
|
||||||
if (CE_INT(LOCAL_E, netvar.iHealth) < (int) trigger_health &&
|
if (CE_INT(LOCAL_E, netvar.iHealth) < (int) trigger_health &&
|
||||||
NearbyEntities() > 1)
|
NearbyEntities() > 1)
|
||||||
g_pUserCmd->buttons |= IN_ATTACK2;
|
g_pUserCmd->buttons |= IN_ATTACK2;
|
||||||
|
@ -63,7 +63,7 @@ int BulletDangerValue(CachedEntity *patient)
|
|||||||
{
|
{
|
||||||
CachedEntity *ent = ENTITY(i);
|
CachedEntity *ent = ENTITY(i);
|
||||||
if (CE_BAD(ent))
|
if (CE_BAD(ent))
|
||||||
continue;
|
continue;
|
||||||
if (!ent->m_bEnemy())
|
if (!ent->m_bEnemy())
|
||||||
continue;
|
continue;
|
||||||
if (g_pPlayerResource->GetClass(ent) != tf_sniper)
|
if (g_pPlayerResource->GetClass(ent) != tf_sniper)
|
||||||
@ -104,7 +104,7 @@ int FireDangerValue(CachedEntity *patient)
|
|||||||
{
|
{
|
||||||
CachedEntity *ent = ENTITY(i);
|
CachedEntity *ent = ENTITY(i);
|
||||||
if (CE_BAD(ent))
|
if (CE_BAD(ent))
|
||||||
continue;
|
continue;
|
||||||
if (!ent->m_bEnemy())
|
if (!ent->m_bEnemy())
|
||||||
continue;
|
continue;
|
||||||
if (g_pPlayerResource->GetClass(ent) != tf_pyro)
|
if (g_pPlayerResource->GetClass(ent) != tf_pyro)
|
||||||
|
@ -239,7 +239,7 @@ void Draw()
|
|||||||
tan(DEG2RAD(fov_real) / 2) * (width);
|
tan(DEG2RAD(fov_real) / 2) * (width);
|
||||||
|
|
||||||
glez::draw::circle(width / 2, height / 2, radius, color, 1,
|
glez::draw::circle(width / 2, height / 2, radius, color, 1,
|
||||||
100);
|
100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,12 +19,15 @@ namespace backtrack
|
|||||||
CatVar enable(CV_SWITCH, "backtrack", "0", "Enable backtrack",
|
CatVar enable(CV_SWITCH, "backtrack", "0", "Enable backtrack",
|
||||||
"For legit play only as of right now.");
|
"For legit play only as of right now.");
|
||||||
static CatVar draw_bt(CV_SWITCH, "backtrack_draw", "0", "Draw",
|
static CatVar draw_bt(CV_SWITCH, "backtrack_draw", "0", "Draw",
|
||||||
"Draw backtrack ticks");
|
"Draw backtrack ticks");
|
||||||
CatVar latency(CV_FLOAT, "backtrack_latency", "0", "fake lantency",
|
CatVar latency(CV_FLOAT, "backtrack_latency", "0", "fake lantency",
|
||||||
"Set fake latency to this many ms");
|
"Set fake latency to this many ms");
|
||||||
static CatVar mindistance(CV_FLOAT, "mindistance", "60", "mindistance");
|
static CatVar mindistance(CV_FLOAT, "mindistance", "60", "mindistance");
|
||||||
static CatEnum slots_enum({ "All", "Primary", "Secondary", "Melee", "Primary Secondary", "Primary Melee", "Secondary Melee" });
|
static CatEnum slots_enum({ "All", "Primary", "Secondary", "Melee",
|
||||||
static CatVar slots(slots_enum, "backtrack_slots", "0", "Enabled Slots", "Select what slots backtrack should be enabled on.");
|
"Primary Secondary", "Primary Melee",
|
||||||
|
"Secondary Melee" });
|
||||||
|
static CatVar slots(slots_enum, "backtrack_slots", "0", "Enabled Slots",
|
||||||
|
"Select what slots backtrack should be enabled on.");
|
||||||
|
|
||||||
BacktrackData headPositions[32][66];
|
BacktrackData headPositions[32][66];
|
||||||
BestTickData sorted_ticks[66];
|
BestTickData sorted_ticks[66];
|
||||||
@ -93,13 +96,13 @@ void Run()
|
|||||||
|
|
||||||
if (CE_BAD(LOCAL_E))
|
if (CE_BAD(LOCAL_E))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!shouldBacktrack())
|
if (!shouldBacktrack())
|
||||||
{
|
{
|
||||||
shouldDrawBt = false;
|
shouldDrawBt = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
shouldDrawBt = true;
|
shouldDrawBt = true;
|
||||||
|
|
||||||
CUserCmd *cmd = g_pUserCmd;
|
CUserCmd *cmd = g_pUserCmd;
|
||||||
float bestFov = 99999;
|
float bestFov = 99999;
|
||||||
@ -229,10 +232,10 @@ void Draw()
|
|||||||
|
|
||||||
if (i == iBestTarget && j == BestTick)
|
if (i == iBestTarget && j == BestTick)
|
||||||
glez::draw::rect(out.x, out.y, size / 2, size / 2,
|
glez::draw::rect(out.x, out.y, size / 2, size / 2,
|
||||||
colors::red);
|
colors::red);
|
||||||
else
|
else
|
||||||
glez::draw::rect(out.x, out.y, size / 4, size / 4,
|
glez::draw::rect(out.x, out.y, size / 4, size / 4,
|
||||||
colors::green);
|
colors::green);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -241,40 +244,40 @@ void Draw()
|
|||||||
|
|
||||||
bool shouldBacktrack()
|
bool shouldBacktrack()
|
||||||
{
|
{
|
||||||
int slot = re::C_BaseCombatWeapon::GetSlot(RAW_ENT(g_pLocalPlayer->weapon()));
|
int slot =
|
||||||
switch((int) slots)
|
re::C_BaseCombatWeapon::GetSlot(RAW_ENT(g_pLocalPlayer->weapon()));
|
||||||
|
switch ((int) slots)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (slot == 0)
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 2:
|
||||||
if (slot == 0)
|
if (slot == 1)
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 3:
|
||||||
if (slot == 1)
|
if (slot == 2)
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 4:
|
||||||
if (slot == 2)
|
if (slot == 0 || slot == 1)
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 5:
|
||||||
if (slot == 0 || slot == 1)
|
if (slot == 0 || slot == 2)
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 6:
|
||||||
if (slot == 0 || slot == 2)
|
if (slot == 1 || slot == 2)
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
case 6:
|
|
||||||
if (slot == 1 || slot == 2)
|
|
||||||
return true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -252,9 +252,8 @@ struct bonelist_s
|
|||||||
if (i > 0)
|
if (i > 0)
|
||||||
{
|
{
|
||||||
glez::draw::line(last_screen.x, last_screen.y,
|
glez::draw::line(last_screen.x, last_screen.y,
|
||||||
current_screen.x - last_screen.x,
|
current_screen.x - last_screen.x,
|
||||||
current_screen.y - last_screen.y, color,
|
current_screen.y - last_screen.y, color, 0.5f);
|
||||||
0.5f);
|
|
||||||
}
|
}
|
||||||
last_screen = current_screen;
|
last_screen = current_screen;
|
||||||
}
|
}
|
||||||
@ -388,8 +387,10 @@ void Init()
|
|||||||
{
|
{
|
||||||
/*esp_font_scale.InstallChangeCallback(
|
/*esp_font_scale.InstallChangeCallback(
|
||||||
[](IConVar *var, const char *pszOldValue, float flOldValue) {
|
[](IConVar *var, const char *pszOldValue, float flOldValue) {
|
||||||
logging::Info("current font: %p %s %d", fonts::esp.get(), fonts::esp->path.c_str(), fonts::esp->isLoaded());
|
logging::Info("current font: %p %s %d", fonts::esp.get(),
|
||||||
fonts::esp.reset(new glez::font(DATA_PATH "/fonts/verasans.ttf", esp_font_scale));
|
fonts::esp->path.c_str(), fonts::esp->isLoaded());
|
||||||
|
fonts::esp.reset(new glez::font(DATA_PATH "/fonts/verasans.ttf",
|
||||||
|
esp_font_scale));
|
||||||
});*/
|
});*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -418,7 +419,7 @@ void _FASTCALL emoji(CachedEntity *ent)
|
|||||||
if (!size || !float(emoji_min_size))
|
if (!size || !float(emoji_min_size))
|
||||||
return;
|
return;
|
||||||
if (emoji_esp_scaling && (size < float(emoji_min_size)))
|
if (emoji_esp_scaling && (size < float(emoji_min_size)))
|
||||||
size = float(emoji_min_size);
|
size = float(emoji_min_size);
|
||||||
player_info_s info;
|
player_info_s info;
|
||||||
unsigned int steamID;
|
unsigned int steamID;
|
||||||
unsigned int steamidarray[32]{};
|
unsigned int steamidarray[32]{};
|
||||||
@ -431,10 +432,11 @@ void _FASTCALL emoji(CachedEntity *ent)
|
|||||||
if (g_IEngine->GetPlayerInfo(ent->m_IDX, &info))
|
if (g_IEngine->GetPlayerInfo(ent->m_IDX, &info))
|
||||||
steamID = info.friendsID;
|
steamID = info.friendsID;
|
||||||
if (playerlist::AccessData(steamID).state ==
|
if (playerlist::AccessData(steamID).state ==
|
||||||
playerlist::k_EState::CAT)
|
playerlist::k_EState::CAT)
|
||||||
glez::draw::rect_textured(
|
glez::draw::rect_textured(
|
||||||
head_scr.x - size / 2, head_scr.y - size / 2, size,
|
head_scr.x - size / 2, head_scr.y - size / 2, size,
|
||||||
size, glez::color::white, idspec, 2 * 64, 1 * 64, 64, 64, 0);
|
size, glez::color::white, idspec, 2 * 64, 1 * 64,
|
||||||
|
64, 64, 0);
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
if (steamID == steamidarray[i])
|
if (steamID == steamidarray[i])
|
||||||
@ -445,10 +447,10 @@ void _FASTCALL emoji(CachedEntity *ent)
|
|||||||
ii++;
|
ii++;
|
||||||
i -= 4;
|
i -= 4;
|
||||||
}
|
}
|
||||||
glez::draw::rect_textured(head_scr.x - size / 2,
|
glez::draw::rect_textured(
|
||||||
head_scr.y - size / 2, size,
|
head_scr.x - size / 2, head_scr.y - size / 2,
|
||||||
size, glez::color::white, idspec,
|
size, size, glez::color::white, idspec, i * 64,
|
||||||
i * 64, ii * 64, 64, 64, 0);
|
ii * 64, 64, 64, 0);
|
||||||
hascall = true;
|
hascall = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -456,8 +458,8 @@ void _FASTCALL emoji(CachedEntity *ent)
|
|||||||
glez::draw::rect_textured(
|
glez::draw::rect_textured(
|
||||||
head_scr.x - size / 2, head_scr.y - size / 2, size,
|
head_scr.x - size / 2, head_scr.y - size / 2, size,
|
||||||
size, colors::white, textures::atlas().texture,
|
size, colors::white, textures::atlas().texture,
|
||||||
(3 + (v9mode ? 3 : (int) emoji_esp)) * 64, (v9mode ? 3 : 4) * 64,
|
(3 + (v9mode ? 3 : (int) emoji_esp)) * 64,
|
||||||
64, 64, 0);
|
(v9mode ? 3 : 4) * 64, 64, 64, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -525,8 +527,7 @@ void _FASTCALL ProcessEntityPT(CachedEntity *ent)
|
|||||||
draw::WorldToScreen(ent->m_vecOrigin(), scn);
|
draw::WorldToScreen(ent->m_vecOrigin(), scn);
|
||||||
|
|
||||||
// Draw a line
|
// Draw a line
|
||||||
glez::draw::line(scn.x, scn.y, width - scn.x, height - scn.y, fg,
|
glez::draw::line(scn.x, scn.y, width - scn.x, height - scn.y, fg, 0.5f);
|
||||||
0.5f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sightline esp
|
// Sightline esp
|
||||||
@ -627,7 +628,7 @@ void _FASTCALL ProcessEntityPT(CachedEntity *ent)
|
|||||||
if (found_scn1)
|
if (found_scn1)
|
||||||
{
|
{
|
||||||
glez::draw::line(scn1.x, scn1.y, scn2.x - scn1.x,
|
glez::draw::line(scn1.x, scn1.y, scn2.x - scn1.x,
|
||||||
scn2.y - scn1.y, fg, 0.5f);
|
scn2.y - scn1.y, fg, 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -713,7 +714,7 @@ void _FASTCALL ProcessEntityPT(CachedEntity *ent)
|
|||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
glez::draw::rect_outline(min_x - 7, min_y, 7, max_y - min_y,
|
glez::draw::rect_outline(min_x - 7, min_y, 7, max_y - min_y,
|
||||||
border, 0.5f);
|
border, 0.5f);
|
||||||
glez::draw::rect(min_x - 6, max_y - hbh - 1, 5, hbh, hp);
|
glez::draw::rect(min_x - 6, max_y - hbh - 1, 5, hbh, hp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -810,9 +811,9 @@ void _FASTCALL ProcessEntityPT(CachedEntity *ent)
|
|||||||
// If the origin is centered, we use one method. if not, the other
|
// If the origin is centered, we use one method. if not, the other
|
||||||
if (!origin_is_zero || true)
|
if (!origin_is_zero || true)
|
||||||
{
|
{
|
||||||
glez::draw::outlined_string(
|
glez::draw::outlined_string(draw_point.x, draw_point.y,
|
||||||
draw_point.x, draw_point.y, string.data,
|
string.data, *fonts::esp, color,
|
||||||
*fonts::esp, color, colors::black, nullptr, nullptr);
|
colors::black, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /*
|
{ /*
|
||||||
@ -1412,15 +1413,14 @@ void _FASTCALL Draw3DBox(CachedEntity *ent, const rgba_t &clr)
|
|||||||
for (int i = 1; i <= 4; i++)
|
for (int i = 1; i <= 4; i++)
|
||||||
{
|
{
|
||||||
glez::draw::line((points[i - 1].x), (points[i - 1].y),
|
glez::draw::line((points[i - 1].x), (points[i - 1].y),
|
||||||
(points[i % 4].x) - (points[i - 1].x),
|
(points[i % 4].x) - (points[i - 1].x),
|
||||||
(points[i % 4].y) - (points[i - 1].y), clr, 0.5f);
|
(points[i % 4].y) - (points[i - 1].y), clr, 0.5f);
|
||||||
glez::draw::line((points[i - 1].x), (points[i - 1].y),
|
glez::draw::line((points[i - 1].x), (points[i - 1].y),
|
||||||
(points[i + 3].x) - (points[i - 1].x),
|
(points[i + 3].x) - (points[i - 1].x),
|
||||||
(points[i + 3].y) - (points[i - 1].y), clr, 0.5f);
|
(points[i + 3].y) - (points[i - 1].y), clr, 0.5f);
|
||||||
glez::draw::line((points[i + 3].x), (points[i + 3].y),
|
glez::draw::line((points[i + 3].x), (points[i + 3].y),
|
||||||
(points[i % 4 + 4].x) - (points[i + 3].x),
|
(points[i % 4 + 4].x) - (points[i + 3].x),
|
||||||
(points[i % 4 + 4].y) - (points[i + 3].y), clr,
|
(points[i % 4 + 4].y) - (points[i + 3].y), clr, 0.5f);
|
||||||
0.5f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1458,11 +1458,11 @@ void _FASTCALL DrawBox(CachedEntity *ent, const rgba_t &clr)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
glez::draw::rect_outline(min_x, min_y, max_x - min_x, max_y - min_y,
|
glez::draw::rect_outline(min_x, min_y, max_x - min_x, max_y - min_y,
|
||||||
border, 0.5f);
|
border, 0.5f);
|
||||||
glez::draw::rect_outline(min_x + 1, min_y + 1, max_x - min_x - 2,
|
glez::draw::rect_outline(min_x + 1, min_y + 1, max_x - min_x - 2,
|
||||||
max_y - min_y - 2, clr, 0.5f);
|
max_y - min_y - 2, clr, 0.5f);
|
||||||
glez::draw::rect_outline(min_x + 2, min_y + 2, max_x - min_x - 4,
|
glez::draw::rect_outline(min_x + 2, min_y + 2, max_x - min_x - 4,
|
||||||
max_y - min_y - 4, border, 0.5f);
|
max_y - min_y - 4, border, 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,7 +193,8 @@ void WorldTick()
|
|||||||
if (dist_to_target > (float) follow_distance)
|
if (dist_to_target > (float) follow_distance)
|
||||||
{
|
{
|
||||||
// Check for idle
|
// Check for idle
|
||||||
if (idle_time.check(3000) || (breadcrumbs.size() > 1 && LOCAL_E->m_vecVelocity.IsZero(5.0f)))
|
if (idle_time.check(3000) ||
|
||||||
|
(breadcrumbs.size() > 1 && LOCAL_E->m_vecVelocity.IsZero(5.0f)))
|
||||||
g_pUserCmd->buttons |= IN_JUMP;
|
g_pUserCmd->buttons |= IN_JUMP;
|
||||||
if (idle_time.test_and_set(5000))
|
if (idle_time.test_and_set(5000))
|
||||||
{
|
{
|
||||||
@ -282,16 +283,15 @@ void DrawTick()
|
|||||||
if (draw::WorldToScreen(breadcrumbs[i], wts1) &&
|
if (draw::WorldToScreen(breadcrumbs[i], wts1) &&
|
||||||
draw::WorldToScreen(breadcrumbs[i + 1], wts2))
|
draw::WorldToScreen(breadcrumbs[i + 1], wts2))
|
||||||
{
|
{
|
||||||
glez::draw::line(wts1.x, wts1.y, wts2.x - wts1.x,
|
glez::draw::line(wts1.x, wts1.y, wts2.x - wts1.x, wts2.y - wts1.y,
|
||||||
wts2.y - wts1.y, colors::white, 0.1f);
|
colors::white, 0.1f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Vector wts;
|
Vector wts;
|
||||||
if (!draw::WorldToScreen(breadcrumbs[0], wts))
|
if (!draw::WorldToScreen(breadcrumbs[0], wts))
|
||||||
return;
|
return;
|
||||||
glez::draw::rect(wts.x - 4, wts.y - 4, 8, 8, colors::white);
|
glez::draw::rect(wts.x - 4, wts.y - 4, 8, 8, colors::white);
|
||||||
glez::draw::rect_outline(wts.x - 4, wts.y - 4, 7, 7, colors::white,
|
glez::draw::rect_outline(wts.x - 4, wts.y - 4, 7, 7, colors::white, 1.0f);
|
||||||
1.0f);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
src/hacks/KillSay.cpp
Executable file → Normal file
2
src/hacks/KillSay.cpp
Executable file → Normal file
@ -68,7 +68,7 @@ std::string ComposeKillSay(IGameEvent *event)
|
|||||||
std::string msg = source->at(rand() % source->size());
|
std::string msg = source->at(rand() % source->size());
|
||||||
while (msg == lastmsg)
|
while (msg == lastmsg)
|
||||||
{
|
{
|
||||||
msg = source->at(rand() % source->size());
|
msg = source->at(rand() % source->size());
|
||||||
}
|
}
|
||||||
lastmsg = msg;
|
lastmsg = msg;
|
||||||
player_info_s info;
|
player_info_s info;
|
||||||
|
@ -9,7 +9,7 @@ namespace lightesp
|
|||||||
{
|
{
|
||||||
|
|
||||||
static CatVar enable(CV_SWITCH, "lightesp_enabled", "0", "Enable LightESP",
|
static CatVar enable(CV_SWITCH, "lightesp_enabled", "0", "Enable LightESP",
|
||||||
"Lightweight ESP. Only shows head.");
|
"Lightweight ESP. Only shows head.");
|
||||||
Vector hitp[32];
|
Vector hitp[32];
|
||||||
Vector minp[32];
|
Vector minp[32];
|
||||||
Vector maxp[32];
|
Vector maxp[32];
|
||||||
@ -64,9 +64,8 @@ void draw()
|
|||||||
else
|
else
|
||||||
size = abs(maxp[i].y - minp[i].y);
|
size = abs(maxp[i].y - minp[i].y);
|
||||||
|
|
||||||
glez::draw::rect(
|
glez::draw::rect(out.x, out.y, size / 4, size / 4,
|
||||||
out.x, out.y, size / 4, size / 4,
|
hacks::shared::lightesp::LightESPColor(pEntity));
|
||||||
hacks::shared::lightesp::LightESPColor(pEntity));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -388,7 +388,7 @@ void DrawText()
|
|||||||
gaybow.a = .5;
|
gaybow.a = .5;
|
||||||
// Draw next step
|
// Draw next step
|
||||||
glez::draw::rect(0, step * (i - 1), width,
|
glez::draw::rect(0, step * (i - 1), width,
|
||||||
(step * i) - (step * (i - 1)), gaybow);
|
(step * i) - (step * (i - 1)), gaybow);
|
||||||
}
|
}
|
||||||
|
|
||||||
// int size_x;
|
// int size_x;
|
||||||
|
@ -91,16 +91,19 @@ static std::vector<textures::sprite> tx_items{};
|
|||||||
InitRoutine init([]() {
|
InitRoutine init([]() {
|
||||||
// Background circles
|
// Background circles
|
||||||
for (int i = 0; i < 2; ++i)
|
for (int i = 0; i < 2; ++i)
|
||||||
tx_teams.push_back(textures::atlas().create_sprite(704, 384 + i * 64, 64, 64));
|
tx_teams.push_back(
|
||||||
|
textures::atlas().create_sprite(704, 384 + i * 64, 64, 64));
|
||||||
// Items
|
// Items
|
||||||
for (int i = 0; i < 2; ++i)
|
for (int i = 0; i < 2; ++i)
|
||||||
tx_items.push_back(textures::atlas().create_sprite(640, 384 + i * 64, 64, 64));
|
tx_items.push_back(
|
||||||
|
textures::atlas().create_sprite(640, 384 + i * 64, 64, 64));
|
||||||
// Classes
|
// Classes
|
||||||
for (int i = 0; i < 3; ++i)
|
for (int i = 0; i < 3; ++i)
|
||||||
{
|
{
|
||||||
tx_class.emplace_back();
|
tx_class.emplace_back();
|
||||||
for (int j = 0; j < 9; ++j)
|
for (int j = 0; j < 9; ++j)
|
||||||
tx_class[i].push_back(textures::atlas().create_sprite(j * 64, 320 + i * 64, 64, 64));
|
tx_class[i].push_back(
|
||||||
|
textures::atlas().create_sprite(j * 64, 320 + i * 64, 64, 64));
|
||||||
}
|
}
|
||||||
logging::Info("Radar sprites loaded");
|
logging::Info("Radar sprites loaded");
|
||||||
});
|
});
|
||||||
@ -130,11 +133,11 @@ void DrawEntity(int x, int y, CachedEntity *ent)
|
|||||||
if (use_icons)
|
if (use_icons)
|
||||||
{
|
{
|
||||||
tx_teams[idx].draw(x + wtr.first, y + wtr.second,
|
tx_teams[idx].draw(x + wtr.first, y + wtr.second,
|
||||||
(int) icon_size, (int) icon_size,
|
(int) icon_size, (int) icon_size,
|
||||||
colors::white);
|
colors::white);
|
||||||
tx_class[0][clazz - 1].draw(
|
tx_class[0][clazz - 1].draw(x + wtr.first, y + wtr.second,
|
||||||
x + wtr.first, y + wtr.second, (int) icon_size,
|
(int) icon_size, (int) icon_size,
|
||||||
(int) icon_size, colors::white);
|
colors::white);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -156,9 +159,9 @@ void DrawEntity(int x, int y, CachedEntity *ent)
|
|||||||
glez::draw::rect_outline(
|
glez::draw::rect_outline(
|
||||||
x + wtr.first, y + wtr.second + (int) icon_size,
|
x + wtr.first, y + wtr.second + (int) icon_size,
|
||||||
(int) icon_size, 4, colors::black, 0.5f);
|
(int) icon_size, 4, colors::black, 0.5f);
|
||||||
glez::draw::rect(
|
glez::draw::rect(x + wtr.first + 1,
|
||||||
x + wtr.first + 1, y + wtr.second + (int) icon_size + 1,
|
y + wtr.second + (int) icon_size + 1,
|
||||||
((float) icon_size - 2.0f) * healthp, 2, clr);
|
((float) icon_size - 2.0f) * healthp, 2, clr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ent->m_Type() == ENTITY_BUILDING)
|
else if (ent->m_Type() == ENTITY_BUILDING)
|
||||||
@ -193,8 +196,8 @@ void DrawEntity(int x, int y, CachedEntity *ent)
|
|||||||
WorldToRadar(ent->m_vecOrigin().x, ent->m_vecOrigin().y);
|
WorldToRadar(ent->m_vecOrigin().x, ent->m_vecOrigin().y);
|
||||||
float sz = float(icon_size) * 0.15f * 0.5f;
|
float sz = float(icon_size) * 0.15f * 0.5f;
|
||||||
float sz2 = float(icon_size) * 0.85;
|
float sz2 = float(icon_size) * 0.85;
|
||||||
tx_items[1].draw(x + wtr.first + sz, y + wtr.second + sz,
|
tx_items[0].draw(x + wtr.first + sz, y + wtr.second + sz, sz2,
|
||||||
sz2, sz2, colors::white);
|
sz2, colors::white);
|
||||||
}
|
}
|
||||||
else if (show_ammopacks && (ent->m_ItemType() == ITEM_AMMO_LARGE ||
|
else if (show_ammopacks && (ent->m_ItemType() == ITEM_AMMO_LARGE ||
|
||||||
ent->m_ItemType() == ITEM_AMMO_MEDIUM ||
|
ent->m_ItemType() == ITEM_AMMO_MEDIUM ||
|
||||||
@ -204,8 +207,8 @@ void DrawEntity(int x, int y, CachedEntity *ent)
|
|||||||
WorldToRadar(ent->m_vecOrigin().x, ent->m_vecOrigin().y);
|
WorldToRadar(ent->m_vecOrigin().x, ent->m_vecOrigin().y);
|
||||||
float sz = float(icon_size) * 0.15f * 0.5f;
|
float sz = float(icon_size) * 0.15f * 0.5f;
|
||||||
float sz2 = float(icon_size) * 0.85;
|
float sz2 = float(icon_size) * 0.85;
|
||||||
tx_items[0].draw(x + wtr.first + sz, y + wtr.second + sz,
|
tx_items[1].draw(x + wtr.first + sz, y + wtr.second + sz, sz2,
|
||||||
sz2, sz2, colors::white);
|
sz2, colors::white);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -232,9 +235,8 @@ void Draw()
|
|||||||
outlineclr = GUIColor();
|
outlineclr = GUIColor();
|
||||||
|
|
||||||
glez::draw::rect(x, y, radar_size, radar_size,
|
glez::draw::rect(x, y, radar_size, radar_size,
|
||||||
colors::Transparent(colors::black, 0.4f));
|
colors::Transparent(colors::black, 0.4f));
|
||||||
glez::draw::rect_outline(x, y, radar_size, radar_size, outlineclr,
|
glez::draw::rect_outline(x, y, radar_size, radar_size, outlineclr, 0.5f);
|
||||||
0.5f);
|
|
||||||
|
|
||||||
if (enemies_over_teammates)
|
if (enemies_over_teammates)
|
||||||
enemies.clear();
|
enemies.clear();
|
||||||
@ -268,14 +270,14 @@ void Draw()
|
|||||||
g_pLocalPlayer->v_Origin.y);
|
g_pLocalPlayer->v_Origin.y);
|
||||||
if (!use_icons)
|
if (!use_icons)
|
||||||
glez::draw::rect_outline(x + wtr.first, y + wtr.second,
|
glez::draw::rect_outline(x + wtr.first, y + wtr.second,
|
||||||
int(icon_size), int(icon_size),
|
int(icon_size), int(icon_size), GUIColor(),
|
||||||
GUIColor(), 0.5f);
|
0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
glez::draw::line(x + half_size, y + half_size / 2, 0, half_size,
|
glez::draw::line(x + half_size, y + half_size / 2, 0, half_size,
|
||||||
colors::Transparent(GUIColor(), 0.4f), 0.5f);
|
colors::Transparent(GUIColor(), 0.4f), 0.5f);
|
||||||
glez::draw::line(x + half_size / 2, y + half_size, half_size, 0,
|
glez::draw::line(x + half_size / 2, y + half_size, half_size, 0,
|
||||||
colors::Transparent(GUIColor(), 0.4f), 0.5f);
|
colors::Transparent(GUIColor(), 0.4f), 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -384,13 +384,13 @@ void CreateMove()
|
|||||||
current_index = 0;
|
current_index = 0;
|
||||||
if (random_order)
|
if (random_order)
|
||||||
{
|
{
|
||||||
current_index = rand() % source->size();
|
current_index = rand() % source->size();
|
||||||
while (current_index == last_index)
|
while (current_index == last_index)
|
||||||
{
|
{
|
||||||
current_index = rand() % source->size();
|
current_index = rand() % source->size();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
last_index = current_index;
|
last_index = current_index;
|
||||||
std::string spamString = source->at(current_index);
|
std::string spamString = source->at(current_index);
|
||||||
if (FormatSpamMessage(spamString))
|
if (FormatSpamMessage(spamString))
|
||||||
chat_stack::Say(spamString, false);
|
chat_stack::Say(spamString, false);
|
||||||
|
@ -1081,7 +1081,7 @@ void DrawConnection(index_t a, connection_s &b)
|
|||||||
color = &colors::green;
|
color = &colors::green;
|
||||||
|
|
||||||
glez::draw::line(wts_a.x, wts_a.y, wts_c.x - wts_a.x, wts_c.y - wts_a.y,
|
glez::draw::line(wts_a.x, wts_a.y, wts_c.x - wts_a.x, wts_c.y - wts_a.y,
|
||||||
*color, 0.5f);
|
*color, 0.5f);
|
||||||
|
|
||||||
if (draw_connection_flags && b.flags != CF_GOOD)
|
if (draw_connection_flags && b.flags != CF_GOOD)
|
||||||
{
|
{
|
||||||
@ -1092,8 +1092,8 @@ void DrawConnection(index_t a, connection_s &b)
|
|||||||
flags += "H";
|
flags += "H";
|
||||||
// int size_x = 0, size_y = 0;
|
// int size_x = 0, size_y = 0;
|
||||||
// FTGL_StringLength(flags, fonts::font_main, &size_x, &size_y);
|
// FTGL_StringLength(flags, fonts::font_main, &size_x, &size_y);
|
||||||
glez::draw::string(wts_cc.x, wts_cc.y - 4, flags,
|
glez::draw::string(wts_cc.x, wts_cc.y - 4, flags, *fonts::menu,
|
||||||
*fonts::menu, colors::white, nullptr, nullptr);
|
colors::white, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1132,7 +1132,7 @@ void DrawNode(index_t node, bool draw_back)
|
|||||||
color = &colors::red;
|
color = &colors::red;
|
||||||
|
|
||||||
glez::draw::rect(wts.x - node_size, wts.y - node_size, 2 * node_size,
|
glez::draw::rect(wts.x - node_size, wts.y - node_size, 2 * node_size,
|
||||||
2 * node_size, *color);
|
2 * node_size, *color);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (draw_indices)
|
if (draw_indices)
|
||||||
@ -1147,9 +1147,9 @@ void DrawNode(index_t node, bool draw_back)
|
|||||||
if (not draw::WorldToScreen(n.xyz(), wts))
|
if (not draw::WorldToScreen(n.xyz(), wts))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
glez::draw::outlined_string(
|
glez::draw::outlined_string(wts.x, wts.y, std::to_string(node).c_str(),
|
||||||
wts.x, wts.y, std::to_string(node).c_str(), *fonts::menu,
|
*fonts::menu, *color, colors::black,
|
||||||
*color, colors::black, nullptr, nullptr);
|
nullptr, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,6 +160,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
time_replaced = false;
|
time_replaced = false;
|
||||||
curtime_old = g_GlobalVars->curtime;
|
curtime_old = g_GlobalVars->curtime;
|
||||||
|
|
||||||
|
hacks::tf2::global::runcfg();
|
||||||
if (nolerp)
|
if (nolerp)
|
||||||
{
|
{
|
||||||
// g_pUserCmd->tick_count += 1;
|
// g_pUserCmd->tick_count += 1;
|
||||||
|
@ -99,9 +99,9 @@ void Prediction_PaintTraverse()
|
|||||||
Vector screen;
|
Vector screen;
|
||||||
if (draw::WorldToScreen(predicted_players[i][j], screen))
|
if (draw::WorldToScreen(predicted_players[i][j], screen))
|
||||||
{
|
{
|
||||||
glez::draw::line(
|
glez::draw::line(screen.x, screen.y,
|
||||||
screen.x, screen.y, previous_screen.x - screen.x,
|
previous_screen.x - screen.x,
|
||||||
previous_screen.y - screen.y, color, 0.5f);
|
previous_screen.y - screen.y, color, 0.5f);
|
||||||
previous_screen = screen;
|
previous_screen = screen;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -18,8 +18,8 @@ sprite::sprite(float x, float y, float w, float h, texture_atlas &atlas)
|
|||||||
void sprite::draw(float scrx, float scry, float scrw, float scrh,
|
void sprite::draw(float scrx, float scry, float scrw, float scrh,
|
||||||
const rgba_t &rgba)
|
const rgba_t &rgba)
|
||||||
{
|
{
|
||||||
glez::draw::rect_textured(scrx, scry, scrw, scrh, rgba, atlas.texture,
|
glez::draw::rect_textured(scrx, scry, scrw, scrh, rgba, atlas.texture, nx,
|
||||||
nx, ny, nw, nh, 0);
|
ny, nw, nh, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
texture_atlas::texture_atlas(std::string filename, float width, float height)
|
texture_atlas::texture_atlas(std::string filename, float width, float height)
|
||||||
|
11
src/visual/drawing.cpp
Executable file → Normal file
11
src/visual/drawing.cpp
Executable file → Normal file
@ -46,9 +46,9 @@ void DrawStrings()
|
|||||||
int y{ 8 };
|
int y{ 8 };
|
||||||
for (size_t i = 0; i < side_strings_count; ++i)
|
for (size_t i = 0; i < side_strings_count; ++i)
|
||||||
{
|
{
|
||||||
glez::draw::outlined_string(
|
glez::draw::outlined_string(8, y, side_strings[i], *fonts::menu,
|
||||||
8, y, side_strings[i], *fonts::menu,
|
side_strings_colors[i], colors::black,
|
||||||
side_strings_colors[i], colors::black, nullptr, nullptr);
|
nullptr, nullptr);
|
||||||
y += fonts::menu->size + 1;
|
y += fonts::menu->size + 1;
|
||||||
}
|
}
|
||||||
y = draw::height / 2;
|
y = draw::height / 2;
|
||||||
@ -57,8 +57,8 @@ void DrawStrings()
|
|||||||
float sx, sy;
|
float sx, sy;
|
||||||
fonts::menu->stringSize(center_strings[i], &sx, &sy);
|
fonts::menu->stringSize(center_strings[i], &sx, &sy);
|
||||||
glez::draw::outlined_string(
|
glez::draw::outlined_string(
|
||||||
(draw::width - sx) / 2, y, center_strings[i].c_str(),
|
(draw::width - sx) / 2, y, center_strings[i].c_str(), *fonts::menu,
|
||||||
*fonts::menu, center_strings_colors[i], colors::black, nullptr, nullptr);
|
center_strings_colors[i], colors::black, nullptr, nullptr);
|
||||||
y += fonts::menu->size + 1;
|
y += fonts::menu->size + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -81,7 +81,6 @@ namespace fonts
|
|||||||
|
|
||||||
std::unique_ptr<glez::font> menu{ nullptr };
|
std::unique_ptr<glez::font> menu{ nullptr };
|
||||||
std::unique_ptr<glez::font> esp{ nullptr };
|
std::unique_ptr<glez::font> esp{ nullptr };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw::Initialize()
|
void draw::Initialize()
|
||||||
|
@ -35,7 +35,7 @@ glez::record::Record bufferA{};
|
|||||||
glez::record::Record bufferB{};
|
glez::record::Record bufferB{};
|
||||||
|
|
||||||
glez::record::Record *buffers[] = { &bufferA, &bufferB };
|
glez::record::Record *buffers[] = { &bufferA, &bufferB };
|
||||||
int currentBuffer = 0;
|
int currentBuffer = 0;
|
||||||
|
|
||||||
void BeginCheatVisuals()
|
void BeginCheatVisuals()
|
||||||
{
|
{
|
||||||
@ -102,6 +102,7 @@ void DrawCheatVisuals()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
hacks::tf2::global::runcfg();
|
||||||
if (spectator_target)
|
if (spectator_target)
|
||||||
{
|
{
|
||||||
AddCenterString("Press SPACE to stop spectating");
|
AddCenterString("Press SPACE to stop spectating");
|
||||||
|
@ -96,8 +96,9 @@ void DrawSpinner()
|
|||||||
int state = min(3, int(spinning_speed / 250));
|
int state = min(3, int(spinning_speed / 250));
|
||||||
|
|
||||||
glez::draw::rect_textured(draw::width / 2, draw::height / 2, size, size,
|
glez::draw::rect_textured(draw::width / 2, draw::height / 2, size, size,
|
||||||
colors::white, textures::atlas().texture, 64 * state,
|
colors::white, textures::atlas().texture,
|
||||||
(3 + (v9mode ? 0 : 1)) * 64, 64, 64, angle);
|
64 * state, (3 + (v9mode ? 0 : 1)) * 64, 64, 64,
|
||||||
|
angle);
|
||||||
if (angle > PI * 4)
|
if (angle > PI * 4)
|
||||||
angle -= PI * 4;
|
angle -= PI * 4;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user