summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_event_types.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-03-18 19:32:13 +0000
committerfrosch <frosch@openttd.org>2009-03-18 19:32:13 +0000
commit6dd04a9a7804e0d4cecb74dc88dab1fd8c8382a6 (patch)
tree5b3edf89230e9a4cf637194daab09e36914f83e4 /src/ai/api/ai_event_types.cpp
parentea2c50281e34c8c0ade102552fc3d0f336496de9 (diff)
downloadopenttd-6dd04a9a7804e0d4cecb74dc88dab1fd8c8382a6.tar.xz
(svn r15763) -Codechange/Fix: Add Engine::GetDisplayDefaultCapacity() and use it everywhere, so CB 36 is also used everywhere.
Diffstat (limited to 'src/ai/api/ai_event_types.cpp')
-rw-r--r--src/ai/api/ai_event_types.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ai/api/ai_event_types.cpp b/src/ai/api/ai_event_types.cpp
index 469d53776..f02cfc957 100644
--- a/src/ai/api/ai_event_types.cpp
+++ b/src/ai/api/ai_event_types.cpp
@@ -3,9 +3,11 @@
/** @file ai_event_types.cpp Implementation of all EventTypes. */
#include "ai_event_types.hpp"
+#include "../../command_type.h"
#include "../../strings_func.h"
#include "../../settings_type.h"
-#include "../../aircraft.h"
+#include "../../rail.h"
+#include "../../engine_base.h"
#include "../../articulated_vehicles.h"
#include "table/strings.h"
@@ -41,11 +43,8 @@ int32 AIEventEnginePreview::GetCapacity()
} break;
case VEH_SHIP:
- return e->u.ship.capacity;
- break;
-
case VEH_AIRCRAFT:
- return AircraftDefaultCargoCapacity(e->GetDefaultCargoType(), &e->u.air);
+ return e->GetDisplayDefaultCapacity();
break;
default: NOT_REACHED();