(svn r24232) [1.2] -Backport from trunk:

- Fix: Dereferencing uninitialised pointer causing a crash [FS#5159] (r24224)
- Fix: Lag counters were not properly reset when switching states making it possible to get disconnected for lagging when you were not lagging [FS#5166] (r24221)
- Fix: Adopt ICU version detection to also deal with the new versioning scheme since ICU 49 (r24220)
This commit is contained in:
rubidium 2012-05-12 07:47:00 +00:00
parent 012871f24c
commit 8dfe4d2dca
3 changed files with 9 additions and 1 deletions

View File

@ -2864,7 +2864,7 @@ detect_icu() {
version=`$icu_config --version 2>/dev/null`
ret=$?
shortversion=`echo $version | cut -c 1,3`
shortversion=`echo $version | cut -d\. -f1,2 | sed "s/\.//g" | cut -c1-2`
log 2 "executing $icu_config --version"
log 2 " returned $version"
log 2 " exit code $ret"

View File

@ -450,6 +450,8 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendNeedGamePassword()
if (this->status >= STATUS_AUTH_GAME) return this->CloseConnection(NETWORK_RECV_STATUS_MALFORMED_PACKET);
this->status = STATUS_AUTH_GAME;
/* Reset 'lag' counters */
this->last_frame = this->last_frame_server = _frame_counter;
Packet *p = new Packet(PACKET_SERVER_NEED_GAME_PASSWORD);
this->SendPacket(p);
@ -463,6 +465,8 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendNeedCompanyPassword()
if (this->status >= STATUS_AUTH_COMPANY) return this->CloseConnection(NETWORK_RECV_STATUS_MALFORMED_PACKET);
this->status = STATUS_AUTH_COMPANY;
/* Reset 'lag' counters */
this->last_frame = this->last_frame_server = _frame_counter;
Packet *p = new Packet(PACKET_SERVER_NEED_COMPANY_PASSWORD);
p->Send_uint32(_settings_game.game_creation.generation_seed);
@ -481,6 +485,9 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendWelcome()
if (this->status >= STATUS_AUTHORIZED) return this->CloseConnection(NETWORK_RECV_STATUS_MALFORMED_PACKET);
this->status = STATUS_AUTHORIZED;
/* Reset 'lag' counters */
this->last_frame = this->last_frame_server = _frame_counter;
_network_game_info.clients_on++;
p = new Packet(PACKET_SERVER_WELCOME);

View File

@ -528,6 +528,7 @@ CommandCost CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uin
ind.town = ClosestTownFromTile(tile, UINT_MAX);
ind.random = initial_random_bits;
ind.founder = founder;
ind.psa = NULL;
NewIndustryResolver(&object, tile, &ind, type);
object.GetVariable = IndustryLocationGetVariable;