Fix compile issues and WIP stuff

This commit is contained in:
BenCat07 2018-05-02 17:58:08 +02:00
parent af0520494c
commit 692aeb7dfa
8 changed files with 17 additions and 16 deletions

View File

@ -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
#endif

View File

@ -119,4 +119,4 @@ typedef IMaterial *(*FindMaterial_t)(void *, const char *, const char *, bool,
const char *pComplainPrefix);
#endif
#endif
#endif

View File

@ -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(

View File

@ -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<std::chrono::time_point<std::chrono::high_resolution_clock>>
shots{};

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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)

View File

@ -8,6 +8,7 @@ const std::vector<std::string> 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)