r5sdk/r5dev/squirrel/sqstdaux.cpp
Kawe Mazidjatari 46134434a9 Show script error callstacks and context in colors in the external console
Show colors on console and use color constant to determine color instead of comparing strings in the console render loop. removed 5 string compares which should once again bump the performance quite a bit. The last string compares will be removed soon
2022-05-09 21:21:05 +02:00

29 lines
695 B
C++

//=============================================================================//
//
// Purpose:
//
//=============================================================================//
#include "core/stdafx.h"
#include "tier0/tslist.h"
#include "squirrel/sqvm.h"
#include "squirrel/sqstdaux.h"
bool g_bSQAuxError = false;
SQInteger sqstd_aux_printerror(HSQUIRRELVM v)
{
g_bSQAuxError = true;
SQInteger results = v_sqstd_aux_printerror(v);
g_bSQAuxError = false;
return results;
}
void SQAUX_Attach()
{
DetourAttach((LPVOID*)&v_sqstd_aux_printerror, &sqstd_aux_printerror);
}
void SQAUX_Detach()
{
DetourDetach((LPVOID*)&v_sqstd_aux_printerror, &sqstd_aux_printerror);
}