Ok I've read through the patch (didn't play it yet). Overall it looks very nice, but I have a few comments if I may

:
EASY STUFF:
1) There are many many many places with something like (thing1->owner == thing2->owner || SharedThings(thing1)). Methinks that should end up in some inline function, because some of the if-expressions are just not really human readable anymore.
2) "SharedTracksPaiement" ... english function names please
3) Some magic numbers: Money route_profit[8]
4) /**** CHANGE HERE ****/ <= dunno what that is
5) The array of the two values for the settings (current and next month or whatever) might want to have some static const int for the index instead of using "0" and "1"
Code: Select all
enum {
IS_CURRENT,
IS_FUTURE,
IS_END
6) There are some printfs in the code left
7) in station_cmd.cpp you set the feeder share for player 0, why not for the player that the station belongs to?

please use ton_tiles instead of tontiles if possible somehow
HARD STUFF:
Something more general: OpenTTD is C++ (OOP) meanwhile. Maybe there could be a "SharedInfrastructure" Class and each player has one instance of that class? Then the global variables could be static members and the whole code would be a bit more readable.
Hope this helps
Celestar