diff --git a/changelog.txt b/changelog.txt index 7be11836f0..1bf3fd0dc6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,35 @@ +0.6.2-RC1 (2008-??-??) +------------------------------------------------------------------------ +- Fix: In the case that elrails and 'realistic' acceleration are disabled all electrified engines would have no power on load, until the vehicle got turned around, loaded or got into a depot [FS#2102]- Fix: Saving TTD imported games in recession failed due to wrong (and unneeded) type conversions in the saveload code [FS#2131] (r13679) +- Fix: Inactive companies from old (TTD) saves could be marked active in some cases, which then loads garbage in their statistics and such [FS#2126] (r13676) +- Fix: Memory leak when NewGRFs got forcefully disabled and they defined GOTO labels (r13675) +- Fix: Crash when drawing a non-real sprite caused by NewGRF interference [FS#2127] (r13674) +- Fix: Desync when building electrified trains on a dedicated server that was started with electrification disabled [FS#2122] (r13673) +- Fix: Bus/truck forgetting go-to-depot order when entering a non-drivethrough road stop [FS#2117] (r13664) +- Fix: Server crashing when banning the rconning client (r13661) +- Fix: Signals were not updated correctly when a player removed a non-existing track piece (r13626) +- Fix: Crash when one tries to raise the nothern corner of MP_VOID tiles (i.e. the southern corner of the tiles on the southern map edge) in the scenario editor [FS#2106] (r13624) +X 13623 make things look nicer +- Fix: Only the front of a RV would be considered when determining to what cargos a vehicle can be refitted instead of all cargos [FS#2109] (r13622) +- Fix: If the first bridge can not be build for a given length, then none of the other bridges can. Effectively meaning that if someone replaces the first bridge with a bridge that can be only 3 tiles longs then only other bridges that can be 3 tiles long will be buildable, but only if they are 3 tiles long [FS#2100] (r13611) +- Fix: Signal states could be propagated through waypoints built in orthogonal axis (r13589) +- Fix: [OSX] 10.5 failed to switch to fullscreen (r13584) +- Fix: RVs continueing onto next DT station when they are build adjacent to them [FS#2040] (r13581) +- Fix: Disable static NewGRFs when non-static NewGRFs query them in the context of network games. This makes it impossible for static NewGRFs to disable non-static NewGRFs and 'bad' things happening because the non-static NewGRF doesn't know about the static NewGRF (r13576) +- Fix: Properly count number of non-north housetiles [FS#2083] (r13518) +- Fix: Incorrect usage of strtoul (r13508) +- Fix: Clear the memory for the new AI during the loading of a savegame so it does not try to execute commands generated in a different savegame, which could be resulting in the AI trying to give orders to stations that do not exist (r13505) +- Fix: Drawing of zoomed out partial sprites could cause deadlocks or crashes (r13502) +- Fix: First determine where to *exactly* build a house before asking a NewGRF whether the location is good instead of possibly moving the house a tile after the NewGRF said the location is good (r13489) +- Fix: Track was not removed on company bankrupcy when there was a ship on lower halftile (r13488) +- Fix: Let ships also navigate on half-tile sloped watery rail tiles (r13485) +- Fix: Road vehicles stoppping at drive through stations of other companies [FS#2050] (r13480) +- Fix: Division by zero when one would press 'd' (skip order) when there's no order (r13409) +- Fix: Do not crash when resolving vehicle sprite groups with zero sprites (r13397) +- Fix: In the purchase list, CB36 for capacity was not called for the first part of rail and road vehicles (r13385) +- Fix: Loading of very old OpenTTD savegames was broken (r13373) + + 0.6.1 (2008-06-01) ------------------------------------------------------------------------ - Fix: Industry tiles would sometimes tell they need a 'level' slope when they do not want the slope (r13348) diff --git a/known-bugs.txt b/known-bugs.txt index 203399ab63..852a73b50a 100644 --- a/known-bugs.txt +++ b/known-bugs.txt @@ -15,12 +15,11 @@ Bugs for 0.6.1 ------------------------------------------------------------------------ URL: http://bugs.openttd.org +- 2085 Vehicle list of shared vehicles without orders not possible - 1944 Road vehicles not picking empty drivethrough platform - 1923 Unique names not always enforced -- 1891 Go to depot for servicing is forgotten - 1890 Airplanes copy helipcopters goto heliport order - 1885 Almost all unserved industries die in big maps -- 1868 In depot, cannot move wagon from another line before first wagon in a wagon-only line - 1858 Industry legend in small map overwrites buttons - 1852 Minor tram reversing glitches - 1802 Path with space in configure fails diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 48cf0a648a..6742475719 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -426,9 +426,9 @@ DEF_CONSOLE_CMD(ConBan) } if (ci != NULL) { + IConsolePrint(_icolour_def, "Client banned"); banip = inet_ntoa(*(struct in_addr *)&ci->client_ip); SEND_COMMAND(PACKET_SERVER_ERROR)(NetworkFindClientStateFromIndex(index), NETWORK_ERROR_KICKED); - IConsolePrint(_icolour_def, "Client banned"); } else { IConsolePrint(_icolour_def, "Client not online, banned IP"); } diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index ba613bd593..f72bab94dd 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -473,7 +473,7 @@ static void GenerateLandscapeWndProc(Window *w, WindowEvent *e) * (use random seed) it should not be possible to be * entered into the input field; the generate seed * button can be used instead. */ - _patches_newgame.generation_seed = minu(strtoul(_genseed_buffer, NULL, sizeof(_genseed_buffer) - 1), MAX_UVALUE(uint32) - 1); + _patches_newgame.generation_seed = minu(strtoul(_genseed_buffer, NULL, 10), MAX_UVALUE(uint32) - 1); break; case WE_DROPDOWN_SELECT: diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 29b21fc477..7058835c11 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -609,6 +609,12 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMPANY_INFO) DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_NEWGRFS_CHECKED) { + if (cs->status != STATUS_INACTIVE) { + /* Illegal call, return error and ignore the packet */ + SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_NOT_EXPECTED); + return; + } + NetworkClientInfo *ci = DEREF_CLIENT_INFO(cs); /* We now want a password from the client else we do not allow him in! */ @@ -625,6 +631,12 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_NEWGRFS_CHECKED) DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_JOIN) { + if (cs->status != STATUS_INACTIVE) { + /* Illegal call, return error and ignore the packet */ + SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_NOT_EXPECTED); + return; + } + char name[NETWORK_CLIENT_NAME_LENGTH]; char unique_id[NETWORK_UNIQUE_ID_LENGTH]; NetworkClientInfo *ci; @@ -1009,6 +1021,12 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_QUIT) DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_ACK) { + if (cs->status < STATUS_AUTH) { + /* Illegal call, return error and ignore the packet */ + SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_NOT_AUTHORIZED); + return; + } + uint32 frame = p->Recv_uint32(); /* The client is trying to catch up with the server */ @@ -1137,6 +1155,12 @@ void NetworkServer_HandleChat(NetworkAction action, DestType desttype, int dest, DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_CHAT) { + if (cs->status < STATUS_AUTH) { + /* Illegal call, return error and ignore the packet */ + SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_NOT_AUTHORIZED); + return; + } + NetworkAction action = (NetworkAction)p->Recv_uint8(); DestType desttype = (DestType)p->Recv_uint8(); int dest = p->Recv_uint16(); @@ -1149,6 +1173,12 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_CHAT) DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_SET_PASSWORD) { + if (cs->status != STATUS_ACTIVE) { + /* Illegal call, return error and ignore the packet */ + SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_NOT_EXPECTED); + return; + } + char password[NETWORK_PASSWORD_LENGTH]; const NetworkClientInfo *ci; @@ -1162,6 +1192,12 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_SET_PASSWORD) DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_SET_NAME) { + if (cs->status != STATUS_ACTIVE) { + /* Illegal call, return error and ignore the packet */ + SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_NOT_EXPECTED); + return; + } + char client_name[NETWORK_CLIENT_NAME_LENGTH]; NetworkClientInfo *ci; diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 4f13423a5f..55a1c49e88 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -543,6 +543,7 @@ static void OrdersWndProc(Window *w, WindowEvent *e) assert(w->widget[ORDER_WIDGET_REFIT].bottom == w->widget[ORDER_WIDGET_UNLOAD].bottom); assert(w->widget[ORDER_WIDGET_REFIT].display_flags == w->widget[ORDER_WIDGET_UNLOAD].display_flags); } + if (GetVehicle(w->window_number)->num_orders == 0) return; if (_patches.timetabling) { w->widget[ORDER_WIDGET_CAPTION].right -= 61; diff --git a/src/rev.cpp.in b/src/rev.cpp.in index b163a27e14..ec14f751e8 100644 --- a/src/rev.cpp.in +++ b/src/rev.cpp.in @@ -34,7 +34,7 @@ extern const char _openttd_revision[] = "@@VERSION@@"; * final release will always have a lower version number than the released * version, thus making comparisions on specific revisions easy. */ -uint32 _openttd_newgrf_version = 0 << 28 | 6 << 24 | 1 << 20 | 0 << 19 | (@@REVISION@@ & ((1 << 19) - 1)); +uint32 _openttd_newgrf_version = 0 << 28 | 6 << 24 | 2 << 20 | 0 << 19 | (@@REVISION@@ & ((1 << 19) - 1)); #ifdef __MORPHOS__ /** diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index 3a28abc407..cb2cff67bf 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -338,8 +338,6 @@ static void CommonRaiseLowerBigLand(TileIndex tile, int mode) DoCommandP(tile, SLOPE_N, (uint32)mode, CcTerraform, CMD_TERRAFORM_LAND | CMD_MSG(msg)); } else { - SndPlayTileFx(SND_1F_SPLAT, tile); - assert(_terraform_size != 0); /* check out for map overflows */ sizex = min(MapSizeX() - TileX(tile) - 1, _terraform_size); @@ -347,6 +345,8 @@ static void CommonRaiseLowerBigLand(TileIndex tile, int mode) if (sizex == 0 || sizey == 0) return; + SndPlayTileFx(SND_1F_SPLAT, tile); + if (mode != 0) { /* Raise land */ h = 15; // XXX - max height