mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Do not try to shoot at 2nd hex of wide creatures
This commit is contained in:
@@ -168,6 +168,7 @@ LONG WINAPI onUnhandledException(EXCEPTION_POINTERS* exception)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
[[noreturn]] static void onTerminate()
|
||||
{
|
||||
logGlobal->error("Disaster happened.");
|
||||
@@ -205,6 +206,7 @@ LONG WINAPI onUnhandledException(EXCEPTION_POINTERS* exception)
|
||||
#endif
|
||||
std::abort();
|
||||
}
|
||||
#endif
|
||||
|
||||
void CConsoleHandler::setColor(EConsoleTextColor::EConsoleTextColor color)
|
||||
{
|
||||
@@ -296,14 +298,14 @@ CConsoleHandler::CConsoleHandler():
|
||||
|
||||
GetConsoleScreenBufferInfo(handleErr, &csbi);
|
||||
defErrColor = csbi.wAttributes;
|
||||
#ifndef _DEBUG
|
||||
#ifdef NDEBUG
|
||||
SetUnhandledExceptionFilter(onUnhandledException);
|
||||
#endif
|
||||
#else
|
||||
defColor = "\x1b[0m";
|
||||
#endif
|
||||
|
||||
#ifndef _DEBUG
|
||||
#ifdef NDEBUG
|
||||
std::set_terminate(onTerminate);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user