Fix compile issues and WIP stuff
This commit is contained in:
parent
af0520494c
commit
692aeb7dfa
@ -8,7 +8,6 @@
|
|||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
|
|
||||||
// This is a temporary file to put code that needs moving/refactoring in.
|
// This is a temporary file to put code that needs moving/refactoring in.
|
||||||
|
|
||||||
extern bool *bSendPackets;
|
extern bool *bSendPackets;
|
||||||
extern CatVar no_zoom;
|
extern CatVar no_zoom;
|
||||||
extern CatVar clean_screenshots;
|
extern CatVar clean_screenshots;
|
||||||
@ -26,4 +25,4 @@ extern CatVar semiauto;
|
|||||||
extern CatVar engine_pred;
|
extern CatVar engine_pred;
|
||||||
#if ENABLE_VISUALS
|
#if ENABLE_VISUALS
|
||||||
extern int spectator_target;
|
extern int spectator_target;
|
||||||
#endif
|
#endif
|
||||||
|
@ -119,4 +119,4 @@ typedef IMaterial *(*FindMaterial_t)(void *, const char *, const char *, bool,
|
|||||||
const char *pComplainPrefix);
|
const char *pComplainPrefix);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MiscTemporary.hpp"
|
#include "MiscTemporary.hpp"
|
||||||
|
|
||||||
CatVar minigun_jump(CV_SWITCH, "minigun_jump", "0", "TF2C minigun jump",
|
CatVar minigun_jump(CV_SWITCH, "minigun_jump", "0", "TF2C minigun jump",
|
||||||
"Allows jumping while shooting with minigun");
|
"Allows jumping while shooting with minigun");
|
||||||
|
|
||||||
@ -24,8 +23,6 @@ CatVar serverlag_amount(
|
|||||||
CV_INT, "serverlag", "0", "serverlag",
|
CV_INT, "serverlag", "0", "serverlag",
|
||||||
"Lag the server by spamming this many voicecommands per tick");
|
"Lag the server by spamming this many voicecommands per tick");
|
||||||
CatVar semiauto(CV_INT, "semiauto", "0", "Semiauto");
|
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;
|
bool *bSendPackets;
|
||||||
|
|
||||||
CatVar crypt_chat(
|
CatVar crypt_chat(
|
||||||
|
@ -18,7 +18,7 @@ int count_shots{ 0 };
|
|||||||
int count_hits{ 0 };
|
int count_hits{ 0 };
|
||||||
int count_hits_head{ 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<std::chrono::time_point<std::chrono::high_resolution_clock>>
|
std::vector<std::chrono::time_point<std::chrono::high_resolution_clock>>
|
||||||
shots{};
|
shots{};
|
||||||
|
@ -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",
|
static CatVar log_sent(CV_SWITCH, "debug_log_sent_messages", "0",
|
||||||
"Log sent messages");
|
"Log sent messages");
|
||||||
static CatVar airstuck(CV_KEY, "airstuck", "0", "Airstuck", "");
|
static CatVar airstuck(CV_KEY, "airstuck", "0", "Airstuck", "");namespace hooked_methods
|
||||||
|
|
||||||
namespace hooked_methods
|
|
||||||
{
|
{
|
||||||
|
|
||||||
DEFINE_HOOKED_METHOD(SendNetMsg, bool, INetChannel *this_, INetMessage &msg,
|
DEFINE_HOOKED_METHOD(SendNetMsg, bool, INetChannel *this_, INetMessage &msg,
|
||||||
bool force_reliable, bool voice)
|
bool force_reliable, bool voice)
|
||||||
{
|
{
|
||||||
@ -24,7 +21,6 @@ DEFINE_HOOKED_METHOD(SendNetMsg, bool, INetChannel *this_, INetMessage &msg,
|
|||||||
int offset;
|
int offset;
|
||||||
std::string newlines;
|
std::string newlines;
|
||||||
NET_StringCmd stringcmd;
|
NET_StringCmd stringcmd;
|
||||||
|
|
||||||
// net_StringCmd
|
// net_StringCmd
|
||||||
if (msg.GetType() == 4 && (newlines_msg || crypt_chat))
|
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);
|
return original::SendNetMsg(this_, msg, force_reliable, voice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
|
|
||||||
static CatVar resolver(CV_SWITCH, "resolver", "0", "Resolve angles");
|
static CatVar resolver(CV_SWITCH, "resolver", "0", "Resolve angles");
|
||||||
static CatVar nightmode(CV_SWITCH, "nightmode", "0", "Enable nightmode", "");
|
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
|
namespace hooked_methods
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -56,6 +57,13 @@ DEFINE_HOOKED_METHOD(FrameStageNotify, void, void *this_,
|
|||||||
OldNightmode = nightmode;
|
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;
|
static IClientEntity *ent;
|
||||||
|
|
||||||
PROF_SECTION(FrameStageNotify_TOTAL);
|
PROF_SECTION(FrameStageNotify_TOTAL);
|
||||||
@ -130,4 +138,4 @@ DEFINE_HOOKED_METHOD(FrameStageNotify, void, void *this_,
|
|||||||
}
|
}
|
||||||
return original::FrameStageNotify(this_, stage);
|
return original::FrameStageNotify(this_, stage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -408,7 +408,7 @@ bool NET_SignonState::ReadFromBuffer(bf_read &buffer)
|
|||||||
|
|
||||||
const char *NET_SignonState::ToString(void) const
|
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)
|
bool NET_SetConVar::WriteToBuffer(bf_write &buffer)
|
||||||
|
@ -8,6 +8,7 @@ const std::vector<std::string> fonts = { "Tahoma Bold", "Tahoma",
|
|||||||
"TF2 Build", "Verdana",
|
"TF2 Build", "Verdana",
|
||||||
"Verdana Bold", "Arial",
|
"Verdana Bold", "Arial",
|
||||||
"Courier New", "Ubuntu Mono Bold" };
|
"Courier New", "Ubuntu Mono Bold" };
|
||||||
|
CatEnum family_enum(fonts);
|
||||||
}
|
}
|
||||||
|
|
||||||
int colorsint::FromHSL(float h, float s, float v)
|
int colorsint::FromHSL(float h, float s, float v)
|
||||||
|
Reference in New Issue
Block a user