diff options
author | smatz <smatz@openttd.org> | 2008-02-13 19:24:40 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-02-13 19:24:40 +0000 |
commit | fe48d0be219f2035b146c6444c92c305d9c3bedf (patch) | |
tree | af07b8c3ed3437ba91111379ab438956940c60bb /src/ai/trolly | |
parent | 833a00def99ecf91bce955e35b82b33e4b7d5517 (diff) | |
download | openttd-fe48d0be219f2035b146c6444c92c305d9c3bedf.tar.xz |
(svn r12134) -Change: count the number of ticks a vehicle was running this day to calculate running cost
-Fix [FS#1739]: vehicle profit is now counted with 8bit fract, so it is now shown properly in the vehicle details window
Diffstat (limited to 'src/ai/trolly')
-rw-r--r-- | src/ai/trolly/trolly.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/trolly/trolly.cpp b/src/ai/trolly/trolly.cpp index 01792f527..8f62b7e95 100644 --- a/src/ai/trolly/trolly.cpp +++ b/src/ai/trolly/trolly.cpp @@ -1252,7 +1252,7 @@ static void AiNew_CheckVehicle(Player *p, Vehicle *v) if (v->age > 360) { // If both years together are not more than AI_MINIMUM_ROUTE_PROFIT, // it is not worth the line I guess... - if (v->profit_last_year + v->profit_this_year < AI_MINIMUM_ROUTE_PROFIT || + if ((v->profit_last_year + v->profit_this_year) >> 8 < AI_MINIMUM_ROUTE_PROFIT || (v->reliability * 100 >> 16) < 40) { // There is a possibility that the route is fucked up... if (v->cargo.DaysInTransit() > AI_VEHICLE_LOST_DAYS) { |