Commit Graph

148 Commits (686225bc5bdd4a6e01cbcd298a7e3b8a1299f5e6)

Author SHA1 Message Date
peter1138 9e68c9b87f (svn r7433) -Fix (r2301): Town ratings were not reset when a company went bankrupt. 18 years ago
peter1138 55dc2fbbef (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) 18 years ago
peter1138 252721d029 (svn r7335) -Codechange: redraw station tiles when cargo is moved, for newstations 18 years ago
peter1138 acac44820b (svn r7326) -Feature: Add support for gradual (un)loading of vehicles (Maedhros) 18 years ago
bjarni 0724b07575 (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
18 years ago
Darkvater bd7649b080 (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.
18 years ago
Darkvater 33bdf3c701 (svn r6816) -Codechange: Some coding style, variable localization, const correctness.
-Codechange: 'quited' is not a word, use has_quit instead for NetworkClientState
18 years ago
Darkvater b70e4cefb3 (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.
18 years ago
Darkvater d4b990a01d (svn r6803) -Codechange: Substitute magic numbers by an enum for the news windows 18 years ago
Darkvater 89e811b4d7 (svn r6780) -Codechange: Remove GPMI leftovers (-b impersonisation of AI in MP). 18 years ago
Darkvater 4c9d9a87f1 (svn r6776) -Codechange: Use IsValidPlayer() function to determine of a PlayerID is an
actual playable player (< MAX_PLAYERS) or not.
18 years ago
Darkvater a85d679f54 (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)
18 years ago
Darkvater 68c0320be6 (svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
IS_INTERACTIVE_PLAYER
18 years ago
peter1138 61f3deb5da (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. 18 years ago
peter1138 33e8c26c38 (svn r6611) - Newsounds:
- If the NewGRF sound effect chosen doesn't exist, then ignore it.
  - Play load/unload sound if provided.
18 years ago
bjarni b5fe577523 (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
18 years ago
rubidium 21ac20aeca (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
-Cleanup: whitespace alignment of a few tables.
18 years ago
Darkvater adc785b698 (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.
18 years ago
rubidium 86dc219b4b (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc. 18 years ago
truelight 61659b67d5 (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.
18 years ago
truelight a21b2750bd (svn r6057) -Codechange: made a function GetRandomXXX, that _always_ returns a valid XXX, unless there are none to pick from. Then NULL is returned. 18 years ago
truelight 15aff22c96 (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.
18 years ago
truelight 505566da5c (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.
18 years ago
rubidium 908d3bcfe6 (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. 18 years ago
rubidium 43af0ced5f (svn r6005) -Cleanup: introduce IndustryID and use it
-Cleanup: use TownID and StationID for two instances of uint16
18 years ago
rubidium db397d5a75 (svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant. 18 years ago
rubidium e87e065e41 (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
18 years ago
rubidium c55962f8a2 (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.
18 years ago
rubidium 9fc837ad85 (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
18 years ago
Darkvater e6e42cd5f3 (svn r5886) -Fix [FS#273]: Incomplete removal of player owned property due to lack of money. 18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
peter1138 4dc68326d9 (svn r4570) - Fix: subsidy calculation was too high, broken in r3564 18 years ago
celestar 42059d45ea (svn r4508) -Fix: (FS#125) Fixed a problem that caused DeliverGoodsToIndustry to not work as intended. Note: write something better for this entire function 18 years ago
celestar 277f8cbda2 (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)
18 years ago
tron 35e93e451f (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()
19 years ago
celestar 6443c14ebd (svn r4246) -Codechange. Replaced about 100 occurences of '16' by TILE_SIZE 19 years ago
celestar e875be1a44 (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. 19 years ago
Darkvater d155f182ac (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. 19 years ago
Darkvater e91fa54a15 (svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type. 19 years ago
Darkvater bf27f0c77b (svn r3627) - Change all hardcoded 255 max-saveload versions with the define SL_MAX_VERSION 19 years ago
tron 7692556c62 (svn r3613) Some more const, indentation, whitespace and similar stuff 19 years ago
tron 5352e9fbcb (svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff 19 years ago
tron 087fe86ed2 (svn r3564) Several smaller changes:
- Don't treat non-booleans as booleans
- Reduce variable scope
- Bracing
- Use DeMorgan's law to make conditionals easier to read
- if cascade -> switch
- Replace some magic numbers by symbolic names
- Avoid assignments within other statements
19 years ago
peter1138 6c28b1cec7 (svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files. 19 years ago
tron 1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
tron 9712d6f639 (svn r3510) Fiddle with whitespace and parentheses 19 years ago
truelight 336a58e797 (svn r3377) -Fix: [ FS#24 ] Min. profit in detail performance rating gave you full points if you had no vehicles, and was limited to 20k. Solved both. (Partly based on Graphite his patch) 19 years ago
truelight e427dbcad2 (svn r3363) -Fix: 'fixed' the transfer problem. This doesn't really fix it, but gives a bit more fair amount of money. Can only be fixed correctly with CargoPackets as suggested in branch. 19 years ago
truelight e4cb8ed457 (svn r3226) -Fix: GPMI implementation had minor glitches
-Fix: the AI speed control is done by the AI-core, individual AIs don't have to do it (so, AIs were delayed twice ;)
-Add: Support for AI-network-clients (an AI, connecting to a remote server)
-Fix: minor AI-core problems
19 years ago
bjarni 16e65960b9 (svn r3218) -Feature: Multiheaded train engines will now stay in the same train
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead
	This fixes the assert when moving multiheaded engines (introduced in r3144)
	Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs

-Codechange: train subtype is now a bitmask
	This allows fast access to info like if it is a wagon or engine and if it is in front and so on
	Note: savegame version bump
19 years ago