From 7988443b1d139d5dc6c2a7bc93b21058647254ed Mon Sep 17 00:00:00 2001 From: ac-stef Date: Mon, 31 Aug 2015 15:03:22 +0200 Subject: [PATCH] partial autodownload rewrite * own source file for autodownload * use cleaned up zip functions * use new http get function (no more curl) * enforce strict file naming rules and file size limits * ping all package servers on every game start to determine ping times * support media file update lists (also kept on package servers) * allow users to manually prioritise package servers * automatically select server with newest media file revision new or changed commands: addpckserver hostname [priority] Adds a host name to the list of package servers. If a priority is given, it influences the sorting of servers. Servers with higher priority are queried first. If servers have the same priority, they are sorted by ping. Default priority is zero. getpackageserver Returns a table with four columns of all configured package servers. The columns are: host name, priority, ping and resolved. "resolved" is a flag, indicating, if the server answered the ping during game start. removed cubescript idents: sortpckservers gamestarts DOCREF addpckserver getpckserver --- source/codeblocks/AssaultCube.cbp | 4 + source/codeblocks/AssaultCube_Linux.cbp | 3 + source/src/Makefile | 4 + source/src/autodownload.cpp | 495 ++++++++++++++++++++++++ source/src/client.cpp | 302 +-------------- source/src/entity.h | 23 -- source/src/main.cpp | 10 +- source/src/openal.cpp | 138 +++---- source/src/protocol.h | 2 + source/src/protos.h | 8 +- source/src/rendermodel.cpp | 6 +- source/src/serverbrowser.cpp | 6 +- source/src/texture.cpp | 6 +- source/src/tools.cpp | 30 +- source/src/tools.h | 1 + source/src/zip.cpp | 163 -------- 16 files changed, 616 insertions(+), 585 deletions(-) create mode 100644 source/src/autodownload.cpp diff --git a/source/codeblocks/AssaultCube.cbp b/source/codeblocks/AssaultCube.cbp index d1eed2ad..6eae9e9e 100755 --- a/source/codeblocks/AssaultCube.cbp +++ b/source/codeblocks/AssaultCube.cbp @@ -431,6 +431,10 @@