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?
Depens if server or clientwise; but there is network_cmd.cc with nwc_join_t cl**** ...
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.
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.
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.
Thank you very much :-)