diff --git a/client/CMT.cpp b/client/CMT.cpp index bdbd32ff2..6961b0be6 100644 --- a/client/CMT.cpp +++ b/client/CMT.cpp @@ -69,6 +69,7 @@ std::queue events; boost::mutex eventsM; TTF_Font * TNRB16, *TNR, *GEOR13, *GEORXX, *GEORM, *GEOR16; +static bool gOnlyAI = false; void processCommand(const std::string &message, CClient *&client); static void setScreenRes(int w, int h, int bpp, bool fullscreen); @@ -201,6 +202,14 @@ int main(int argc, char** argv) CPG->showMainMenu(); StartInfo *options = new StartInfo(CPG->runLoop()); + if(gOnlyAI) + { + for (size_t i =0; i < options->playerInfos.size(); i++) + { + options->playerInfos[i].human = false; + } + } + if(screen->w != conf.cc.resx || screen->h != conf.cc.resy) { setScreenRes(conf.cc.resx,conf.cc.resy,conf.cc.bpp,conf.cc.fullscreen); @@ -405,6 +414,10 @@ void processCommand(const std::string &message, CClient *&client) *ptr = 666; //disaster! } + else if(cn == "onlyai") + { + gOnlyAI = true; + } else if(client && client->serv && client->serv->connected) //send to server { PlayerMessage pm(LOCPLINT->playerID,message);