Commit Graph

157 Commits

Author SHA1 Message Date
rubidium 7fff0a71f2 (svn r10280) [0.5] -Backport from trunk (r10109, r10219, r10222, r10230, r10246, r10258):
- Fix: Do not look in every direction for tunnels when building one, one direction is enough (r10258)
- Fix: Take the age of the front vehicle for station rating (r10246)
- Fix: Terraforming wipes out canals. Now you always have to remove the canal before terraforming, instead of "just" removing the canal [FS#594] (r10240)
- Fix: Only 2 trains could crash at one time as collision checking stopped on the first hit. This could technically cause desyncs in network games as the collision hash order is not guaranteed [FS#892] (r10222)
- Fix: Land under foundations was terraform when it shouldn't be terraformed [FS#882, FS#890] (r10219)
- Fix: Some NewGRFs use the same (unused in the "current" climate) sprite IDs. Normally this gives some artefacts, but when one NewGRF expects it to be a sprite and another NewGRF overwrites it with a non-sprite nasty things happen (drawing a non-sprite crashes OTTD) [FS#838] (r10109)
2007-06-22 20:12:09 +00:00
truelight c04f0af19b (svn r9583) [0.5] -Backport from trunk (r9529, r9533, r9540, r9541):
- Fix: when 2 clients joined together, the second asserted on the NewCompany command of the first (r9529)
- Fix: when company is removed, sell all shares he has first, then sell all shares other people might have in this company (r9533)
- Fix: bankrupt AIs no longer buy over themselves (also added safeguards to prevent in future) (r9540 / r9541)
2007-04-10 09:49:41 +00:00
rubidium 41727b6e23 (svn r9347) [0.5] -Backport from trunk (r9019, r9076, r9077):
- Fix: use <> for system-headers (r9019)
- Fix: the intercontinental airport used 'T-junction' runway sprites when there is no exit in the middle of the runway as in the city airport (r9076)
- Fix: the wrong catenary wires were drawn for tunnel entrances (r9077)
2007-03-19 19:56:16 +00:00
rubidium 1e7cca8f8b (svn r9344) [0.5] -Backport from trunk (r9027, r9038, r9061, r9071):
- Fix: desync caused by buffer overflow (r9027)
- Feature: kick inactive initial network connections after some time (r9038, r9061)
- Fix: take over companies properly in multiplayer games (r9071)
2007-03-19 19:34:44 +00:00
Darkvater f08141ae48 (svn r8173) -Backport from trunk (r8026):
- picking up transferring cargo, trains will now also have the virtual profit deducted
2007-01-17 00:08:49 +00:00
Darkvater b5715acaf8 (svn r7676) -Backport from trunk (r7630, r7631):
- cur/old economy memmove magic (r7630).
 - wrong pointer arithmetic that totally corrupted animated_tiles table, desyncing
   between different endiannes-machines in multiplayer (r7631).
2006-12-30 23:25:57 +00:00
Darkvater 0adf61e7fa (svn r7673) -Backport from trunk (r7563):
- [FS#468] Removing towns in scenario editor didn't remove their subsidies.
2006-12-30 23:21:55 +00:00
Darkvater f3424f51bc (svn r7671) -Backport from trunk (r7560, r7561, r7566):
- No new company could join if 8 clients were connected in less than 8 companies (r7560).
 - [FS#431] internal and visible settings of autorenew could go out of sync (r8561).
 - Server told clients to start syncing from a bad position, causing asserts/crashes (r7566).
2006-12-30 23:20:00 +00:00
Darkvater 6c8f12de78 (svn r7670) -Backport from trunk (r7558, r7559):
- [FS#464] do not wait till a crashed vehicle is removed before starting to load
 other vehicles (r7558).
 - [FS#456] clicking 'full load' can change depot order under certain circumstances (r7559).
2006-12-30 23:14:39 +00:00
peter1138 6648621e08 (svn r7433) -Fix (r2301): Town ratings were not reset when a company went bankrupt. 2006-12-08 12:31:34 +00:00
peter1138 908552d7ed (svn r7377) -Fix (r7326): With gradual loading, make sure cargo is only paid for once, and always notify the station the vehicle was present. (Maedhros) 2006-12-05 17:53:33 +00:00
peter1138 52d0c3b08a (svn r7335) -Codechange: redraw station tiles when cargo is moved, for newstations 2006-12-03 18:28:42 +00:00
peter1138 039794e83c (svn r7326) -Feature: Add support for gradual (un)loading of vehicles (Maedhros) 2006-12-02 16:56:32 +00:00
bjarni ed46b7d380 (svn r7138) -Fix: [vehicle list windows] fixed a rare crash where having some (not all) vehicle list windows open for a player, that goes bankrupt would crash the game
-Codechange: closing all windows for a player will now loop all windows and close those, which got the player as caption instead of having a list of windows to close
2006-11-13 20:33:51 +00:00
Darkvater 73ca5faa2e (svn r7125) -Fix: Several errors/glitches related to multiplayer and bankrupcy, mainly such a
thing happening to a server, and non updated company-information. Also fixes FS#393.
2006-11-10 17:52:51 +00:00
Darkvater e97d801d92 (svn r6816) -Codechange: Some coding style, variable localization, const correctness.
-Codechange: 'quited' is not a word, use has_quit instead for NetworkClientState
2006-10-17 23:34:12 +00:00
Darkvater fbc724c6cb (svn r6814) -Codechange: For network games ci->client_playas was always p->index + 1. To
correctly handle this ci->client_playas - 1 was used all over the code making
 it pretty confusing at times. Use proper one-on-one values now. Special handling
 is only needed for user-output to not to confuse users.
2006-10-17 22:16:46 +00:00
Darkvater fba7d2f7f3 (svn r6803) -Codechange: Substitute magic numbers by an enum for the news windows 2006-10-17 17:59:41 +00:00
Darkvater b2110cbaed (svn r6780) -Codechange: Remove GPMI leftovers (-b impersonisation of AI in MP). 2006-10-15 17:01:19 +00:00
Darkvater 6b6d908308 (svn r6776) -Codechange: Use IsValidPlayer() function to determine of a PlayerID is an
actual playable player (< MAX_PLAYERS) or not.
2006-10-14 22:31:18 +00:00
Darkvater dad5d5dd72 (svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to PLAYER_SPECTATOR and
put it into player.h where it belongs (instead of map.h)
2006-10-14 15:49:43 +00:00
Darkvater 2dcdeb985d (svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
IS_INTERACTIVE_PLAYER
2006-10-14 15:15:56 +00:00
peter1138 1926d97888 (svn r6738) - Fix (r2441): Only apply the virtual transfer profit if the order is a transfer order, rather than to any unload order. This fixes an issue where the AI doesn't know that a route is unprofitable. 2006-10-11 18:57:02 +00:00
peter1138 21591b5219 (svn r6611) - Newsounds:
- If the NewGRF sound effect chosen doesn't exist, then ignore it.
  - Play load/unload sound if provided.
2006-10-01 17:56:38 +00:00
bjarni 0858bf0d04 (svn r6479) -Fix r6424: FS#348 Plane autoreplace glitch
Now the num_engines array is updated for the buying player when merging two players
   The incorrect caches aren't saved so no savegames will contain incorrect data due to this bug
2006-09-19 12:48:12 +00:00
rubidium 63687763e9 (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
-Cleanup: whitespace alignment of a few tables.
2006-09-04 20:40:33 +00:00
Darkvater 7ab6ae3a21 (svn r6369) -Fix (r5886): On loading of game in scenario editor the player was given
the maximum amount of money so everything can be removed for sure. However
 if first rails are removed (or property in general that *gives* money
 when demolished, the player's money would overflow. Thanks for noticing Rubidium.
2006-09-03 23:02:42 +00:00
rubidium 27cee58ab8 (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc. 2006-08-28 18:53:03 +00:00
truelight 8056a793c0 (svn r6178) -Fix r5886: only setting ->money64 isn't enough, as some routines still use ->player_money.
Because of this, when a player went bankrupt, still not all stuff was removed.
2006-08-27 21:20:29 +00:00
truelight ceb523c29f (svn r6057) -Codechange: made a function GetRandomXXX, that _always_ returns a valid XXX, unless there are none to pick from. Then NULL is returned. 2006-08-22 21:14:45 +00:00
truelight 5fd9aeb12b (svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 (or, will do that).
It isn't the best name, but we couldn't find any better.
  This unifies the pool-system even more.
2006-08-22 20:41:26 +00:00
truelight 0461d89612 (svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips invalid ones
-Codechange: use IsValidXXX where ever possible
  Note: both changes to prepare for new pool system, which needs those changes.
  For every pool there are 2 ugly lines, which will be removed when done
  implementing new pool system.
  Based on FS#13 by blathijs, partly implemented.
2006-08-22 15:33:35 +00:00
rubidium 480af9c917 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 2006-08-22 14:38:37 +00:00
rubidium b1e2ae44d6 (svn r6005) -Cleanup: introduce IndustryID and use it
-Cleanup: use TownID and StationID for two instances of uint16
2006-08-20 19:31:58 +00:00
rubidium 893d4ba9d4 (svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant. 2006-08-20 19:05:28 +00:00
rubidium 3cab5f30c0 (svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
-Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
2006-08-16 11:39:55 +00:00
rubidium 0d3ccad29f (svn r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and BASE_YEAR when comparing _cur_year with a 'full' year.
-Cleanup: replace some magic '1920' values with BASE_YEAR.
2006-08-15 15:18:03 +00:00
rubidium 243872b4fd (svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
2006-08-14 14:21:15 +00:00
Darkvater 01cd75cc10 (svn r5886) -Fix [FS#273]: Incomplete removal of player owned property due to lack of money. 2006-08-14 11:44:19 +00:00
tron 2b27073156 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 2006-06-27 21:25:53 +00:00
peter1138 f1cb7bac9a (svn r4570) - Fix: subsidy calculation was too high, broken in r3564 2006-04-25 06:56:22 +00:00
celestar f8b6525765 (svn r4508) -Fix: (FS#125) Fixed a problem that caused DeliverGoodsToIndustry to not work as intended. Note: write something better for this entire function 2006-04-21 20:25:34 +00:00
celestar e75e4e8f74 (svn r4466) -Fix: (FS#71) Game no longer crashes when the last vehicle serving a station has been deleted.
-Negative side effect: upon loading old games, stations whose last vehicle was a station have (temporarily) lower ratings.
   -Positive side effect: station.h no longer includes vehicle.h (breaks the station.h->vehicle.h->rail.h chain)
2006-04-18 08:50:17 +00:00
tron 81e6d68f95 (svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
2006-04-10 07:15:58 +00:00
celestar 3aa1e38be6 (svn r4246) -Codechange. Replaced about 100 occurences of '16' by TILE_SIZE 2006-04-03 05:32:11 +00:00
celestar 3f7eb666ba (svn r4194) -Codechange: Renamed UpdatePlayerHouse to UpdateCompanyHQ because the rest of the code calls it Comapany HQ. Moved it to unmovable_cmd.c because CompanyHQ is an unmovable and has nothing to do with economy. 2006-03-31 08:59:19 +00:00
Darkvater 2c27f45cdc (svn r4131) - CodeChange: Add proper semantics for StationID for such variables instead of using the general uint16-type. StationID was added for depots, waypoints and stations where necessary. We probably need to change GetDepot(), IsDepotIndex(), IsStationIndex(), GetWaypoint() and IsWaypointIndex() as well to use StationID. 2006-03-26 22:55:27 +00:00
Darkvater d5909f901a (svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type. 2006-03-26 22:23:32 +00:00
Darkvater 45e85d2eb2 (svn r3627) - Change all hardcoded 255 max-saveload versions with the define SL_MAX_VERSION 2006-02-20 19:43:26 +00:00
tron 49c7eb934b (svn r3613) Some more const, indentation, whitespace and similar stuff 2006-02-18 14:41:24 +00:00