Merge pull request #4 from nullifiedcat/master
Merge cats changes to prepare for a push
This commit is contained in:
commit
f19acb9a92
@ -492,7 +492,7 @@ static const std::string list_tf2 = R"(
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
"Anti-Aim" [
|
"Anti-/Anti-Aim" [
|
||||||
"Anti-Aim Menu"
|
"Anti-Aim Menu"
|
||||||
"aa_enabled"
|
"aa_enabled"
|
||||||
"aa_pitch"
|
"aa_pitch"
|
||||||
@ -502,7 +502,8 @@ static const std::string list_tf2 = R"(
|
|||||||
"aa_spin"
|
"aa_spin"
|
||||||
"aa_roll"
|
"aa_roll"
|
||||||
"aa_no_clamp"
|
"aa_no_clamp"
|
||||||
"Anti-Anti-AA" [
|
"resolver"
|
||||||
|
"Anti-Anti-Anti-Aim" [
|
||||||
"Anti-Anti-Anti-Aim Menu"
|
"Anti-Anti-Anti-Aim Menu"
|
||||||
"aa_aaaa_enabled"
|
"aa_aaaa_enabled"
|
||||||
"aa_aaaa_interval"
|
"aa_aaaa_interval"
|
||||||
@ -566,6 +567,7 @@ static const std::string list_tf2 = R"(
|
|||||||
"info"
|
"info"
|
||||||
"Debug" [
|
"Debug" [
|
||||||
"Debug Menu"
|
"Debug Menu"
|
||||||
|
"software_cursor_mode"
|
||||||
"enabled"
|
"enabled"
|
||||||
"no_visuals"
|
"no_visuals"
|
||||||
"debug_info"
|
"debug_info"
|
||||||
|
@ -23,6 +23,9 @@ CatVar pure_bypass(CV_SWITCH, "pure_bypass", "0", "Pure Bypass", "Bypass sv_pure
|
|||||||
void* pure_orig = nullptr;
|
void* pure_orig = nullptr;
|
||||||
void** pure_addr = nullptr;
|
void** pure_addr = nullptr;
|
||||||
|
|
||||||
|
CatEnum software_cursor_enum({"KEEP", "ALWAYS", "NEVER", "MENU ON", "MENU OFF"});
|
||||||
|
CatVar software_cursor_mode(software_cursor_enum, "software_cursor_mode", "1", "Software cursor", "Try to change this and see what works best for you");
|
||||||
|
|
||||||
void PaintTraverse_hook(void* p, unsigned int vp, bool fr, bool ar) {
|
void PaintTraverse_hook(void* p, unsigned int vp, bool fr, bool ar) {
|
||||||
#if DEBUG_SEGV == true
|
#if DEBUG_SEGV == true
|
||||||
if (!segvcatch::handler_fpe || !segvcatch::handler_segv) {
|
if (!segvcatch::handler_fpe || !segvcatch::handler_segv) {
|
||||||
@ -58,15 +61,25 @@ void PaintTraverse_hook(void* p, unsigned int vp, bool fr, bool ar) {
|
|||||||
g_ISurface->SetCursorAlwaysVisible(vis);
|
g_ISurface->SetCursorAlwaysVisible(vis);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (force_name.convar->m_StringLength > 2 && need_name_change) {
|
if (software_cursor_mode) {
|
||||||
INetChannel* ch = (INetChannel*)g_IEngine->GetNetChannelInfo();
|
static ConVar* software_cursor = g_ICvar->FindVar("cl_software_cursor");
|
||||||
if (ch) {
|
bool cur = software_cursor->GetBool();
|
||||||
logging::Info("Sending new name");
|
switch ((int)software_cursor_mode) {
|
||||||
NET_SetConVar setname("name", force_name.GetString());
|
case 1:
|
||||||
setname.SetNetChannel(ch);
|
if (!software_cursor->GetBool()) software_cursor->SetValue(1);
|
||||||
setname.SetReliable(false);
|
break;
|
||||||
ch->SendNetMsg(setname, false);
|
case 2:
|
||||||
need_name_change = false;
|
if (software_cursor->GetBool()) software_cursor->SetValue(0);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if (cur != g_pGUI->Visible()) {
|
||||||
|
software_cursor->SetValue(g_pGUI->Visible());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if (cur == g_pGUI->Visible()) {
|
||||||
|
software_cursor->SetValue(!g_pGUI->Visible());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +138,8 @@ void PaintTraverse_hook(void* p, unsigned int vp, bool fr, bool ar) {
|
|||||||
AddSideString("Press 'INSERT' key to open/close cheat menu.", GUIColor());
|
AddSideString("Press 'INSERT' key to open/close cheat menu.", GUIColor());
|
||||||
AddSideString("Use mouse to navigate in menu.", GUIColor());
|
AddSideString("Use mouse to navigate in menu.", GUIColor());
|
||||||
if (!g_IEngine->IsInGame() || g_pGUI->Visible()) {
|
if (!g_IEngine->IsInGame() || g_pGUI->Visible()) {
|
||||||
const char* name = (force_name.convar->m_StringLength > 2 ? force_name.GetString() : "*Not Set*");
|
std::string name(force_name.GetString());
|
||||||
|
if (name.length() < 3) name = "*Not Set*";
|
||||||
AddSideString(""); // foolish
|
AddSideString(""); // foolish
|
||||||
std::string name_stripped(name); // RIP fps
|
std::string name_stripped(name); // RIP fps
|
||||||
ReplaceString(name_stripped, "\n", "\\n");
|
ReplaceString(name_stripped, "\n", "\\n");
|
||||||
|
@ -107,7 +107,9 @@ static CatCommand minus_use_action_slot_item_server("-cat_use_action_slot_item_s
|
|||||||
g_IEngine->ServerCmdKeyValues(kv);
|
g_IEngine->ServerCmdKeyValues(kv);
|
||||||
});
|
});
|
||||||
|
|
||||||
static CatVar newlines_msg(CV_INT, "chat_newlines", "0", "Prefix newlines", "Add # newlines before each your message");
|
static CatVar newlines_msg(CV_INT, "chat_newlines", "0", "Prefix newlines", "Add # newlines before each your message", 0, 24);
|
||||||
|
// TODO replace \\n with \n
|
||||||
|
// TODO name \\n = \n
|
||||||
//static CatVar queue_messages(CV_SWITCH, "chat_queue", "0", "Queue messages", "Use this if you want to use spam/killsay and still be able to chat normally (without having your msgs eaten by valve cooldown)");
|
//static CatVar queue_messages(CV_SWITCH, "chat_queue", "0", "Queue messages", "Use this if you want to use spam/killsay and still be able to chat normally (without having your msgs eaten by valve cooldown)");
|
||||||
|
|
||||||
bool SendNetMsg_hook(void* thisptr, INetMessage& msg, bool bForceReliable = false, bool bVoice = false) {
|
bool SendNetMsg_hook(void* thisptr, INetMessage& msg, bool bForceReliable = false, bool bVoice = false) {
|
||||||
@ -162,11 +164,41 @@ void Shutdown_hook(void* thisptr, const char* reason) {
|
|||||||
|
|
||||||
static CatVar glow_enabled(CV_SWITCH, "glow_old_enabled", "0", "Enable", "Make sure to enable glow_outline_effect_enable in tf2 settings");
|
static CatVar glow_enabled(CV_SWITCH, "glow_old_enabled", "0", "Enable", "Make sure to enable glow_outline_effect_enable in tf2 settings");
|
||||||
static CatVar glow_alpha(CV_FLOAT, "glow_old_alpha", "1", "Alpha", "Glow Transparency", 0.0f, 1.0f);
|
static CatVar glow_alpha(CV_FLOAT, "glow_old_alpha", "1", "Alpha", "Glow Transparency", 0.0f, 1.0f);
|
||||||
|
static CatVar resolver(CV_SWITCH, "resolver", "0", "Resolve angles");
|
||||||
|
|
||||||
void FrameStageNotify_hook(void* thisptr, int stage) {
|
void FrameStageNotify_hook(void* thisptr, int stage) {
|
||||||
SEGV_BEGIN;
|
SEGV_BEGIN;
|
||||||
if (!g_IEngine->IsInGame()) g_Settings.bInvalid = true;
|
if (!g_IEngine->IsInGame()) g_Settings.bInvalid = true;
|
||||||
// TODO hack FSN hook
|
// TODO hack FSN hook
|
||||||
|
if (resolver && cathook && !g_Settings.bInvalid && stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START) {
|
||||||
|
for (int i = 1; i < 32 && i < HIGHEST_ENTITY; i++) {
|
||||||
|
if (i == g_IEngine->GetLocalPlayer()) continue;
|
||||||
|
IClientEntity* ent = g_IEntityList->GetClientEntity(i);
|
||||||
|
if (ent && !ent->IsDormant() && !NET_BYTE(ent, netvar.iLifeState)) {
|
||||||
|
Vector& angles = NET_VECTOR(ent, netvar.m_angEyeAngles);
|
||||||
|
if (angles.x >= 90) angles.x = -89;
|
||||||
|
if (angles.x <= -90) angles.x = 89;
|
||||||
|
while (angles.y > 180) angles.y -= 360;
|
||||||
|
while (angles.y < -180) angles.y += 360;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (stage == FRAME_NET_UPDATE_START) {
|
||||||
|
if (force_name.convar->m_StringLength > 2 && need_name_change) {
|
||||||
|
INetChannel* ch = (INetChannel*)g_IEngine->GetNetChannelInfo();
|
||||||
|
if (ch) {
|
||||||
|
logging::Info("Sending new name");
|
||||||
|
NET_SetConVar setname("name", force_name.GetString());
|
||||||
|
setname.SetNetChannel(ch);
|
||||||
|
setname.SetReliable(false);
|
||||||
|
ch->SendNetMsg(setname, false);
|
||||||
|
need_name_change = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
static ConVar* name_cv = g_ICvar->FindVar("name");
|
||||||
|
name_cv->SetValue(force_name.GetString());
|
||||||
|
name_cv->m_pszString = (char*)strfmt("%s", force_name.GetString());
|
||||||
|
}
|
||||||
if (TF && cathook && !g_Settings.bInvalid && stage == FRAME_RENDER_START) {
|
if (TF && cathook && !g_Settings.bInvalid && stage == FRAME_RENDER_START) {
|
||||||
if (glow_enabled) {
|
if (glow_enabled) {
|
||||||
for (int i = 0; i < g_GlowObjectManager->m_GlowObjectDefinitions.m_Size; i++) {
|
for (int i = 0; i < g_GlowObjectManager->m_GlowObjectDefinitions.m_Size; i++) {
|
||||||
|
Reference in New Issue
Block a user