Further network compatibility query April 26, 2010, 07:12:44 pm If I want a particular method to be called whenever a player joins a network game, where should I put the instruction to call it? Quote Selected
Re: Further network compatibility query Reply #1 – April 26, 2010, 08:25:40 pm Depens if server or clientwise; but there is network_cmd.cc with nwc_join_t cl**** ... Quote Selected
Re: Further network compatibility query Reply #2 – April 26, 2010, 10:15:16 pm Suppose a new client joins the server - where are methods called then? The reason that I am asking is because, in Experimental, I am setting up a system to check which towns are connected to which other towns by road, and, because those values aren't saved or transmitted accross the network, they need to be recalculated (for all players) on loading or a new player joining. Quote Selected
Re: Further network compatibility query Reply #3 – April 27, 2010, 05:02:29 am Quote from: jamespetts – on April 26, 2010, 10:15:16 pm... on loading or a new player joining.After transmitting the game, it is loaded by the client the same way as a normal savegame. That said, it should be safe for you to put these calculations in the rdwr() methods. Quote Selected
Re: Further network compatibility query Reply #4 – April 27, 2010, 07:43:21 am All clients (and the server too) saves their game and loading it at the time another player joins, since also simutrans standrad has many stuff that happens during loading of games. You most likely do not have to change something. Quote Selected
Re: Further network compatibility query Reply #5 – April 27, 2010, 09:15:01 am Thank you very much :-) Quote Selected