2022-05-09 21:21:05 +02:00
|
|
|
//=============================================================================//
|
|
|
|
//
|
|
|
|
// Purpose:
|
|
|
|
//
|
|
|
|
//=============================================================================//
|
|
|
|
|
|
|
|
#include "core/stdafx.h"
|
|
|
|
#include "tier0/tslist.h"
|
2023-05-06 16:23:56 +02:00
|
|
|
#include "vscript/languages/squirrel_re/include/sqvm.h"
|
|
|
|
#include "vscript/languages/squirrel_re/include/sqstdaux.h"
|
2022-05-09 21:21:05 +02:00
|
|
|
|
|
|
|
bool g_bSQAuxError = false;
|
2022-05-20 01:16:30 +02:00
|
|
|
bool g_bSQAuxBadLogic = false;
|
2022-08-08 17:49:46 +02:00
|
|
|
HSQUIRRELVM g_pErrorVM = nullptr;
|
|
|
|
|
2022-05-09 21:21:05 +02:00
|
|
|
SQInteger sqstd_aux_printerror(HSQUIRRELVM v)
|
|
|
|
{
|
|
|
|
g_bSQAuxError = true;
|
|
|
|
SQInteger results = v_sqstd_aux_printerror(v);
|
|
|
|
g_bSQAuxError = false;
|
|
|
|
return results;
|
|
|
|
}
|
|
|
|
|
2022-05-20 01:12:05 +02:00
|
|
|
SQInteger sqstd_aux_badlogic(HSQUIRRELVM v, __m128i* a2, __m128i* a3)
|
2022-05-20 01:07:42 +02:00
|
|
|
{
|
2022-08-08 17:49:46 +02:00
|
|
|
g_pErrorVM = v;
|
|
|
|
|
2022-05-20 01:12:05 +02:00
|
|
|
SQInteger results = v_sqstd_aux_badlogic(v, a2, a3);
|
2022-05-20 01:07:42 +02:00
|
|
|
return results;
|
|
|
|
}
|
|
|
|
|
2023-11-26 13:21:20 +01:00
|
|
|
void VSquirrelAUX::Detour(const bool bAttach) const
|
2022-05-09 21:21:05 +02:00
|
|
|
{
|
2023-11-26 13:21:20 +01:00
|
|
|
DetourSetup(&v_sqstd_aux_printerror, &sqstd_aux_printerror, bAttach);
|
|
|
|
DetourSetup(&v_sqstd_aux_badlogic, &sqstd_aux_badlogic, bAttach);
|
2022-05-09 21:21:05 +02:00
|
|
|
}
|