Commit Graph

64 Commits (bb6818aa5c39f373395dc32bd37ce3e4d914e516)

Author SHA1 Message Date
Darkvater e8fad6334e (svn r6934) -Cleanup: Some minor cleanup for network_client and removing 'stupid' comment 18 years ago
Darkvater a7c484f1ea (svn r6933) -Feature: Allow spectators to speak to eachother (team) 18 years ago
Darkvater 494c56475f (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.
18 years ago
Darkvater f71ca30040 (svn r6878) -Fix r6876 +add network.c, network_client.c 18 years ago
Darkvater 5459f53c95 (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.
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 9e8b077426 (svn r6787) -Codechange: Use PLAYER_NEW_COMPANY as a player identifier wishing to become a
new player instead of a 0.
18 years ago
Darkvater 23ab588a61 (svn r6786) -Codechange: To join a new company CMD_PLAYER_CTRL is executed with so far a
local spectator (awaiting assignment from server). Since a spectator cannot
 execute any commands, a local player is impersonated. Move this impersonation
 to the server side where CMD_PLAYER_CTRL is handled specially anyways.
18 years ago
Darkvater 89e811b4d7 (svn r6780) -Codechange: Remove GPMI leftovers (-b impersonisation of AI in MP). 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 9878797e45 (svn r6766) -Codechange: Move _openttd_revision[] into the functions that use it instead of global 18 years ago
Darkvater 0ca42cbd44 (svn r6750) -Codechange: Juggle around some header includes as they're only used when
networking is enabled.
18 years ago
tron 0d6fa61e9f (svn r6297) -Codechange: Disentangle the query window mess a bit: Move the network game password handling somewhere were it belongs to 18 years ago
tron 4e36c4a349 (svn r6183) Move GetDrawStringPlayerColor() out of gfx.[ch] 18 years ago
rubidium 6fb092aa7a (svn r5999) -Feature: change the original date format to a 32 bits format based at the year 0.
The game date subsystem now allows someone to start in the year 0 and continue
up to the year 5 000 000. However, you currently cannot build anything before 
1920 as there is no newgrf support for dates before 1920 or after 2090 yet.
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 26db3ac91f (svn r4623) - Codechange: s/byte/PlayerID/ 18 years ago
Darkvater 6c3c1c22d3 (svn r4267) - Fix (r4241): also validate the error number that a client receives from a server, and encapsulate this functionality into GetNetworkErrorMsg(). 19 years ago
Darkvater 40405368d5 (svn r3726) - [6/6] Finalize conversion, finally save the patches struct.
- Remove the temporary synchronisation in during the map-transfer as this is no longer needed
- The saved patches work just like the saved gameoptions. You have a _patches and a _patches_newgame struct. The _patches_newgame struct contains the values from the configuration file and thus the defaults for new games. When a new game is started or an older game is loaded, the default values are copied over to _patches to be used. When you load a game that has PATS saved, the default values are also loaded, but immediately overwritten by the values from the savegame. This ensures that player-based values are always taken from your personal preferences.
- The current implementation also changes the default values if you change player-based settings in the game. For example changing window_snap_radius in a certain game will also change it for all next OpenTTD sessions.
- The savegame version has been increased to 22.
- The last 6 orso patches close the following reports:
  [ 1366446 ] different names for patches: all patch settings have the same name as in the configuration file and are reachable from the console.
  [ 1288024 ] Strange string on OTTD initial screen: configuration (and this includes patches) inputs are validated and clamped to their minimum/maximum values.
  [ 1423198 ] Make "Signals on Drive side" player, not server, based: this is only visual so current setting is to save it with the savegame but not synchronise in multiplayer.
  [ 1208070 ] Patches and New GRF options saved: apart from newgrf this is done
19 years ago
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
Darkvater f14df34790 (svn r3429) - Feature (Followup): Change the gamelist window to accomodate for the new information. 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
truelight 708c135ff7 (svn r3246) -Fix: small glitch in ai_network_client code (network_client.c)
-Fix: make sure this glitch can never happen again (ai.c)
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
tron f02b1f2967 (svn r2899) -Fix: Several format string vulnerabilities and buffer overflows in the network code 19 years ago
bjarni 9952ff0b59 (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 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 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
tron 1307f90b5e (svn r2535) Tabs 19 years ago
celestar 354058341b (svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer 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 dcd4ad4155 (svn r2301) - CodeChange: prettyify ChangeOwnerShipOfPlayerItems() a bit
- CodeChange: add comments to a very ugly part of the code (network_client.c); that enforces that the server gives an ID to the client.
19 years ago
Darkvater ef1325cd36 (svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
- Fix: [ 1153926 ] All my settings in vain... IGNORED!
- Change: I hope I got it all right. Pressing 'New Game' (either choosing random or a preset scenario) and 'Create Scenario' will start a new game with the settings and difficulty in the intro menu. Using 'Load Game' and 'Play Scenario' will take the values from the savegame/scenario itself.
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
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
truelight a74ff97781 (svn r1513) -Fix: glitch in revision 1510
-Fix: MSVC6 project file update (bociusz)
-Fix: MSVC6 default language is now English (UK), no longer Swedish (bociusz)
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
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 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
darkvater 5eeb971de0 (svn r1240) -Fix: OpenTTD once again compiles if ENABLE_NETWORK is disabled.
-Fix: removed some warnings
-Enabled ENABLE_NETWORK on windows again which I accidentally commented out.
20 years ago