Fix indent

This commit is contained in:
FutureRave 2022-02-10 15:00:45 +00:00
parent 8290cadbe9
commit 92a8b6464c
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955

View File

@ -204,20 +204,20 @@ namespace Components
#ifdef DEBUG #ifdef DEBUG
// Display DEBUG branding, so we know we're on a debug build // Display DEBUG branding, so we know we're on a debug build
Scheduler::OnFrame([]() Scheduler::OnFrame([]()
{
auto* font = Game::R_RegisterFont("fonts/normalFont", 0);
Game::vec4_t color = { 1.0f, 1.0f, 1.0f, 1.0f };
// Change the color when attaching a debugger
if (IsDebuggerPresent())
{ {
Game::Font_s* font = Game::R_RegisterFont("fonts/normalFont", 0); color[0] = 0.6588f;
float color[4] = { 1.0f, 1.0f, 1.0f, 1.0f }; color[1] = 1.0000f;
color[2] = 0.0000f;
}
// Change the color when attaching a debugger Game::R_AddCmdDrawText("DEBUG-BUILD", 0x7FFFFFFF, font, 15.0f, 10.0f + Game::R_TextHeight(font), 1.0f, 1.0f, 0.0f, color, Game::ITEM_TEXTSTYLE_SHADOWED);
if (IsDebuggerPresent()) }, true);
{
color[0] = 0.6588f;
color[1] = 1.0000f;
color[2] = 0.0000f;
}
Game::R_AddCmdDrawText("DEBUG-BUILD", 0x7FFFFFFF, font, 15.0f, 10.0f + Game::R_TextHeight(font), 1.0f, 1.0f, 0.0f, color, Game::ITEM_TEXTSTYLE_SHADOWED);
}, true);
#endif #endif
#if !defined(DEBUG) || defined(FORCE_EXCEPTION_HANDLER) #if !defined(DEBUG) || defined(FORCE_EXCEPTION_HANDLER)
Exception::SetFilterHook.initialize(SetUnhandledExceptionFilter, Exception::SetUnhandledExceptionFilterStub, HOOK_JUMP); Exception::SetFilterHook.initialize(SetUnhandledExceptionFilter, Exception::SetUnhandledExceptionFilterStub, HOOK_JUMP);
@ -230,28 +230,28 @@ namespace Components
Utils::Hook(0x6B8898, Exception::LongJmp, HOOK_JUMP).install()->quick(); Utils::Hook(0x6B8898, Exception::LongJmp, HOOK_JUMP).install()->quick();
Command::Add("mapTest", [](Command::Params* params) Command::Add("mapTest", [](Command::Params* params)
{
Game::UI_UpdateArenas();
std::string command;
for (auto i = 0; i < (params->length() >= 2 ? atoi(params->get(1)) : *Game::arenaCount); ++i)
{ {
Game::UI_UpdateArenas(); const auto* mapname = ArenaLength::NewArenas[i % *Game::arenaCount].mapName;
std::string command; if (!(i % 2)) command.append(Utils::String::VA("wait 250;disconnect;wait 750;", mapname)); // Test a disconnect
for (int i = 0; i < (params->length() >= 2 ? atoi(params->get(1)) : *Game::arenaCount); ++i) else command.append("wait 500;"); // Test direct map switch
{ command.append(Utils::String::VA("map %s;", mapname));
char* mapname = ArenaLength::NewArenas[i % *Game::arenaCount].mapName; }
if (!(i % 2)) command.append(Utils::String::VA("wait 250;disconnect;wait 750;", mapname)); // Test a disconnect Command::Execute(command, false);
else command.append(Utils::String::VA("wait 500;", mapname)); // Test direct map switch });
command.append(Utils::String::VA("map %s;", mapname));
}
Command::Execute(command, false);
});
Command::Add("debug_exceptionhandler", [](Command::Params*) Command::Add("debug_exceptionhandler", [](Command::Params*)
{ {
Logger::Print("Rerunning SetUnhandledExceptionHandler...\n"); Logger::Print("Rerunning SetUnhandledExceptionHandler...\n");
auto oldHandler = Exception::Hook(); auto oldHandler = Exception::Hook();
Logger::Print("Old exception handler was 0x%010X.\n", oldHandler); Logger::Print("Old exception handler was 0x%010X.\n", oldHandler);
}); });
} }
Exception::~Exception() Exception::~Exception()