diff --git a/include/MiscTemporary.hpp b/include/MiscTemporary.hpp index f36c6301..6d59bf1c 100644 --- a/include/MiscTemporary.hpp +++ b/include/MiscTemporary.hpp @@ -8,7 +8,6 @@ #include "common.hpp" // This is a temporary file to put code that needs moving/refactoring in. - extern bool *bSendPackets; extern CatVar no_zoom; extern CatVar clean_screenshots; @@ -26,4 +25,4 @@ extern CatVar semiauto; extern CatVar engine_pred; #if ENABLE_VISUALS extern int spectator_target; -#endif \ No newline at end of file +#endif diff --git a/include/hooks/HookedMethods.hpp b/include/hooks/HookedMethods.hpp index 9a39fa00..5e0ea1b8 100644 --- a/include/hooks/HookedMethods.hpp +++ b/include/hooks/HookedMethods.hpp @@ -119,4 +119,4 @@ typedef IMaterial *(*FindMaterial_t)(void *, const char *, const char *, bool, const char *pComplainPrefix); #endif -#endif \ No newline at end of file +#endif diff --git a/src/MiscTemporary.cpp b/src/MiscTemporary.cpp index 55c9d16f..a35c843c 100644 --- a/src/MiscTemporary.cpp +++ b/src/MiscTemporary.cpp @@ -4,7 +4,6 @@ */ #include "MiscTemporary.hpp" - CatVar minigun_jump(CV_SWITCH, "minigun_jump", "0", "TF2C minigun jump", "Allows jumping while shooting with minigun"); @@ -24,8 +23,6 @@ CatVar serverlag_amount( CV_INT, "serverlag", "0", "serverlag", "Lag the server by spamming this many voicecommands per tick"); CatVar semiauto(CV_INT, "semiauto", "0", "Semiauto"); -static CatVar servercrash(CV_SWITCH, "servercrash", "0", "crash servers", - "Crash servers by spamming signon net messages"); bool *bSendPackets; CatVar crypt_chat( diff --git a/src/hitrate.cpp b/src/hitrate.cpp index 3e461fd1..a8574dd4 100755 --- a/src/hitrate.cpp +++ b/src/hitrate.cpp @@ -18,7 +18,7 @@ int count_shots{ 0 }; int count_hits{ 0 }; int count_hits_head{ 0 }; -static CatVar hitrate_check(CV_SWITCH, "hitrate", "1", "Monitor hitrate"); +CatVar hitrate_check(CV_SWITCH, "hitrate", "1", "Monitor hitrate"); std::vector> shots{}; diff --git a/src/hooks/SendNetMsg.cpp b/src/hooks/SendNetMsg.cpp index 01543a4d..4cca2205 100644 --- a/src/hooks/SendNetMsg.cpp +++ b/src/hooks/SendNetMsg.cpp @@ -12,11 +12,8 @@ static CatVar newlines_msg(CV_INT, "chat_newlines", "0", "Prefix newlines", static CatVar log_sent(CV_SWITCH, "debug_log_sent_messages", "0", "Log sent messages"); -static CatVar airstuck(CV_KEY, "airstuck", "0", "Airstuck", ""); - -namespace hooked_methods +static CatVar airstuck(CV_KEY, "airstuck", "0", "Airstuck", "");namespace hooked_methods { - DEFINE_HOOKED_METHOD(SendNetMsg, bool, INetChannel *this_, INetMessage &msg, bool force_reliable, bool voice) { @@ -24,7 +21,6 @@ DEFINE_HOOKED_METHOD(SendNetMsg, bool, INetChannel *this_, INetMessage &msg, int offset; std::string newlines; NET_StringCmd stringcmd; - // net_StringCmd if (msg.GetType() == 4 && (newlines_msg || crypt_chat)) { @@ -103,4 +99,4 @@ DEFINE_HOOKED_METHOD(SendNetMsg, bool, INetChannel *this_, INetMessage &msg, } return original::SendNetMsg(this_, msg, force_reliable, voice); } -} \ No newline at end of file +} diff --git a/src/hooks/visual/FrameStageNotify.cpp b/src/hooks/visual/FrameStageNotify.cpp index 3157a02b..aec1279e 100644 --- a/src/hooks/visual/FrameStageNotify.cpp +++ b/src/hooks/visual/FrameStageNotify.cpp @@ -9,7 +9,8 @@ static CatVar resolver(CV_SWITCH, "resolver", "0", "Resolve angles"); static CatVar nightmode(CV_SWITCH, "nightmode", "0", "Enable nightmode", ""); - +static CatVar servercrash(CV_SWITCH, "servercrash", "0", "crash servers", + "Crash servers by spamming signon net messages"); namespace hooked_methods { @@ -56,6 +57,13 @@ DEFINE_HOOKED_METHOD(FrameStageNotify, void, void *this_, OldNightmode = nightmode; } } +// if (servercrash.KeyDown()) { +// NET_SignonState voice_meme(6, 0); +// INetChannel *ch = (INetChannel *) g_IEngine->GetNetChannelInfo(); +// for(int i = 0; i<128; i++) +// ch->SendNetMsg((INetMessage&)voice_meme, false, false); +// ch->Transmit(); +// } static IClientEntity *ent; PROF_SECTION(FrameStageNotify_TOTAL); @@ -130,4 +138,4 @@ DEFINE_HOOKED_METHOD(FrameStageNotify, void, void *this_, } return original::FrameStageNotify(this_, stage); } -} \ No newline at end of file +} diff --git a/src/sdk/netmessage.cpp b/src/sdk/netmessage.cpp index 867eb546..3680d8d2 100755 --- a/src/sdk/netmessage.cpp +++ b/src/sdk/netmessage.cpp @@ -408,7 +408,7 @@ bool NET_SignonState::ReadFromBuffer(bf_read &buffer) const char *NET_SignonState::ToString(void) const { - return "(null)"; + return strfmt("net_SignonState: state %i, count %i", m_nSignonState, m_nSpawnCount); } bool NET_SetConVar::WriteToBuffer(bf_write &buffer) diff --git a/src/visual/menu/compatibilitylayer.cpp b/src/visual/menu/compatibilitylayer.cpp index 39e8c26d..b6a4300b 100755 --- a/src/visual/menu/compatibilitylayer.cpp +++ b/src/visual/menu/compatibilitylayer.cpp @@ -8,6 +8,7 @@ const std::vector fonts = { "Tahoma Bold", "Tahoma", "TF2 Build", "Verdana", "Verdana Bold", "Arial", "Courier New", "Ubuntu Mono Bold" }; +CatEnum family_enum(fonts); } int colorsint::FromHSL(float h, float s, float v)