Implement new cmserver join packet
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "../../stdafx.h"
|
||||
|
||||
#include "../../string_func.h"
|
||||
#include "../../rev.h"
|
||||
|
||||
#include "../../safeguards.h"
|
||||
|
||||
|
||||
@@ -360,7 +360,17 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendJoin()
|
||||
p->Send_string(_settings_client.network.client_name); // Client name
|
||||
p->Send_uint8 (_network_join.company); // PlayAs
|
||||
p->Send_uint8 (0); // Used to be language
|
||||
p->Send_uint8 (citymania::GetAvailableLoadFormats()); // Compressnion formats that we can decompress
|
||||
|
||||
/* CityMania additional fields, vanilla servers just ignore them */
|
||||
p->Send_uint8 (citymania::GetAvailableLoadFormats()); // Compressinon formats that we can decompress
|
||||
p->Send_uint8 ('C'); // CMclient join marker
|
||||
p->Send_uint8 ('M'); // CMclient join marker
|
||||
p->Send_string(_citymania_survey_key);
|
||||
p->Send_string(_openttd_build_date);
|
||||
p->Send_string(_citymania_revision_hash);
|
||||
p->Send_uint8 (_citymania_revision_modified);
|
||||
/* End CityMania fields */
|
||||
|
||||
my_client->SendPacket(std::move(p));
|
||||
return NETWORK_RECV_STATUS_OKAY;
|
||||
}
|
||||
|
||||
@@ -96,3 +96,7 @@ const char _openttd_content_version[] = "14.0";
|
||||
* have to adjust the major by 16.
|
||||
*/
|
||||
const uint32_t _openttd_newgrf_version = (14 + 16) << 24 | 0 << 20 | 1 << 19 | 28004;
|
||||
|
||||
const std::string _citymania_survey_key = "cmclient";
|
||||
const std::string _citymania_revision_hash = "${REV_HASH}";
|
||||
const uint8_t _citymania_revision_modified = ${REV_MODIFIED};
|
||||
|
||||
@@ -18,6 +18,9 @@ extern const byte _openttd_revision_modified;
|
||||
extern const byte _openttd_revision_tagged;
|
||||
extern const char _openttd_content_version[];
|
||||
extern const uint32_t _openttd_newgrf_version;
|
||||
extern const std::string _citymania_survey_key;
|
||||
extern const std::string _citymania_revision_hash;
|
||||
extern const uint8_t _citymania_revision_modified;
|
||||
|
||||
bool IsReleasedVersion();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user