diff options
Diffstat (limited to 'src/players.cpp')
-rw-r--r-- | src/players.cpp | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/src/players.cpp b/src/players.cpp index b0314f685..9c0ee2e67 100644 --- a/src/players.cpp +++ b/src/players.cpp @@ -32,6 +32,8 @@ #include "string_func.h" #include "ai/default/default.h" #include "ai/trolly/trolly.h" +#include "road_func.h" +#include "rail.h" /** * Sets the local player and updates the patch settings that are set on a @@ -590,47 +592,6 @@ void PlayersYearlyLoop() } } -byte GetPlayerRailtypes(PlayerID p) -{ - byte rt = 0; - EngineID i; - - for (i = 0; i != TOTAL_NUM_ENGINES; i++) { - const Engine* e = GetEngine(i); - const EngineInfo *ei = EngInfo(i); - - if (e->type == VEH_TRAIN && HasBit(ei->climates, _opt.landscape) && - (HasBit(e->player_avail, p) || _date >= e->intro_date + 365)) { - const RailVehicleInfo *rvi = RailVehInfo(i); - - if (rvi->railveh_type != RAILVEH_WAGON) { - assert(rvi->railtype < RAILTYPE_END); - SetBit(rt, rvi->railtype); - } - } - } - - return rt; -} - -byte GetPlayerRoadtypes(PlayerID p) -{ - byte rt = 0; - EngineID i; - - for (i = 0; i != TOTAL_NUM_ENGINES; i++) { - const Engine* e = GetEngine(i); - const EngineInfo *ei = EngInfo(i); - - if (e->type == VEH_ROAD && HasBit(ei->climates, _opt.landscape) && - (HasBit(e->player_avail, p) || _date >= e->intro_date + 365)) { - SetBit(rt, HasBit(ei->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD); - } - } - - return rt; -} - static void DeletePlayerStuff(PlayerID pi) { Player *p; |