diff --git a/include/demoserver.h b/include/demoserver.h index b21811b..e4eeef5 100644 --- a/include/demoserver.h +++ b/include/demoserver.h @@ -20,7 +20,6 @@ public: bool server_started = false; int port = 27088; int max_wait = -1; - int min_wait = -1; private: void handle_packet(AOPacket packet); diff --git a/src/demoserver.cpp b/src/demoserver.cpp index 579aa8d..7566465 100644 --- a/src/demoserver.cpp +++ b/src/demoserver.cpp @@ -212,35 +212,11 @@ void DemoServer::handle_packet(AOPacket packet) } else if (contents[1].startsWith("/min_wait")) { - QStringList args = contents[1].split(" "); - if (args.size() > 1) - { - bool ok; - int p_min_wait = args.at(1).toInt(&ok); - if (ok) - { - if (p_min_wait < 0) - p_min_wait = -1; - min_wait = p_min_wait; - client_sock->write("CT#DEMO#Setting min_wait to "); - client_sock->write(QString::number(min_wait).toUtf8()); - client_sock->write(" milliseconds.#1#%"); - } - else - { - client_sock->write("CT#DEMO#Not a valid integer!#1#%"); - } - } - else - { - client_sock->write("CT#DEMO#Current min_wait is "); - client_sock->write(QString::number(min_wait).toUtf8()); - client_sock->write(" milliseconds.#1#%"); - } + client_sock->write("CT#DEMO#min_wait is deprecated. Use the client Settings for minimum wait instead!"); } else if (contents[1].startsWith("/help")) { - client_sock->write("CT#DEMO#Available commands:\nload, play, pause, max_wait, min_wait, help#1#%"); + client_sock->write("CT#DEMO#Available commands:\nload, play, pause, max_wait, help#1#%"); } } } @@ -285,9 +261,6 @@ void DemoServer::playback() int duration = wait_packet.get_contents().at(0).toInt(); if (max_wait != -1 && duration + elapsed_time > max_wait) duration = qMax(0, max_wait - elapsed_time); - // We use elapsed_time to make sure that the packet we're using min_wait on is "priority" (e.g. IC) - if (elapsed_time == 0 && min_wait != -1 && duration < min_wait) - duration = min_wait; elapsed_time += duration; timer->start(duration); }