Commit Graph

37 Commits (a7d8ad0004e00e1d917d636f4d69fd58f5edbfa3)

Author SHA1 Message Date
celestar a7d8ad0004 (svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas. 18 years ago
Darkvater fa86dff4c3 (svn r4129) - CodeChange: Add proper bool type for is_ai as well...it is a bool type. 18 years ago
Darkvater d5909f901a (svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type. 18 years ago
tron 84fb96fe85 (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
Darkvater f2448ebfd4 (svn r3500) - Workaround the inaccurate count of spectators/companies that can happen in certain border-cases. For now just dynamically get this value when requested so it is always right. To do properly all player/client creation/destruction needs a hook for networking. 19 years ago
peter1138 90aff7a026 (svn r3396) - Autoreplace changes:
- Change fixed array per player to a single pool. This avoids future problems
    with vehicle numbers and decreases savegame size. Engine replacements from
    previous savegames will be lost.
  - Move engine replacement code from players.c to engine.c.
                                      (thanks to blathijs for rewriting this)
19 years ago
tron e272b03fee (svn r3365) Staticise 36 functions 19 years ago
peter1138 87f54ebf92 (svn r3239) - Codechange: Introduce and use helper functions for engine replacement code. 19 years ago
bjarni 5481dcd191 (svn r3155) -Feature: [autoreplace] autoreplace can now remove cars from too long trains
-Trains will now remember the length of stations it visits and sell cars
        when being autoreplaced if they became too long
        -If it needs to remove cars, then it starts from the front and sells
        all it can find until the train is short enough
        -This only works for trains, that knows the station length of the route
        so a full uninterrupted run is needed
        -a train needs 1-2 runs to detect if the shortest station is expanded
        -This feature can be turned on and off in the train replace window
        and each company can have it's own setting
        -NOTE: minor savegame version bump
19 years ago
Darkvater f816b74536 (svn r3151) - Fix: showing the highscore might crash the game with an invalid string message in the case when a highscore file was used before certain strings were added.
- Codechange: protect _endgame_perf_titles from out-of-bounds access.
19 years ago
peter1138 95d1c43565 (svn r3110) Replace another 256 with TOTAL_NUM_ENGINES. 19 years ago
tron 2b91f55b32 (svn r3073) int/byte -> EngineID/PlayerID/VehicleID
0/-1 -> INVALID_ENGINE
0x10 -> OWNER_NONE
19 years ago
tron b85da4fef2 (svn r3054) Remove the unsused function GetNumRailtypes() 19 years ago
tron 66bf4f863d (svn r3049) Replace byte/int/uint by RailType where appropriate 19 years ago
tron ed8c9c91d6 (svn r3001) s/Player*/const Player*/
s/byte/PlayerID/
s/int/PlayerID/
and related changes
19 years ago
tron 313fcfbd83 (svn r2973) Move a function declaration somewhere where it belongs 19 years ago
Darkvater 8e6a911700 (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
19 years ago
Darkvater 2131f68ae2 (svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone
- Add IsLocalPlayer() which substitutes _local_player == _current_player
19 years ago
bjarni ed8e2bac04 (svn r2817) -Codechange: [autoreplace]: moved autoreplace and autorenew to serverside
-This means that one company can only have one setting for renew and replacing
    more clients will not fight due to different settings anymore
  -This is a needed step in the line to fix autoreplacing dualheaded locomotives
  NOTE: savegame revision bump (peter1138 + me in coop)
19 years ago
tron a227065ab7 (svn r2701) Insert Id tags into all source files 19 years ago
tron 0762aa9ec9 (svn r2669) Shuffle some more stuff around to reduce dependencies 19 years ago
tron e53c4db866 (svn r2664) Remove depedency on player.h from variables.h 19 years ago
celestar 18a93cca3d (svn r2657) -Codechange: The available railtypes per player are now a bitmask, so
that railtypes do not be in ascending order of appearance. Allows easier
implementation or more railtypes
19 years ago
tron 3154e7148d (svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile" 19 years ago
celestar aa7334a3ec (svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer 19 years ago
Darkvater 5e6923e936 (svn r2290) - CodeChange: protect the next batch of commands. This brings us to a total of 61, which is 53% :)
- CodeChange: To correctly accept engine-prototypes, the best-player checking has been moved to its own function, I hope it functions the same as before.
- CodeChange: Added symbolic types of PlayerID, OrderID and EngineID. For engines also added GetEngine() and IsEngineIndex(), similar to the other such functions.
- CodeChange: To correctly build industries, some tables have been moved to build_industry.h. The only way to find out currently if an industry is valid in a climate is by looping all industries and checking if it matches. Also to comply with the patch setting build_rawmaterial_industries, it is assumed that these industries do not accept any cargo of any type. This can and probably should changed in the future to some flag in their struct. Also use _opt_ptr instead of _opt.
- CodeChange: implemented the HQ checking code inspired by MarkR2 in "[ 1190944 ] Many commands not checked for security".  Unfortunately it is impossible to prevent only deleting a HQ by a modified client atm.
- CodeChange: For insert order and modify order their parameters are implicitely truncated to 8 bits, instead of the 16 bits said in the comments.
19 years ago
tron d17476b058 (svn r2271) CMD_SET_PLAYER_FACE, CMD_SET_PLAYER_COLOR, CMD_INCREASE_LOAN, CMD_DECREASE_LOAN only make sense for the current player, so don't explicitly pass a player number 19 years ago
pasky 0c5d61bd56 (svn r2080) - Fix: [OldAI] p->ai.state_counter was uint16 but could hold a tile index, therefore overflowing - changed that to uint32 and bumped the savegame revision to 32. It *MIGHT* close bug 1151374 - it certainly caused AI to stop building anything sometimes.
- While at it, use TileIndex as the tile index type in AiRemovePlayerRailOrRoad() and AiStateRemoveTrack().
- Make the number of tiles scanned 4*MapSizeX() instead of 1000. It *MIGHT* close bug 1116614.
19 years ago
darkvater 06cc62f40d (svn r1496) -Fix: highscore no longer crashes in network games with a dedicated server. At the end of the game (can only be set by the server) the highscore is shown for the top5 companies of that game
-Fix: fixed some compiler warnings
-Added PF_NETWORK_ONLY flag to settings. Such a setting can only be modified in a network game.
20 years ago
truelight 7ec997afce (svn r1488) -Fix: fixed some spelling mistakes (tnx to Tron)
-Fix: fixed some compiler-warnings
20 years ago
darkvater 5fac6142e8 (svn r1479) -Added highscore chart (accessible from the difficulty window) with top5 companies for a given difficulty (select the difficulty in the menu)
-Added endgame score on 1 jan 2051 where you are added to the highscore if sufficiently large points have been accumulated. Game is paused while
-These values are saved in hs.dat; added read/write functions for it
-Added code to delete all windows to show charts. There is one issue left: somehow a news-gui pops up in front of the the chart at the end of the game.
20 years ago
miham 57852f6498 (svn r1297) Language fixes in the source.. (ln-) 20 years ago
truelight 4ccd84f94b (svn r201) -Fix: [1025836] Company values bigger dan int32 were put to negative
-Fix: [1025836] Long bridges had negative value
-Fix: Typo in endian_check.c (Zr40)
20 years ago
darkvater 3b96ad994c (svn r148) -Feature: Company HQ can now be moved somewhere else (cost 1% of company value). Water floods HQ.
-Some layout fixes for command.c
-Tileinfo debug window in console now shows Tile in decimal numbers
20 years ago
truelight 5eba928cb8 (svn r146) -Fix [AI]: Tunnel/bridge bug
-Fix [AI]: Minor problems
-Add [AI]: Profit check (if not making enough money, vehicles are sold)
20 years ago
truelight 788ace088d (svn r85) -Add: initial commit of new AI (enable in Patch menu)
-Add: generalised A* Algorithm
-Add: generalised queues (Fifo, Stack, InsSort, BinaryHeap)
20 years ago
truelight efaeb275f7 (svn r1) Import of revision 975 of old (crashed) SVN 20 years ago