diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/core/tcp_content.h | 1 | ||||
-rw-r--r-- | src/network/network_content.cpp | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/network/core/tcp_content.h b/src/network/core/tcp_content.h index dc56f1ad9..12996a02d 100644 --- a/src/network/core/tcp_content.h +++ b/src/network/core/tcp_content.h @@ -33,6 +33,7 @@ enum ContentType { CONTENT_TYPE_BASE_SOUNDS = 7, ///< The content consists of base sounds CONTENT_TYPE_BASE_MUSIC = 8, ///< The content consists of base music CONTENT_TYPE_GAME = 9, ///< The content consists of a game script + CONTENT_TYPE_GAME_LIBRARY = 10, ///< The content consists of a GS library CONTENT_TYPE_END, ///< Helper to mark the end of the types }; diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index 28700b69c..fe0921b5e 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -14,6 +14,7 @@ #include "../stdafx.h" #include "../rev.h" #include "../ai/ai.hpp" +#include "../game/game.hpp" #include "../window_func.h" #include "../error.h" #include "../base_media_base.h" @@ -104,6 +105,14 @@ bool ClientNetworkContentSocketHandler::Receive_SERVER_INFO(Packet *p) proc = AI::HasAILibrary; break; break; + case CONTENT_TYPE_GAME: + proc = Game::HasGame; break; + break; + + case CONTENT_TYPE_GAME_LIBRARY: + proc = Game::HasGameLibrary; break; + break; + case CONTENT_TYPE_SCENARIO: case CONTENT_TYPE_HEIGHTMAP: proc = HasScenario; @@ -183,6 +192,7 @@ void ClientNetworkContentSocketHandler::RequestContentList(ContentType type) this->RequestContentList(CONTENT_TYPE_AI); this->RequestContentList(CONTENT_TYPE_AI_LIBRARY); this->RequestContentList(CONTENT_TYPE_GAME); + this->RequestContentList(CONTENT_TYPE_GAME_LIBRARY); this->RequestContentList(CONTENT_TYPE_NEWGRF); return; } @@ -386,6 +396,7 @@ static char *GetFullFilename(const ContentInfo *ci, bool compressed) case CONTENT_TYPE_SCENARIO: dir = SCENARIO_DIR; break; case CONTENT_TYPE_HEIGHTMAP: dir = HEIGHTMAP_DIR; break; case CONTENT_TYPE_GAME: dir = GAME_DIR; break; + case CONTENT_TYPE_GAME_LIBRARY: dir = GAME_LIBRARY_DIR; break; } static char buf[MAX_PATH]; @@ -552,6 +563,10 @@ void ClientNetworkContentSocketHandler::AfterDownload() sd = GAME_DIR; break; + case CONTENT_TYPE_GAME_LIBRARY: + sd = GAME_LIBRARY_DIR; + break; + case CONTENT_TYPE_BASE_GRAPHICS: case CONTENT_TYPE_BASE_SOUNDS: case CONTENT_TYPE_BASE_MUSIC: |