mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
More work on auto-fight.
Dynamic libraries return smart-pointers to what they create.
This commit is contained in:
@@ -706,7 +706,6 @@ void processCommand(const std::string &message)
|
||||
{
|
||||
if(auto ai = CDynLibHandler::getNewBattleAI(fname)) //test that given AI is indeed available... heavy but it is easy to make a typo and break the game
|
||||
{
|
||||
delete ai;
|
||||
Settings neutralAI = settings.write["server"]["neutralAI"];
|
||||
neutralAI->String() = fname;
|
||||
std::cout << "Setting changed, from now the battle ai will be " << fname << "!\n";
|
||||
|
||||
Reference in New Issue
Block a user