Commit Graph

151 Commits

Author SHA1 Message Date
rubidium 526b2ae81b (svn r10277) [0.5] -Backport from trunk (10116, r10128, r10130, r10131, r10137, r10138):
- Feature: console command to get the current game date (r10137)
- Fix: When you got a sufficiently small resolution, there is a possibility for a division by zero when a sound is played (r10138)
- Fix: When removing a dock, a ship will always try to reach the old location of the dock even when it cannot anymore because it the old location of the dock is now land instead of water [FS#810] (r10131)
- Fix: SetCurrentGrfLangID returned the wrong language ids for most languages (r10130)
2007-06-22 20:06:59 +00:00
rubidium 906a606418 (svn r9858) [0.5] -Backport from trunk (r9771, r9856):
- Feature: Add password protected status to 'players' (network server) console command (r9771)
- Fix: Loading some TTDP savegames caused an instant assertion on loading (r9857)
2007-05-16 21:33:07 +00:00
truelight ac6aefa07b (svn r9584) [0.5] -Backport frmo trunk (r9542, r9565, r9573):
- Fix: when checking for no vehicle on ground-tiles, don't take into account vehicles that are in the air (r9542)
- Feature: add list_patches to console commands; shows all patches and values (r9565)
- Fix: enclose settings names containing spaces with quotes (r9573)
2007-04-10 09:57:35 +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 b57b2224e9 (svn r8170) -Backport from trunk (r7984, r8118, r8167, r8168):
- out-of-bounds read access on _clients array (Quark) (r7984)
 - change the ordering of the network list (r8118)
 - (FS#556): a network client crashes, due to a division by zero (r8167)
 - ParseConnectionstring didn't use the port parameter if a player was also specified (r8168)
2007-01-16 23:59:03 +00:00
Darkvater f87c8834e2 (svn r7449) -Codechange: Rename _path to _paths as it is technically more correct, but mainly because
it interferes with OS/2 symbol in libc (psmedley)
2006-12-09 10:56:12 +00:00
Darkvater ee27bb497c (svn r6884) -Codechange: Add strict bounds checking in string formatting system.
The last parameter should point to the end of the buffer (eg lastof(buf))
 Courtesy of Tron.
2006-10-21 23:31:34 +00:00
Darkvater 91b9b3ab18 (svn r6876) -Codechange: Change the naming of _PLAYER in DESTTYPE_PLAYER/NETWORK_ACTION_CHAT_PLAYER
to _COMPANY as that is whom you are really addressing to. Also change some variable
 names, 'desttype' is confusing if there is also a parameter 'dest', so rename it to
 just type.
2006-10-21 22:29:14 +00:00
Darkvater 68314cf576 (svn r6820) -Codechange: Some more const correctness, coding style.
-Codechange: Add FOR_ALL_ACTIVE_CLIENT_INFOS macro that will loop all clients
 skipping inactive ones.
2006-10-18 13:17:46 +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 d5baf25923 (svn r6787) -Codechange: Use PLAYER_NEW_COMPANY as a player identifier wishing to become a
new player instead of a 0.
2006-10-15 23:48:34 +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 d983d93732 (svn r6750) -Codechange: Juggle around some header includes as they're only used when
networking is enabled.
2006-10-12 14:13:39 +00:00
peter1138 53744881a4 (svn r6628) - Feature: Add the ability to pause a server if not enough players are connected. The setting for this is 'min_players' and can be set in the config and via the console. If the number of players drops below this number, the server will pause the game. 2006-10-03 16:15:34 +00:00
Darkvater ed7392ef5d (svn r6471) -Fix (r6450): ConPatch was moved from network-only, but the function was
still inside the ENABLE_NETWORK define. Thanks nycom.
2006-09-17 11:33:19 +00:00
Darkvater dc93d63478 (svn r6450) -Feature: Make the 'patch' console command available for offline use and for
online use for player-based settings.
2006-09-14 23:26:58 +00:00
rubidium 07cbc4f83a (svn r6435) -Fix (FS#340): show an error message when executing 'scrollto x' with x < 0 or >= MapSize() instead of asserting later on. 2006-09-09 22:15:19 +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 893d4ba9d4 (svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant. 2006-08-20 19:05:28 +00:00
truelight 10b842bddc (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
- New optional landscape generator (TerraGenesis Perlin)
  - Load heightmaps (either BMP or PNG)
  - Progress dialog while generating worlds (no longer a 'hanging' screen)
  - New dialogs for NewGame, Create Scenario and Play Heightmap
    - Easier to configure your landscape
    - More things to configure (tree-placer, ..)
  - Speedup of world generation
  - New console command 'restart': restart the map EXACTLY as it was when you
      first started it (needs a game made after or with this commit)
  - New console command 'getseed': get the seed of your map and share it with
      others (of course only works with generated maps)
  - Many new, world generation related, things
  - Many internal cleanups and rewrites
  Many tnx to those people who helped making this:
     Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
  Many tnx to those who helped testing:
     Arnau, Bjarni, and tokai (alfabetic)
  And to all other people who helped testing and sending comments / bugs
  Stats: 673 lines changed, 3534 new lines, 79 new strings
2006-08-19 10:00:30 +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 8aa76f306d (svn r5915) -Cleanup: some variables were named *_date while they were only holding years; rename these variables to match this. 2006-08-15 14:52:17 +00:00
rubidium cb21b5b076 (svn r5909) -Fix (r5908): silence signedness warning 2006-08-15 09:03:35 +00:00
Darkvater 029105ea1c (svn r5908) - Codechange (r5903): Move the retrieval of the new value of a patch to console_cmds.c, so there is no need for that function in settings.c 2006-08-15 07:37:01 +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 a9251d2d02 (svn r5767) - Cleanup: Improve upon the header file mess regarding fios. Move all relevant types from hal.h into fios.h, eliminate the unneccessary passing of a global variable, and extern variables in header files (declare in fios.c and misc_gui.c 2006-08-05 00:59:45 +00:00
belugas ecc89d5965 (svn r5626) CodeChange : Remove the global _make_screenshot and implement a more flexible mechanism
Simplification of the handling of the main_gui menus,
Removal of repetitions and Hiding the internals of screenshots.
Thanks to glx, Rubidium and Truelight for pointers
2006-07-28 21:51:00 +00:00
tron c617d70111 (svn r5400) Typo in 5391, spotted by peter1138 2006-06-28 06:46:15 +00:00
tron 2b27073156 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 2006-06-27 21:25:53 +00:00
tron 74d40ced0a (svn r5265) Replace a dozen bogus uses of strncmp() by strcmp() 2006-06-14 13:22:30 +00:00
tron 3d41cb23d4 (svn r5264) -Fix: The wrong IP could get unbanned, e.g. 'unban 1.2.3.42' could result in unbanning 1.2.3.4 2006-06-14 12:30:31 +00:00
glx 6c572f1947 (svn r4889) - Codechange: added vehicle count in 'players' console command 2006-05-16 16:30:40 +00:00
glx b6006511d3 (svn r4876) - Fix: company value is an int64, so display it correctly in 'players' console command 2006-05-15 23:08:04 +00:00
glx e48874936e (svn r4871) - Fixed off-by-one and added company color displaying in 'players' console command. 2006-05-14 23:01:11 +00:00
celestar 30bc705e48 (svn r4828) -Feature (FS#150) Add a new console command "players" that lists current players along with basic stats (ledow) 2006-05-11 14:08:03 +00:00
Darkvater fd2a005139 (svn r4558) - Fix: 'stopall' was moved to debug, so move the function there as well. 2006-04-23 22:06:52 +00:00
Darkvater aa33135450 (svn r4518) - Fix: specify the 'stopall' console command as a debug command. Mostly because stopped airplanes in mid-air 1. look funny 2. won't ever budge again. (change of r2449) 2006-04-22 08:45:58 +00:00
celestar 5931b34aff (svn r4259) -[multistop] Fix/Feature/Codechange:
1) Improved the road vehicle allocation (aka slotting) for multistop. Stops can now accept unlimited, er... 256, vehicles.
2) Removed the "wait for stop" feature, because it did not work in practise.
3) Slotting now ignores unreachable stations. Uses NPF at the moment because the old pathfinder cannot do it (yet)
4) Now matter how many vehicles approach a station, they will always be distributed evenly over existing stops.
5) Hopefully the last fundamental change to multistop
2006-04-03 14:25:32 +00:00
celestar e54f1e1e2b (svn r3939) -Fix: No longer assume that the number of slots is 2. It was not a problem up to now, but it's not The Right Thing (TM) to do either 2006-03-18 08:00:27 +00:00
celestar 9d54e51ef9 (svn r3730) Multistop modifications:
-Codechange: Completely rewritten the slot assignment system. It now consumes less CPU cycles and memory
-Codechange: Increased maximum number of roadstops to 16.
-Fix: Several conditions where a slot becomes unliked from a vehicle
-Codechange: ClearSlot now only takes one parameter, the vehicle
-Feature: Console command 'clearslots' to clear ALL currently assinged slots. debug usage only
-Feature: vehicles that cannot get a slot now wait on the road instead of planlessly blocking stops or circling around
-Codechange: Adjusted debug levels
TODO: Make the slot finder compatible with (a) pathfinder(s).
2006-03-02 08:55:12 +00:00
Darkvater bf1bf1e1ec (svn r3724) - [5.5/6] heh, the patch part got left out of the previous commit, sorry 2006-03-02 02:03:21 +00:00
peter1138 8cba0a1176 (svn r3593) Fix typo in r3591 2006-02-11 21:41:49 +00:00
Darkvater 843bd25b4e (svn r3591) - Fix: validate the setting of max_companies/spectators through the console. 2006-02-11 14:10:28 +00:00
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. 2006-01-31 22:16:15 +00:00
Darkvater 20538e9b40 (svn r3469) - Fix: plug a possible memleak with subsequential strdup's without freeing the previous value and make it possible to ban offline clients 2006-01-29 18:04:52 +00:00
Darkvater 0d80c70b5f (svn r3428) - Feature: server_info was left out previous commit. Move some commands about a bit for better logical placement 2006-01-25 18:40:12 +00:00
Darkvater 78fa9c7393 (svn r3427) - Feature: Allow seeing and setting the maximum amount of companies and spectators for a server. This can be changed/viewed during runtime as well in the console. 2006-01-25 18:11:06 +00:00
peter1138 016c498216 (svn r3411) - Fix: When changing the server password via the console, actually set the password as well as flag whether it is required. 2006-01-19 21:29:54 +00:00
Darkvater 6971aee967 (svn r3408) - Ok, compile before you commit; sorry (fix previous commit) 2006-01-19 16:12:24 +00:00
Darkvater a292621b14 (svn r3407) - Feature: Kick and ban now with IP numbers. 2006-01-19 15:58:57 +00:00