1
0
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:
Michał W. Urbańczyk
2013-06-22 21:47:51 +00:00
parent 2be2143844
commit 4a0587d500
15 changed files with 130 additions and 136 deletions

View File

@@ -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";