diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 20:54:37 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 20:54:37 +0000 |
commit | b4f832f29f44dcd48e8f0806d47ce78b1963d639 (patch) | |
tree | c637dffb7be81c82611b7345785899768b7917ac /src/network | |
parent | 12aa5b6a583aa7ca9092ec6c77e7b12677cdd6a4 (diff) | |
download | openttd-b4f832f29f44dcd48e8f0806d47ce78b1963d639.tar.xz |
(svn r23605) -Add: GAME_DIR and CONTENT_TYPE_GAME, and read gamescript from that directory
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/core/tcp_content.h | 1 | ||||
-rw-r--r-- | src/network/network_content.cpp | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/network/core/tcp_content.h b/src/network/core/tcp_content.h index 263ce6ba6..dc56f1ad9 100644 --- a/src/network/core/tcp_content.h +++ b/src/network/core/tcp_content.h @@ -32,6 +32,7 @@ enum ContentType { CONTENT_TYPE_HEIGHTMAP = 6, ///< The content consists of a heightmap 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_END, ///< Helper to mark the end of the types }; diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index 0e08cb705..28700b69c 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -182,6 +182,7 @@ void ClientNetworkContentSocketHandler::RequestContentList(ContentType type) this->RequestContentList(CONTENT_TYPE_HEIGHTMAP); this->RequestContentList(CONTENT_TYPE_AI); this->RequestContentList(CONTENT_TYPE_AI_LIBRARY); + this->RequestContentList(CONTENT_TYPE_GAME); this->RequestContentList(CONTENT_TYPE_NEWGRF); return; } @@ -384,6 +385,7 @@ static char *GetFullFilename(const ContentInfo *ci, bool compressed) case CONTENT_TYPE_AI_LIBRARY: dir = AI_LIBRARY_DIR; break; case CONTENT_TYPE_SCENARIO: dir = SCENARIO_DIR; break; case CONTENT_TYPE_HEIGHTMAP: dir = HEIGHTMAP_DIR; break; + case CONTENT_TYPE_GAME: dir = GAME_DIR; break; } static char buf[MAX_PATH]; @@ -546,6 +548,10 @@ void ClientNetworkContentSocketHandler::AfterDownload() sd = AI_LIBRARY_DIR; break; + case CONTENT_TYPE_GAME: + sd = GAME_DIR; + break; + case CONTENT_TYPE_BASE_GRAPHICS: case CONTENT_TYPE_BASE_SOUNDS: case CONTENT_TYPE_BASE_MUSIC: |