mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
Show message to player and close game if creature battle animation is
missing (demo assets usage?)
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
#include "../gui/CGuiHandler.h"
|
#include "../gui/CGuiHandler.h"
|
||||||
#include "../gui/CursorHandler.h"
|
#include "../gui/CursorHandler.h"
|
||||||
|
|
||||||
|
#include "../CMT.h"
|
||||||
#include "../CPlayerInterface.h"
|
#include "../CPlayerInterface.h"
|
||||||
#include "../CGameInfo.h"
|
#include "../CGameInfo.h"
|
||||||
#include "../PlayerLocalState.h"
|
#include "../PlayerLocalState.h"
|
||||||
@@ -638,7 +639,13 @@ CCreaturePic::CCreaturePic(int x, int y, const CCreature * cre, bool Big, bool A
|
|||||||
assert(CGI->townh->size() > faction);
|
assert(CGI->townh->size() > faction);
|
||||||
|
|
||||||
if (cre->animDefName.empty())
|
if (cre->animDefName.empty())
|
||||||
throw std::runtime_error("Creature " + cre->getJsonKey() + " has no valid combat animation!");
|
{
|
||||||
|
GH.dispatchMainThread([cre]()
|
||||||
|
{
|
||||||
|
handleFatalError("Creature " + cre->getJsonKey() + " has no valid combat animation!", false);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(Big)
|
if(Big)
|
||||||
bg = std::make_shared<CPicture>((*CGI->townh)[faction]->creatureBg130);
|
bg = std::make_shared<CPicture>((*CGI->townh)[faction]->creatureBg130);
|
||||||
|
Reference in New Issue
Block a user