Skip to content

Commit

Permalink
FIX: correctly calculate asset value for trams
Browse files Browse the repository at this point in the history
git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@8814 8aca7d54-2c30-db11-9de9-000461428c89
  • Loading branch information
Dwachs committed Sep 15, 2019
1 parent 38cf40f commit a9285cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions player/simplay.cc
Expand Up @@ -401,7 +401,7 @@ void player_t::calc_assets()
if( cnv->get_owner() == this ) {
sint64 restwert = cnv->calc_restwert();
assets[TT_ALL] += restwert;
assets[finance->translate_waytype_to_tt(cnv->front()->get_waytype())] += restwert;
assets[finance->translate_waytype_to_tt(cnv->front()->get_desc()->get_waytype())] += restwert;
}
}

Expand All @@ -411,7 +411,7 @@ void player_t::calc_assets()
FOR(slist_tpl<vehicle_t*>, const veh, depot->get_vehicle_list()) {
sint64 restwert = veh->calc_sale_value();
assets[TT_ALL] += restwert;
assets[finance->translate_waytype_to_tt(veh->get_waytype())] += restwert;
assets[finance->translate_waytype_to_tt(veh->get_desc()->get_waytype())] += restwert;
}
}
}
Expand Down

0 comments on commit a9285cd

Please sign in to comment.