diff -r 0050610c0368 -r c291a21b304e src/elrail.cpp --- a/src/elrail.cpp Tue Sep 30 17:50:21 2008 +0000 +++ b/src/elrail.cpp Tue Sep 30 20:39:50 2008 +0000 @@ -465,7 +465,7 @@ int32 SettingsDisableElrail(int32 p1) { Vehicle *v; - Player *p; + Company *c; bool disable = (p1 != 0); /* we will now walk through all electric train engines and change their railtypes if it is the wrong one*/ @@ -506,7 +506,7 @@ } } - FOR_ALL_PLAYERS(p) p->avail_railtypes = GetPlayerRailtypes(p->index); + FOR_ALL_COMPANIES(c) c->avail_railtypes = GetCompanyRailtypes(c->index); /* This resets the _last_built_railtype, which will be invalid for electric * rails. It may have unintended consequences if that function is ever