void command_add_dynamic(string& command, MAP &map) { vector<dynamic_object> objs; command = command.substr(2); #if DEBUG cerr << "Objects this time :" << endl; #endif while (command.find(';') != string::npos) { dynamic_object obj; sscanf(command.c_str(), "%i;%i;%i", &obj.x, &obj.y, &obj.r); objs.push_back(obj); command = command.substr(command.find(';')+1); command = command.substr(command.find(';')+1); command = command.substr(command.find(';')+1); #if DEBUG cerr << obj.x << ":" << obj.y << ":" << obj.r << endl; #endif } map.clear_dynamic_barriers(); for (auto &obj: objs) { map.add_dynamic_circle(obj.x, obj.y, obj.r); } }