Merge pull request #286 from diamante0018/generic-patch-13
Move static assert to the header file
This commit is contained in:
commit
2f00b24fdb
@ -168,17 +168,4 @@ namespace Components
|
||||
got->second(¶ms);
|
||||
}
|
||||
}
|
||||
|
||||
Command::Command()
|
||||
{
|
||||
AssertSize(Game::cmd_function_t, 24);
|
||||
|
||||
Command::Add("openLink", [](Command::Params* params)
|
||||
{
|
||||
if (params->size() > 1)
|
||||
{
|
||||
Utils::OpenUrl(params->get(1));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ namespace Components
|
||||
class Command : public Component
|
||||
{
|
||||
public:
|
||||
static_assert(sizeof(Game::cmd_function_t) == 0x18);
|
||||
|
||||
class Params
|
||||
{
|
||||
public:
|
||||
@ -45,7 +47,7 @@ namespace Components
|
||||
int nesting_;
|
||||
};
|
||||
|
||||
Command();
|
||||
Command() = default;
|
||||
|
||||
static Game::cmd_function_t* Allocate();
|
||||
|
||||
|
@ -231,15 +231,6 @@ namespace Components
|
||||
|
||||
QuickPatch::QuickPatch()
|
||||
{
|
||||
// quitHard
|
||||
Command::Add("quitHard", [](Command::Params*)
|
||||
{
|
||||
int data = false;
|
||||
const Utils::Library ntdll("ntdll.dll");
|
||||
ntdll.invokePascal<void>("RtlAdjustPrivilege", 19, true, false, &data);
|
||||
ntdll.invokePascal<void>("NtRaiseHardError", 0xC000007B, 0, nullptr, nullptr, 6, &data);
|
||||
});
|
||||
|
||||
// Filtering any mapents that is intended for Spec:Ops gamemode (CODO) and prevent them from spawning
|
||||
Utils::Hook(0x5FBD6E, QuickPatch::IsDynClassnameStub, HOOK_CALL).install()->quick();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user