Commit Graph

67 Commits (a9d33943d734671990920fc093d0025845479370)

Author SHA1 Message Date
Darkvater a9d33943d7 (svn r3721) - [3/4] Present the game with a unified structure for the configuration-ini, saveload, console and gui representations of the settings. From part 3 on, OpenTTD is once again compilable.
- Code has been added to the saveload code to honour the SLF_SAVE_NO and SLF_NETWORK_NO flags. SLF_NETWORK_NO just reads in the the bytestream and then discards it because that setting is not synchronised. For this the function SlSkipBytes() has been reinstated
- SAVEGAME_VERSION has been changed from a constant ENUM to a constant integer. This was done for the configuration-code to be able to tell which version of a CONDVAR type to handle. As said before, because settings can be saved to the savegame, they will become conditional at some point. The configuration code always has to read the 'most recent' version.
- GameOptions are saved through the new structure. It is fully compatible with any old savegame...however it is better. Because of the move to this new format we can instruct the loader to skip certain variables. Autosave for example isn't synchronised anymore (in the network). The same goes for currency and kilometers :D. That is the only functionality change this patch is supposed to have if I have written it correctly.
- NOTE! Patches are still not saved so for Multiplayer to work network_client.c and network_server.c needed slight modifications.
19 years ago
tron 1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
Darkvater 5502f3bf3d (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
Darkvater 958eb8b9b6 (svn r3430) - You can of course not join when there are more companies than the maximum set, not the other way around. 19 years ago
Darkvater 082aa38f79 (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. 19 years ago
tron 318fe153eb (svn r3365) Staticise 36 functions 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
Darkvater 7b52c5f6bb (svn r3067) - Feature: allow unbanning players based on banlist-id (as well as IP).
- Feature: 'status' and 'clients' now show the IP of the players
19 years ago
tron f02b1f2967 (svn r2899) -Fix: Several format string vulnerabilities and buffer overflows in the network code 19 years ago
tron 2c96a3dce9 (svn r2828) Only command.c needs to know about _docommand_recursive, so make it static. Tell me if there's a problem, because i removed it from network_server.c, but afaict it should be ok 19 years ago
ludde 228d439c5c (svn r2755) Fix: Fix a desync issue with autoreplace 19 years ago
tron 452652e85e (svn r2720) Remove unused declarations and definitions 19 years ago
tron 18d00d0f1f (svn r2716) Do not use strncat() 19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
tron 54cbd01825 (svn r2673) Include functions.h directly, not globally via openttd.h 19 years ago
tron a4ec4da221 (svn r2672) Move saving/loading related declarations to saveload.h 19 years ago
tron 71140a5768 (svn r2669) Shuffle some more stuff around to reduce dependencies 19 years ago
ludde 9d6b7f1e9f (svn r2591) Codechange: [network] Cleanup NetworkHandleCommandQueue 19 years ago
ludde 41d4eed3fb (svn r2589) Fix: [network] Fixed static variable that wasn't initialized. Would stop the sync checking from working in some cases. 19 years ago
ludde 04e45dac34 (svn r2588) Codechange: Remove PLAYER_SEED_RANDOM 19 years ago
ludde fd0cee7418 (svn r2583) Move OS specific code out of misc.c
Added support for Mersenne Twister random number generator (not implemented in network yet)
Wrap player randoms around #ifdef
19 years ago
celestar 53e58e8bdb (svn r2521) -Codechange: Removed trailing "\n"s from DEBUG statements 19 years ago
celestar 354058341b (svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer 19 years ago
Darkvater 59c9fee33f (svn r2339) - Fix: on a dedicated server, after the joining of a player, the player was set to player 0 instead of remaining OWNER_SPECTATOR. Fix this, and allow the dedicated server to execute commands (so 'patch <value>') now works and not only when a client is connected. 19 years ago
tron 4eebeff58c (svn r2324) Introduce _cmd_text for passing strings with a command instead of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes. 19 years ago
Darkvater 56bc64a3a1 (svn r2309) - CodeChange: Change all _iconsole_color_whatever into _icolour_wtv (abbreviated). Besides the changed into proper english, yes this commit is pretty useless ;) 19 years ago
Darkvater 57a44b4243 (svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
- CodeChange: move ValParamRailtype() to check rail type from command.h to vehicle.h where it is better suited.
19 years ago
Darkvater 0727085b3b (svn r2299) - Fix: add more verbose output to possible hack-attempt.
- Btw, only 14 more commands are remaining, 88% done \o/
19 years ago
matthijs f8302a137a (svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
- Add: GetVehicleTrackdir() helper function.
- Codechange: Moved SortStruct from vehicle_gui.h to ttd.h, so the dependency from vehicle.h on vehicle_gui.h could be removed.
- Codechange: Typedeffed the VehicleTypes struct so it can be used as the type for Vehicle.type instead of "byte".
- Codechange: Removed prototype for VehicleSorter(), which had no implementation anymore and was never called.
19 years ago
truelight 40a9b91b37 (svn r2106) -Fix: improved the network-join algoritm, it is now a bit more stable
-Add: added 'pause_on_join' and 'max_join_time' for MP games, where you 
can auto-pause the game when a client wants to join the game. This to 
avoid connection losses because of big maps (200+ trains). (with tnx to 
#openttdcoop for the ideas and testing)
20 years ago
tron 59fa465dce (svn r1821) Move generic string handling functions to string.[ch] and introduce stre{cpy,cat}, see string.h for their semantics 20 years ago
tron d3f84347ac (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c) 20 years ago
tron 36c9758c94 (svn r1803) Move debugging stuff into files of it's own 20 years ago
tron 94d5aeabb2 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 20 years ago
bjarni 467e4b82bf (svn r1568) made an enum of train subtypes to make the code more readable 20 years ago
truelight 403fbdfd6b (svn r1546) -Fix: possible buffer-overflow in network 20 years ago
truelight 27929d129b (svn r1527) -Add: RCon (Remote Connection). A server can set:
'set rcon_pw <password>'
  Which enables rcon. A client can now do:
    'rcon <password> "<command>"'
  The command will be executed on the server. (guru3)
-Fix: 'kick 1' did crash dedicated servers
-Fix: server password is now correctly saved

  !!Warning!!: do not give your rcon password to people you do not thrust!
20 years ago
darkvater cd4272e08d (svn r1518) -Fix: server issue where some company names were wrong
-Fix: Highscore troubles; accessing members of deleted window
20 years ago
truelight b33df5936f (svn r1510) -Add: Improved Network Lobby GUI: (bociusz)
- Added green dot if company income is positive (else red dot)
 - Added lock icon if company is password protected
20 years ago
darkvater 781648ada3 (svn r1465) -Fix: [1099101] starting year patch goes out of range. Clamped year between 1920-2090 as wel as adding defines for it. 20 years ago
tron 4450ff105c (svn r1451) Fix some of the signed/unsigned comparison warnings 20 years ago
truelight 503ccc81c9 (svn r1389) -Add: [Network] Added packet protection. No longer a client or server
reads beyond the size of the packet
-Fix: [Network] A server no longer crashes when a client sends an 
invalid DoCommand, but drops the client instead.
20 years ago
truelight 5eeab7fcfe (svn r1322) -Add: banning system (mostly tnx to guru3)
A server can ban people via ClientList
  Both server and dedicated can do it via console:
   'ban', 'unban', 'banlist'.
20 years ago
truelight aacd9f7b0a (svn r1320) -Fix: fixed chat-bug (that from a certain moment, nobody could talk).. 1
variable was still byte instead of uint16 (with a very big tnx to guru3!)
20 years ago
miham 7bf7cf80ee (svn r1297) Language fixes in the source.. (ln-) 20 years ago
truelight 4a5e11cea9 (svn r1263) -Fix: [Network] Client-names are limited (serverside) to 25 chars
-Fix: You can enter some more chars in the chatbox
20 years ago
truelight 824d73be2d (svn r1252) -Add: [Network] With 'set restart_game_date' you can set the date for in
which year the server must restart hisself. (0 = disabled, default value)
20 years ago
truelight 2f2842ec05 (svn r1246) -Fix: [ 1090099 ] Company-messages did crash the game, because
company-index was sent, which should have been the client-index
20 years ago
truelight 6b047f7b14 (svn r1204) -Add: [Network] Added some cheaters-protection (money-cheat mostly) 20 years ago
truelight 9938d19d76 (svn r1186) -Fix: [Network] You can now join a company on a server where a company
went bankrupt, without joining the wrong company (or even failing to do so)
20 years ago