clear on com_error stub, not exception

This commit is contained in:
m 2021-06-09 00:30:41 -05:00
parent 2b7988d4ba
commit db55e4aa47
2 changed files with 3 additions and 4 deletions

View File

@ -3,8 +3,6 @@
#include "system_check.hpp"
#include "scheduler.hpp"
#include "party.hpp"
#include "game/game.hpp"
#include <utils/hook.hpp>
@ -125,8 +123,6 @@ namespace exception
recovery_data.last_recovery = std::chrono::high_resolution_clock::now();
++recovery_data.recovery_counts;
party::clear_sv_motd(); // clear sv_motd on error
game::Com_Error(game::ERR_DROP, "Fatal error (0x%08X) at 0x%p.\nA minidump has been written.\n\n"
"S1x has tried to recover your game, but it might not run stable anymore.\n\n"
"Make sure to update your graphics card drivers and install operating system updates!\n"

View File

@ -1,6 +1,7 @@
#include <std_include.hpp>
#include "loader/component_loader.hpp"
#include "party.hpp"
#include "game/game.hpp"
#include "console.hpp"
@ -55,6 +56,8 @@ namespace logger
console::error("Error: %s\n", buffer);
}
party::clear_sv_motd(); // clear sv_motd on error if it exists
com_error_hook.invoke<void>(error, "%s", buffer);
}