Merge branch 'master' into template_train_replacement
Fix Template creation window vehicle drag cursor.
This commit is contained in:
@@ -27,7 +27,7 @@ static CommandCallback * const _callback_table[] = {
|
||||
/* 0x01 */ CcBuildPrimaryVehicle,
|
||||
/* 0x02 */ CcBuildAirport,
|
||||
/* 0x03 */ CcBuildBridge,
|
||||
/* 0x04 */ CcBuildCanal,
|
||||
/* 0x04 */ CcPlaySound_SPLAT_WATER,
|
||||
/* 0x05 */ CcBuildDocks,
|
||||
/* 0x06 */ CcFoundTown,
|
||||
/* 0x07 */ CcBuildRoadTunnel,
|
||||
@@ -36,9 +36,9 @@ static CommandCallback * const _callback_table[] = {
|
||||
/* 0x0A */ CcRoadDepot,
|
||||
/* 0x0B */ CcRailDepot,
|
||||
/* 0x0C */ CcPlaceSign,
|
||||
/* 0x0D */ CcPlaySound10,
|
||||
/* 0x0E */ CcPlaySound1D,
|
||||
/* 0x0F */ CcPlaySound1E,
|
||||
/* 0x0D */ CcPlaySound_EXPLOSION,
|
||||
/* 0x0E */ CcPlaySound_SPLAT_OTHER,
|
||||
/* 0x0F */ CcPlaySound_SPLAT_RAIL,
|
||||
/* 0x10 */ CcStation,
|
||||
/* 0x11 */ CcTerraform,
|
||||
/* 0x12 */ CcAI,
|
||||
|
@@ -57,7 +57,7 @@ bool ClientNetworkContentSocketHandler::Receive_SERVER_INFO(Packet *p)
|
||||
ci->filesize = p->Recv_uint32();
|
||||
|
||||
p->Recv_string(ci->name, lengthof(ci->name));
|
||||
p->Recv_string(ci->version, lengthof(ci->name));
|
||||
p->Recv_string(ci->version, lengthof(ci->version));
|
||||
p->Recv_string(ci->url, lengthof(ci->url));
|
||||
p->Recv_string(ci->description, lengthof(ci->description), SVS_REPLACE_WITH_QUESTION_MARK | SVS_ALLOW_NEWLINE);
|
||||
|
||||
@@ -220,10 +220,9 @@ void ClientNetworkContentSocketHandler::RequestContentList(uint count, const Con
|
||||
while (count > 0) {
|
||||
/* We can "only" send a limited number of IDs in a single packet.
|
||||
* A packet begins with the packet size and a byte for the type.
|
||||
* Then this packet adds a byte for the content type and a uint16
|
||||
* for the count in this packet. The rest of the packet can be
|
||||
* used for the IDs. */
|
||||
uint p_count = min(count, (SEND_MTU - sizeof(PacketSize) - sizeof(byte) - sizeof(byte) - sizeof(uint16)) / sizeof(uint32));
|
||||
* Then this packet adds a uint16 for the count in this packet.
|
||||
* The rest of the packet can be used for the IDs. */
|
||||
uint p_count = min(count, (SEND_MTU - sizeof(PacketSize) - sizeof(byte) - sizeof(uint16)) / sizeof(uint32));
|
||||
|
||||
Packet *p = new Packet(PACKET_CONTENT_CLIENT_INFO_ID);
|
||||
p->Send_uint16(p_count);
|
||||
@@ -249,9 +248,9 @@ void ClientNetworkContentSocketHandler::RequestContentList(ContentVector *cv, bo
|
||||
|
||||
this->Connect();
|
||||
|
||||
/* 20 is sizeof(uint32) + sizeof(md5sum (byte[16])) */
|
||||
assert(cv->Length() < 255);
|
||||
assert(cv->Length() < (SEND_MTU - sizeof(PacketSize) - sizeof(byte) - sizeof(uint8)) / (send_md5sum ? 20 : sizeof(uint32)));
|
||||
assert(cv->Length() < (SEND_MTU - sizeof(PacketSize) - sizeof(byte) - sizeof(uint8)) /
|
||||
(sizeof(uint8) + sizeof(uint32) + (send_md5sum ? /*sizeof(ContentInfo::md5sum)*/16 : 0)));
|
||||
|
||||
Packet *p = new Packet(send_md5sum ? PACKET_CONTENT_CLIENT_INFO_EXTID_MD5 : PACKET_CONTENT_CLIENT_INFO_EXTID);
|
||||
p->Send_uint8(cv->Length());
|
||||
|
@@ -1892,7 +1892,7 @@ struct NetworkClientListWindow : Window {
|
||||
int diff = (num + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM) - (this->GetWidget<NWidgetBase>(WID_CL_PANEL)->current_y);
|
||||
/* If height is changed */
|
||||
if (diff != 0) {
|
||||
ResizeWindow(this, 0, diff);
|
||||
ResizeWindow(this, 0, diff, false);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user