maint: dump changes

This commit is contained in:
2024-03-31 19:13:28 +02:00
parent bab89ec828
commit e2e5e281c2
11 changed files with 68 additions and 57 deletions

View File

@@ -1,6 +1,8 @@
#include <std_include.hpp>
#include "loader/component_loader.hpp"
#include "game/game.hpp"
#include "game/dvars.hpp"
#include "game/scripting/functions.hpp"
#include <utils/hook.hpp>
@@ -19,8 +21,6 @@ namespace gsc
std::uint16_t function_id_start = 0x2DF;
void* func_table[0x1000];
const game::dvar_t* developer_script = nullptr;
namespace
{
#define RVA(ptr) static_cast<std::uint32_t>(reinterpret_cast<std::size_t>(ptr) - 0x140000000)
@@ -135,7 +135,7 @@ namespace gsc
void vm_error_stub(int mark_pos)
{
if (!developer_script->current.enabled && !force_error_print)
if (!dvars::com_developer_script->current.enabled && !force_error_print)
{
utils::hook::invoke<void>(0x1404B6790, mark_pos);
return;
@@ -263,8 +263,6 @@ namespace gsc
return;
}
developer_script = game::Dvar_RegisterBool("developer_script", false, game::DVAR_FLAG_NONE, "Enable developer script comments");
utils::hook::nop(0x1403FB7F7 + 5, 2);
utils::hook::call(0x1403FB7F7, vm_call_builtin_function);