summaryrefslogtreecommitdiff
path: root/network_server.c
AgeCommit message (Collapse)Author
2006-10-24(svn r6933) -Feature: Allow spectators to speak to eachother (team)Darkvater
2006-10-24(svn r6932) -Codechange: Send server messages with format ↵Darkvater
NETWORK_ACTION_SERVER_MESSAGE so it is general colour like the rest of the server messages. Spectators speak in grey.
2006-10-21(svn r6884) -Codechange: Add strict bounds checking in string formatting system.Darkvater
The last parameter should point to the end of the buffer (eg lastof(buf)) Courtesy of Tron.
2006-10-21(svn r6876) -Codechange: Change the naming of _PLAYER in ↵Darkvater
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-17(svn r6816) -Codechange: Some coding style, variable localization, const ↵Darkvater
correctness. -Codechange: 'quited' is not a word, use has_quit instead for NetworkClientState
2006-10-17(svn r6814) -Codechange: For network games ci->client_playas was always ↵Darkvater
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-15(svn r6787) -Codechange: Use PLAYER_NEW_COMPANY as a player identifier ↵Darkvater
wishing to become a new player instead of a 0.
2006-10-15(svn r6786) -Codechange: To join a new company CMD_PLAYER_CTRL is executed ↵Darkvater
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.
2006-10-14(svn r6776) -Codechange: Use IsValidPlayer() function to determine of a ↵Darkvater
PlayerID is an actual playable player (< MAX_PLAYERS) or not.
2006-10-14(svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to ↵Darkvater
PLAYER_SPECTATOR and put it into player.h where it belongs (instead of map.h)
2006-10-12(svn r6750) -Codechange: Juggle around some header includes as they're only ↵Darkvater
used when networking is enabled.
2006-10-03(svn r6629) - Fix (r6628): One check for the number of players got misplaced ↵peter1138
by patch...
2006-10-03(svn r6628) - Feature: Add the ability to pause a server if not enough ↵peter1138
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(svn r6625) - Feature: Add the ability for servers to execute a script just ↵peter1138
after a client has connected, e.g. for a MOTD, etc.
2006-08-28(svn r6183) Move GetDrawStringPlayerColor() out of gfx.[ch]tron
2006-08-20(svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant.rubidium
2006-08-20(svn r5999) -Feature: change the original date format to a 32 bits format ↵rubidium
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.
2006-08-20(svn r5974) -Codechange: added casts all around the place to make Windows ↵truelight
64bit happy (michi_cc)
2006-08-19(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:truelight
- 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-16(svn r5926) -Codechange: make _cur_year contain the full year, instead of ↵rubidium
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
2006-08-15(svn r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and ↵rubidium
BASE_YEAR when comparing _cur_year with a 'full' year. -Cleanup: replace some magic '1920' values with BASE_YEAR.
2006-08-15(svn r5915) -Cleanup: some variables were named *_date while they were only ↵rubidium
holding years; rename these variables to match this.
2006-08-14(svn r5887) -Cleanup: move date related functions, defines and variables to ↵rubidium
date.[ch] -Cleanup: fix whitespace related coding style issues in date.[ch] -Cleanup: make original comments doxygen compatible and remove/change outdated comments
2006-06-27(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectaculartron
2006-06-14(svn r5265) Replace a dozen bogus uses of strncmp() by strcmp()tron
2006-04-22(svn r4521) - Fix: be consistent about the size of the player-name in MP. ↵Darkvater
This hopefully fixes a crash on lesser OS's (eg Win98). Use ttd_strlcpy() to just copy over strings and properly terminate them because different implementations of snprintf() behave differently. Courtesy of TrueLight
2006-04-03(svn r4267) - Fix (r4241): also validate the error number that a client ↵Darkvater
receives from a server, and encapsulate this functionality into GetNetworkErrorMsg().
2006-04-02(svn r4243) Unbreak compilationtron
2006-04-02(svn r4241) - Fix: Perform validation on the error number that a server ↵peter1138
receives from a client. An invalid value may cause the server to terminate.
2006-03-21(svn r3997) - Default the patch-setting 'pause_on_join' to true.Darkvater
2006-03-02(svn r3726) - [6/6] Finalize conversion, finally save the patches struct.Darkvater
- 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
2006-03-02(svn r3721) - [3/4] Present the game with a unified structure for the ↵Darkvater
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.
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2006-01-31(svn r3500) - Workaround the inaccurate count of spectators/companies that ↵Darkvater
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-25(svn r3430) - You can of course not join when there are more companies than ↵Darkvater
the maximum set, not the other way around.
2006-01-25(svn r3427) - Feature: Allow seeing and setting the maximum amount of ↵Darkvater
companies and spectators for a server. This can be changed/viewed during runtime as well in the console.
2006-01-05(svn r3365) Staticise 36 functionstron
2005-11-18(svn r3218) -Feature: Multiheaded train engines will now stay in the same trainbjarni
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
2005-10-19(svn r3067) - Feature: allow unbanning players based on banlist-id (as well ↵Darkvater
as IP). - Feature: 'status' and 'clients' now show the IP of the players
2005-08-28(svn r2899) -Fix: Several format string vulnerabilities and buffer overflows ↵tron
in the network code
2005-08-07(svn r2828) Only command.c needs to know about _docommand_recursive, so make ↵tron
it static. Tell me if there's a problem, because i removed it from network_server.c, but afaict it should be ok
2005-07-29(svn r2755) Fix: Fix a desync issue with autoreplaceludde
2005-07-26(svn r2720) Remove unused declarations and definitionstron
2005-07-26(svn r2716) Do not use strncat()tron
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-22(svn r2672) Move saving/loading related declarations to saveload.htron
2005-07-21(svn r2669) Shuffle some more stuff around to reduce dependenciestron
2005-07-16(svn r2591) Codechange: [network] Cleanup NetworkHandleCommandQueueludde
2005-07-16(svn r2589) Fix: [network] Fixed static variable that wasn't initialized. ↵ludde
Would stop the sync checking from working in some cases.