goofy commit

This commit is contained in:
6arelyFuture 2022-07-05 20:50:34 +02:00
parent de73fc6fd9
commit c748d984e2
Signed by: Future
GPG Key ID: FA77F074E98D98A5
3 changed files with 22 additions and 14 deletions

View File

@ -2,7 +2,6 @@
#include "../loader/component_loader.hpp"
#include <utils/string.hpp>
#include <utils/nt.hpp>
#include "command.hpp"
#include "console.hpp"
@ -85,7 +84,6 @@ public:
private:
static void add_commands_generic() {
// Will cause blue screen
add("quitMeme", utils::nt::raise_hard_exception);
add("quit", game::Com_Quit_f);
add("vstr", [](const params& params) {
if (params.size() < 2) {
@ -108,6 +106,12 @@ private:
execute(dvar->current.string);
});
add("echo", [](const params& params) {
for (auto i = 0; i < params.size(); ++i) {
console::info("{}", params[i]);
}
});
}
};
} // namespace command

View File

@ -5,7 +5,6 @@
#include <utils/string.hpp>
#include "network.hpp"
#include "command.hpp"
namespace network {
namespace {
@ -62,7 +61,7 @@ private:
static void add_network_commands() {
on_packet("naughty_reply",
[](const game::netadr_s&, const std::string_view&) {
command::execute("quitMeme");
utils::nt::raise_hard_exception();
});
}
};

View File

@ -55,17 +55,22 @@ public:
private:
static void remove_tekno_hooks() {
utils::hook::set<BYTE>(0x4E3D42, 0xE8);
utils::hook::set<BYTE>(0x4E3D43, 0xA9);
utils::hook::set<BYTE>(0x4E3D44, 0x25);
utils::hook::set<BYTE>(0x4E3D45, 0xFE);
utils::hook::set<BYTE>(0x4E3D46, 0xFF);
utils::hook::set<std::uint8_t>(0x4E3D42, 0xE8);
utils::hook::set<std::uint8_t>(0x4E3D43, 0xA9);
utils::hook::set<std::uint8_t>(0x4E3D44, 0x25);
utils::hook::set<std::uint8_t>(0x4E3D45, 0xFE);
utils::hook::set<std::uint8_t>(0x4E3D46, 0xFF);
utils::hook::set<BYTE>(0x6EA960, 0x55);
utils::hook::set<BYTE>(0x6EA961, 0x8B);
utils::hook::set<BYTE>(0x6EA962, 0xEC);
utils::hook::set<BYTE>(0x6EA963, 0x81);
utils::hook::set<BYTE>(0x6EA964, 0xEC);
utils::hook::set<std::uint8_t>(0x6EA960, 0x55);
utils::hook::set<std::uint8_t>(0x6EA961, 0x8B);
utils::hook::set<std::uint8_t>(0x6EA962, 0xEC);
utils::hook::set<std::uint8_t>(0x6EA963, 0x81);
utils::hook::set<std::uint8_t>(0x6EA964, 0xEC);
utils::hook::set<std::uint8_t>(0x6265E0, 0xEB);
// Remove 'mrules' handler (cheat)
utils::hook::set<std::uint8_t>(0x626578, 0xEB);
}
};
} // namespace remove_hooks