mirror of
https://github.com/JezuzLizard/T4SP-Server-Plugin.git
synced 2025-04-19 21:22:54 +00:00
added remaining pluto patches to our decomp
This commit is contained in:
parent
cb7619851c
commit
5e51712a02
@ -723,7 +723,19 @@ namespace codsrc
|
||||
{
|
||||
if (game::Scr_IsInOpcodeMemory(scriptInstance, codepos - 1))
|
||||
{
|
||||
game::Com_PrintMessage(channel, game::va("@ %d\n", codepos - game::gScrVarPub[scriptInstance].programBuffer), 0);
|
||||
// pluto
|
||||
const char* s;
|
||||
if (game::plutonium::at_codepose_va != nullptr)
|
||||
{
|
||||
s = game::plutonium::at_codepose_va(scriptInstance, codepos - game::gScrVarPub[scriptInstance].programBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
s = game::va("@ %d\n", codepos - game::gScrVarPub[scriptInstance].programBuffer);
|
||||
}
|
||||
|
||||
game::Com_PrintMessage(channel, s, 0);
|
||||
//
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1678,7 +1678,20 @@ namespace codsrc
|
||||
Com_Printf(game::CON_CHANNEL_PARSERSCRIPT, "EXCEED TIME: %d\n", v28);
|
||||
}*/
|
||||
|
||||
if (!game::gScrVmGlob[inst].loading)
|
||||
// pluto
|
||||
static game::dvar_s* scr_kill_infinite_loops = nullptr;
|
||||
if (!scr_kill_infinite_loops)
|
||||
{
|
||||
scr_kill_infinite_loops = game::Dvar_FindVar("scr_kill_infinite_loops");
|
||||
}
|
||||
|
||||
bool kill_infinite_loops = scr_kill_infinite_loops && scr_kill_infinite_loops->current.enabled;
|
||||
//
|
||||
|
||||
// if (!game::gScrVmGlob[inst].loading)
|
||||
// pluto
|
||||
if (kill_infinite_loops)
|
||||
//
|
||||
{
|
||||
/*if (always_false())
|
||||
{
|
||||
@ -1699,7 +1712,10 @@ namespace codsrc
|
||||
Scr_Error(inst, "potential infinite loop in script", 0);
|
||||
}*/
|
||||
|
||||
if (!game::gScrVmPub[inst].abort_on_error)
|
||||
//if (!game::gScrVmPub[inst].abort_on_error)
|
||||
// pluto
|
||||
if (kill_infinite_loops)
|
||||
//
|
||||
{
|
||||
// t5 added this extra string
|
||||
const char* side = inst == game::SCRIPTINSTANCE_CLIENT ? "client" : "server";
|
||||
@ -5440,7 +5456,24 @@ namespace codsrc
|
||||
{
|
||||
game::Scr_SetErrorMessage(inst, error);
|
||||
|
||||
game::gScrVmPub[inst].terminal_error = is_terminal;
|
||||
// pluto
|
||||
if (is_terminal)
|
||||
{
|
||||
game::gScrVmPub[inst].terminal_error = is_terminal;
|
||||
}
|
||||
|
||||
static game::dvar_s* all_gsc_errors_non_terminal = nullptr;
|
||||
if (!all_gsc_errors_non_terminal)
|
||||
{
|
||||
all_gsc_errors_non_terminal = game::Dvar_FindVar("all_gsc_errors_non_terminal");
|
||||
}
|
||||
|
||||
if (all_gsc_errors_non_terminal && all_gsc_errors_non_terminal->current.enabled)
|
||||
{
|
||||
game::gScrVmPub[inst].terminal_error = false;
|
||||
}
|
||||
//
|
||||
|
||||
game::Scr_ErrorInternal(inst);
|
||||
}
|
||||
|
||||
@ -5449,7 +5482,7 @@ namespace codsrc
|
||||
{
|
||||
game::Scr_DumpScriptThreads(inst);
|
||||
game::gScrVmPub[inst].terminal_error = 1;
|
||||
game::Scr_Error(error, inst, false);
|
||||
game::Scr_Error(error, inst, false); // yes, this is a basegame bug, pluto fixes it above
|
||||
}
|
||||
|
||||
// Decomp Status: Tested, Completed
|
||||
|
@ -209,6 +209,7 @@ namespace signatures
|
||||
SAFE_SET_PLUTO_SYMBOL_DOUBLE(scr_execthread_update_codepos_func, 0x699560, 0x11);
|
||||
SAFE_SET_PLUTO_SYMBOL_DOUBLE(scr_execentthread_update_codepos_func, 0x699640, 0x7);
|
||||
SAFE_SET_PLUTO_SYMBOL_DOUBLE(scr_addexecthread_update_codepos_func, 0x699730, 0x7);
|
||||
SAFE_SET_PLUTO_SYMBOL_DOUBLE(at_codepose_va, 0x68B3A5, 0xA);
|
||||
|
||||
SAFE_SET_PLUTO_SYMBOL(scr_get_function_stub, 0x682D99);
|
||||
SAFE_SET_PLUTO_SYMBOL(scr_get_method_stub, 0x683043);
|
||||
|
@ -20,6 +20,8 @@ namespace game
|
||||
|
||||
WEAK symbol<const char*(const char* Format, ...)>va{ 0x0, 0x5F6D80 };
|
||||
|
||||
WEAK symbol<dvar_s*(const char* dvarName)>Dvar_FindVar{ 0x0, 0x5EDE30 };
|
||||
|
||||
WEAK symbol<parseInfo_t* (const char* ArgList)>Com_BeginParseSession{ 0x0, 0x5F5830 };
|
||||
WEAK symbol<void()> Com_EndParseSession{ 0x0, 0x5F5910 };
|
||||
WEAK symbol<int()> Sys_Milliseconds{ 0x0, 0x603D40 };
|
||||
@ -79,6 +81,8 @@ namespace game
|
||||
WEAK symbol<void(game::scriptInstance_t, unsigned int*)> scr_execentthread_update_codepos_func{ 0x0, 0x0 };
|
||||
WEAK symbol<void(game::scriptInstance_t, unsigned int*)> scr_addexecthread_update_codepos_func{ 0x0, 0x0 };
|
||||
|
||||
WEAK symbol<const char*(game::scriptInstance_t, unsigned int)> at_codepose_va{ 0x0, 0x0 };
|
||||
|
||||
WEAK symbol<void()> scr_get_method_stub{ 0x0, 0x0 };
|
||||
WEAK symbol<void()> scr_get_function_stub{ 0x0, 0x0 };
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user