use dev_script for debugcode
This commit is contained in:
parent
3a9ec90127
commit
52d2a101e6
@ -653,7 +653,7 @@ namespace Components
|
|||||||
|
|
||||||
const auto toggle = Game::Scr_GetInt(0);
|
const auto toggle = Game::Scr_GetInt(0);
|
||||||
Game::scrVmPub->debugCode = (toggle) ? true : false;
|
Game::scrVmPub->debugCode = (toggle) ? true : false;
|
||||||
});
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Script::Script()
|
Script::Script()
|
||||||
@ -667,15 +667,16 @@ namespace Components
|
|||||||
// Enable scr_error printing if in developer
|
// Enable scr_error printing if in developer
|
||||||
Dvar::OnInit([]()
|
Dvar::OnInit([]()
|
||||||
{
|
{
|
||||||
int developer = Dvar::Var("developer").get<int>();
|
const auto developer = Dvar::Var("developer").get<int>();
|
||||||
|
const auto developer_script = Dvar::Var("developer_script").get<bool>();
|
||||||
|
|
||||||
if (developer > 0 && Dedicated::IsEnabled())
|
if (developer > 0 && Dedicated::IsEnabled())
|
||||||
{
|
|
||||||
Utils::Hook::Set<BYTE>(0x48D8C7, 0x75);
|
Utils::Hook::Set<BYTE>(0x48D8C7, 0x75);
|
||||||
|
|
||||||
// Seems to always be false, if set to true
|
// Seems to always be false, if set to true
|
||||||
// it will call RuntimeErrorInternal
|
// it will call RuntimeErrorInternal
|
||||||
|
if (developer_script)
|
||||||
Game::scrVmPub->debugCode = true;
|
Game::scrVmPub->debugCode = true;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Utils::Hook(0x612E8D, Script::FunctionError, HOOK_CALL).install()->quick();
|
Utils::Hook(0x612E8D, Script::FunctionError, HOOK_CALL).install()->quick();
|
||||||
|
Loading…
Reference in New Issue
Block a user