diff --git a/Makefile.grf.in b/Makefile.grf.in
index 81089efb11..c2d058d597 100644
--- a/Makefile.grf.in
+++ b/Makefile.grf.in
@@ -75,10 +75,10 @@ $(BIN_DIR)/%.obm: $(BASESET_DIR)/%.obm $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/
$(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $< >$@
# Compile extra grf
-$(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites
+$(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites $(GRF_DIR)/assemble_nfo.awk
$(E) '$(STAGE) Assembling openttd.nfo'
$(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null
- $(Q) $(CC_BUILD) -nostdinc -I$(GRF_DIR) -C -E - < "$(GRF_DIR)/openttd.nfo" | sed -e '/^#/d' -e '/^$$/d' > $(OBJS_DIR)/sprites/openttd.nfo
+ $(Q) awk -f $(GRF_DIR)/assemble_nfo.awk $(GRF_DIR)/openttd.nfo > $(OBJS_DIR)/sprites/openttd.nfo
$(Q) $(NFORENUM) -s $(OBJS_DIR)/sprites/openttd.nfo
$(E) '$(STAGE) Compiling openttd.grf'
$(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/openttd.grf
diff --git a/changelog.txt b/changelog.txt
index 1da7d4d1b2..1b1fbe6998 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,77 @@
+1.4.2 (2014-08-16)
+------------------------------------------------------------------------
+(None)
+
+
+1.4.2-RC2 (2014-08-03)
+------------------------------------------------------------------------
+- Change: Use awk instead of trying to convince cpp to preprocess nfo files (r26708)
+- Fix: CMD_CLEAR_ORDER_BACKUP should not be suppressed by pause modes (r26716)
+- Fix: [NewGRF] Parameters to SCC_NEWGRF_PUSH_WORD and SCC_NEWGRF_UNPRINT were not skipped during drawing (r26713)
+- Fix: [OSX] Compilation fails with some lzo2 versions, if __LP64__ is defined to 0 instead of checking whether it is defined [FS#6069] (r26709)
+- Fix: Wrong breakdown sound was played for ships [FS#6015] (r26706)
+- Fix: Integer overflows in acceleration code causing either too low acceleration or too high acceleration [FS#6067] (r26702)
+- Fix: Discard incorrectly saved order backups when clients join [FS#6066] (r26700)
+- Fix: Do not crash when trying to show an error about vehicle in a NewGRF and the NewGRF was not loaded at all (r26699)
+- Fix: Slovak uses space as group separator in numbers [FS#6064] (r26695)
+- Fix: Tighten parameter bound checks on GSCargoMonitor functions, and return -1 on out-of-bound parameters (r26685)
+
+
+1.4.2-RC1 (2014-07-03)
+------------------------------------------------------------------------
+- Fix: CargoPacket::SourceStation() returns a StationID (r26660)
+- Fix: Days in dates are not represented by ordinal numbers in all languages [FS#6047] (r26657)
+- Fix: Production cheat cannot be allowed to be active in multiplayer for desync reasons, even when activated in singleplayer previously [FS#6044] (r26656)
+- Fix: Make sure an 'abs' is used that supports int64 when using 'abs' on those variables (r26651)
+- Fix: Support save/load chunk lengths of up to (1 << 32) - 1 [FS#6041] (r26650)
+- Fix: Incorrect usage of string commands in the base language [FS#6037] (r26642, r26640, r26639, r26632)
+- Fix: Segmentation fault when encountering a .obg/.obs/.obm with empty string/zero length MD5 checksums [FS#6038] (r26637)
+- Fix: The 'Load' button was not properly enabled/disabled for old savegames without NewGRF information (r26634)
+- Fix: If the video driver fails to supply a list of resolutions, display an error message [FS#6012] (r26629)
+
+
+1.4.1 (2014-06-02)
+------------------------------------------------------------------------
+- Fix: First send packages about new company, then clients joining it to admin port [FS#6025] (r26616)
+
+
+1.4.1-RC2 (2014-05-18)
+------------------------------------------------------------------------
+- Fix: Save/load issues on big endian machines (r26593, r26590, r26589)
+- Fix: Consider multiheaded trains in station refits [FS#5995] (r26586)
+- Fix: Game script could be changed in game by double clicking [FS#5974] (r26583)
+- Fix: Transfer stations also should have a cargo rating [FS#5989] (r26581, r26580)
+- Fix: [Network] AIs would not reset certain network state information upon creation of their company [FS#6003] (r26578, r26576)
+- Fix: [Network] Client of non-dedicated server was not correctly put into the first company for all state variables [FS#6001] (r26577)
+
+
+1.4.1-RC1 (2014-05-04)
+------------------------------------------------------------------------
+- Change: Remove demand calculation based on tiles (r26484)
+- Change: Use pkg-config for libpng as well (r26435, r26433, r26432)
+- Change: Use better distance metric for link graph [FS#5941] (r26411)
+- Fix: [Windows] Crash when the operating system performs the "paint" callback during window creation [FS#5994] (r26539, r26538)
+- Fix: OpenBSD compilation [FS#5992] (r26523)
+- Fix: prevent from ever reading huge (or negative) amounts of data in strgen (r26521)
+- Fix: Severity rating of dedicated server messages during world generation (r26518)
+- Fix: Buffer overruns in handling of symbolic links inside tars (r26514)
+- Fix: Incorrect usage of strecpy (r26505, r26485)
+- Fix: Reading console input on dedicated server relied on unspecified behaviour (r26496)
+- Fix: Allow single-vehicle consists to station-refit in a meaningful way (r26483)
+- Fix: Prevent comparing to NULL when strndup could not allocate memory (r26476)
+- Fix: Potentially undefined shifts in NewGRF code (r26475)
+- Fix: Make sure there is no uninitialised sprite data (r26473)
+- Fix: Draw text shadow for ellipses (r26467)
+- Fix: Add special handling for PALETTE_CRASH to work for non-8bpp-mapped sprites (r26463)
+- Fix: Avoid division by 0 when scaling flow values [FS#5970] (r26448)
+- Fix: Draw links to match _settings_game.vehicle.road_side [FS#5961] (r26445)
+- Fix: Load button for heightmap list was missing [FS#5953] (r26428)
+- Fix: Do not crash when supplying an invalid filename without extension to cmd parameter -q (r26423)
+- Fix: Some road constructions used the rail sound effect [FS#5946] (r26422)
+- Fix: Goal GUI failed to shade [FS#5948] (r26420)
+- Fix: Shares button state was not appropriately updated when switching setting or company [FS#5947] (r26416)
+
+
1.4.0 (2014-04-01)
------------------------------------------------------------------------
(None)
diff --git a/config.lib b/config.lib
index 424d3372f2..52e7dda5d9 100644
--- a/config.lib
+++ b/config.lib
@@ -1450,7 +1450,11 @@ make_cflags_and_ldflags() {
LDFLAGS="$LDFLAGS -noixemul"
fi
- CFLAGS="-O2 -fomit-frame-pointer $CFLAGS"
+ if [ "$enable_profiling" = "0" ]; then
+ # -fomit-frame-pointer and -pg do not go well together (gcc errors they are incompatible)
+ CFLAGS="-fomit-frame-pointer $CFLAGS"
+ fi
+ CFLAGS="-O2 $CFLAGS"
else
OBJS_SUBDIR="debug"
@@ -1494,7 +1498,7 @@ make_cflags_and_ldflags() {
fi
if [ "$enable_profiling" != "0" ]; then
- CFLAGS="$CFLAGS -p"
+ CFLAGS="$CFLAGS -pg"
LDFLAGS="$LDFLAGS -pg"
fi
diff --git a/known-bugs.txt b/known-bugs.txt
index d26ef9ff86..2cf03b1750 100644
--- a/known-bugs.txt
+++ b/known-bugs.txt
@@ -1,6 +1,6 @@
OpenTTD's known bugs
-Last updated: 2014-02-25
-Release version: 1.4.0-beta5
+Last updated: 2014-08-16
+Release version: 1.4.2
------------------------------------------------------------------------
diff --git a/media/extra_grf/assemble_nfo.awk b/media/extra_grf/assemble_nfo.awk
new file mode 100644
index 0000000000..cf6b425c1d
--- /dev/null
+++ b/media/extra_grf/assemble_nfo.awk
@@ -0,0 +1,32 @@
+# $Id$
+
+# This file is part of OpenTTD.
+# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
+
+BEGIN {
+ # Very basic variant function; barely any error checking.
+ # Just use the first argument as the file to start from when assembling everything
+ path = ARGV[1];
+ gsub("[^/\\\\]*$", "", path);
+ assemble(ARGV[1]);
+}
+
+# Recursive function for assembling by means of resolving the #includes.
+function assemble(filename) {
+ while ((getline < filename) > 0) {
+ if (NF == 2 && $1 == "#include" ) {
+ # Remove the quotes.
+ gsub("[\"'<>]", "", $2);
+ assemble(path $2);
+ } else {
+ print $0;
+ }
+ }
+
+ if (close(filename) < 0) {
+ print "Could not open " filename > "/dev/stderr";
+ exit -1;
+ }
+}
diff --git a/os/debian/changelog b/os/debian/changelog
index 1ff0deed6c..24bce6c1cd 100644
--- a/os/debian/changelog
+++ b/os/debian/changelog
@@ -1,3 +1,39 @@
+openttd (1.4.2-0) unstable; urgency=low
+
+ * New upstream release 1.4.2
+
+ -- OpenTTD Sat, 16 Aug 2014 21:00:00 +0200
+
+openttd (1.4.2~RC2-0) unstable; urgency=low
+
+ * New upstream release 1.4.2-RC2
+
+ -- OpenTTD Sun, 03 Aug 2014 18:00:00 +0200
+
+openttd (1.4.2~RC1-0) unstable; urgency=low
+
+ * New upstream release 1.4.2-RC1
+
+ -- OpenTTD Thu, 03 Jul 2014 21:00:00 +0200
+
+openttd (1.4.1-0) unstable; urgency=low
+
+ * New upstream release 1.4.1
+
+ -- OpenTTD Mon, 02 Jun 2014 21:00:00 +0200
+
+openttd (1.4.1~RC2-0) unstable; urgency=low
+
+ * New upstream release 1.4.1-RC2
+
+ -- OpenTTD Sun, 18 May 2014 21:00:00 +0200
+
+openttd (1.4.1~RC1-0) unstable; urgency=low
+
+ * New upstream release 1.4.1-RC1
+
+ -- OpenTTD Sun, 04 May 2014 21:00:00 +0200
+
openttd (1.4.0-0) unstable; urgency=low
* New upstream release 1.4.0
diff --git a/projects/openttd_vs100.vcxproj b/projects/openttd_vs100.vcxproj
index c85b1d6840..84cc40c9b1 100644
--- a/projects/openttd_vs100.vcxproj
+++ b/projects/openttd_vs100.vcxproj
@@ -568,6 +568,7 @@
+
diff --git a/projects/openttd_vs100.vcxproj.filters b/projects/openttd_vs100.vcxproj.filters
index 40dc6beb81..de8904ba06 100644
--- a/projects/openttd_vs100.vcxproj.filters
+++ b/projects/openttd_vs100.vcxproj.filters
@@ -933,6 +933,9 @@
Header Files
+
+ Header Files
+
Header Files
diff --git a/projects/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj
index 3326538783..e12197aa96 100644
--- a/projects/openttd_vs80.vcproj
+++ b/projects/openttd_vs80.vcproj
@@ -1546,6 +1546,10 @@
RelativePath=".\..\src\roadveh.h"
>
+
+
diff --git a/projects/openttd_vs90.vcproj b/projects/openttd_vs90.vcproj
index e7da3fb5ea..46be72059c 100644
--- a/projects/openttd_vs90.vcproj
+++ b/projects/openttd_vs90.vcproj
@@ -1543,6 +1543,10 @@
RelativePath=".\..\src\roadveh.h"
>
+
+
diff --git a/readme.txt b/readme.txt
index e89965cc3c..7fdc6e3b50 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,5 +1,5 @@
-Last updated: 2014-02-25
-Release version: 1.4.0-beta5
+Last updated: 2014-08-16
+Release version: 1.4.2
------------------------------------------------------------------------
@@ -674,46 +674,47 @@ http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi5s.zip
X.X) Credits
---- -------
The OpenTTD team (in alphabetical order):
- Albert Hofkamp (Alberth) - GUI expert
- Jean-François Claeys (Belugas) - GUI, newindustries and more
- Matthijs Kooijman (blathijs) - Pathfinder-guru, pool rework
- Ulf Hermann (fonsinchen) - Cargo Distribution
- Christoph Elsenhans (frosch) - General coding
- Loïc Guilloux (glx) - Windows Expert
- Michael Lutz (michi_cc) - Path based signals
- Owen Rudge (orudge) - Forum host, OS/2 port
- Peter Nelson (peter1138) - Spiritual descendant from newGRF gods
- Ingo von Borstel (planetmaker) - Support
- Remko Bijker (Rubidium) - Lead coder and way more
- Zdeněk Sojka (SmatZ) - Bug finder and fixer
- José Soler (Terkhen) - General coding
- Thijs Marinussen (Yexo) - AI Framework
- Leif Linse (Zuu) - AI/Game Script
+ Albert Hofkamp (Alberth) - GUI expert (since 0.7)
+ Matthijs Kooijman (blathijs) - Pathfinder-guru, Debian port (since 0.3)
+ Ulf Hermann (fonsinchen) - Cargo Distribution (since 1.3)
+ Christoph Elsenhans (frosch) - General coding (since 0.6)
+ Loïc Guilloux (glx) - Windows Expert (since 0.4.5)
+ Michael Lutz (michi_cc) - Path based signals (since 0.7)
+ Owen Rudge (orudge) - Forum host, OS/2 port (since 0.1)
+ Peter Nelson (peter1138) - Spiritual descendant from newGRF gods (since 0.4.5)
+ Ingo von Borstel (planetmaker) - General coding, Support (since 1.1)
+ Remko Bijker (Rubidium) - Lead coder and way more (since 0.4.5)
+ José Soler (Terkhen) - General coding (since 1.0)
+ Leif Linse (Zuu) - AI/Game Script (since 1.2)
Inactive Developers:
- Bjarni Corfitzen (Bjarni) - MacOSX port, coder and vehicles
- Victor Fischer (Celestar) - Programming everywhere you need him to
- Tamás Faragó (Darkvater) - Ex-Lead coder
- Jaroslav Mazanec (KUDr) - YAPG (Yet Another Pathfinder God) ;)
- Jonathan Coome (Maedhros) - High priest of the NewGRF Temple
- Attila Bán (MiHaMiX) - WebTranslator 1 and 2
- Christoph Mallon (Tron) - Programmer, code correctness police
+ Jean-François Claeys (Belugas) - GUI, newindustries and more (0.4.5 - 1.0)
+ Bjarni Corfitzen (Bjarni) - MacOSX port, coder and vehicles (0.3 - 0.7)
+ Victor Fischer (Celestar) - Programming everywhere you need him to (0.3 - 0.6)
+ Jaroslav Mazanec (KUDr) - YAPG (Yet Another Pathfinder God) ;) (0.4.5 - 0.6)
+ Jonathan Coome (Maedhros) - High priest of the NewGRF Temple (0.5 - 0.6)
+ Attila Bán (MiHaMiX) - WebTranslator 1 and 2 (0.3 - 0.5)
+ Zdeněk Sojka (SmatZ) - Bug finder and fixer (0.6 - 1.3)
+ Christoph Mallon (Tron) - Programmer, code correctness police (0.3 - 0.5)
+ Patric Stout (TrueBrain) - NoProgrammer (0.3 - 1.2), sys op (active)
+ Thijs Marinussen (Yexo) - AI Framework, General (0.6 - 1.3)
Retired Developers:
- Ludvig Strigeus (ludde) - OpenTTD author, main coder (0.1 - 0.3.3)
- Serge Paquet (vurlix) - Assistant project manager, coder (0.1 - 0.3.3)
- Dominik Scherer (dominik81) - Lead programmer, GUI expert (0.3.0 - 0.3.6)
- Benedikt Brüggemeier (skidd13) - Bug fixer and code reworker
- Patric Stout (TrueBrain) - NoProgrammer (0.3 - 1.2), sys op (active)
+ Tamás Faragó (Darkvater) - Ex-Lead coder (0.3 - 0.5)
+ Dominik Scherer (dominik81) - Lead programmer, GUI expert (0.3 - 0.3)
+ Emil Djupfeld (egladil) - MacOSX port (0.4 - 0.6)
+ Simon Sasburg (HackyKid) - Bug fixer (0.4 - 0.4.5)
+ Ludvig Strigeus (ludde) - Original author of OpenTTD, main coder (0.1 - 0.3)
+ Cian Duffy (MYOB) - BeOS port / manual writing (0.1 - 0.3)
+ Petr Baudiš (pasky) - Many patches, newgrf support, etc. (0.3 - 0.3)
+ Benedikt Brüggemeier (skidd13) - Bug fixer and code reworker (0.6 - 0.7)
+ Serge Paquet (vurlix) - 2nd contributor after ludde (0.1 - 0.3)
Thanks to:
Josef Drexler - For his great work on TTDPatch.
Marcin Grzegorczyk - For his TTDPatch work and documentation of Transport Tycoon Deluxe internals and track foundations
- Petr Baudiš (pasky) - Many patches, newgrf support, etc.
- Simon Sasburg (HackyKid) - For the many bugfixes he has blessed us with
Stefan Meißner (sign_de) - For his work on the console
Mike Ragsdale - OpenTTD installer
- Cian Duffy (MYOB) - BeOS port / manual writing
Christian Rosentreter (tokai) - MorphOS / AmigaOS port
Richard Kempton (RichK67) - Additional airports, initial TGP implementation
Alberto Demichelis - Squirrel scripting language
diff --git a/source.list b/source.list
index 21df73bebb..208d9b8e86 100644
--- a/source.list
+++ b/source.list
@@ -303,6 +303,7 @@ road_internal.h
road_type.h
roadstop_base.h
roadveh.h
+safeguards.h
screenshot.h
sdl.h
sound/sdl_s.h
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp
index 050ec993e3..8448f8574e 100644
--- a/src/airport_gui.cpp
+++ b/src/airport_gui.cpp
@@ -239,8 +239,27 @@ public:
this->SetWidgetLoweredState(WID_AP_BTN_DOHILIGHT, _settings_client.gui.station_show_coverage);
this->OnInvalidateData();
- this->vscroll->SetCount(AirportClass::Get(_selected_airport_class)->GetSpecCount());
- this->SelectFirstAvailableAirport(true);
+ /* Ensure airport class is valid (changing NewGRFs). */
+ _selected_airport_class = Clamp(_selected_airport_class, APC_BEGIN, (AirportClassID)(AirportClass::GetClassCount() - 1));
+ const AirportClass *ac = AirportClass::Get(_selected_airport_class);
+ this->vscroll->SetCount(ac->GetSpecCount());
+
+ /* Ensure the airport index is valid for this class (changing NewGRFs). */
+ _selected_airport_index = Clamp(_selected_airport_index, -1, ac->GetSpecCount() - 1);
+
+ /* Only when no valid airport was selected, we want to select the first airport. */
+ bool selectFirstAirport = true;
+ if (_selected_airport_index != -1) {
+ const AirportSpec *as = ac->GetSpec(_selected_airport_index);
+ if (as->IsAvailable()) {
+ /* Ensure the airport layout is valid. */
+ _selected_airport_layout = Clamp(_selected_airport_layout, 0, as->num_table - 1);
+ selectFirstAirport = false;
+ this->UpdateSelectSize();
+ }
+ }
+
+ if (selectFirstAirport) this->SelectFirstAvailableAirport(true);
}
virtual ~BuildAirportWindow()
diff --git a/src/cargomonitor.cpp b/src/cargomonitor.cpp
index 7d31e6e237..b1d52d6b18 100644
--- a/src/cargomonitor.cpp
+++ b/src/cargomonitor.cpp
@@ -19,11 +19,11 @@ CargoMonitorMap _cargo_pickups; ///< Map of monitored pick-ups to the amoun
CargoMonitorMap _cargo_deliveries; ///< Map of monitored deliveries to the amount since last query/activation.
/**
- * Helper method for ClearCargoPickupMonitoring and ClearCargoDeliveryMonitoring.
- * Clears all monitors that belong to the specified company or all if INVALID_OWNER
+ * Helper method for #ClearCargoPickupMonitoring and #ClearCargoDeliveryMonitoring.
+ * Clears all monitors that belong to the specified company or all if #INVALID_OWNER
* is specified as company.
* @param cargo_monitor_map reference to the cargo monitor map to operate on.
- * @param company company to clear cargo monitors for or INVALID_OWNER if all cargo monitors should be cleared.
+ * @param company company to clear cargo monitors for or #INVALID_OWNER if all cargo monitors should be cleared.
*/
static void ClearCargoMonitoring(CargoMonitorMap &cargo_monitor_map, CompanyID company = INVALID_OWNER)
{
@@ -44,7 +44,7 @@ static void ClearCargoMonitoring(CargoMonitorMap &cargo_monitor_map, CompanyID c
/**
* Clear all pick-up cargo monitors.
- * @param company clear all pick-up monitors for this company or if INVALID_OWNER
+ * @param company clear all pick-up monitors for this company or if #INVALID_OWNER
* is passed, all pick-up monitors are cleared regardless of company.
*/
void ClearCargoPickupMonitoring(CompanyID company)
@@ -54,7 +54,7 @@ void ClearCargoPickupMonitoring(CompanyID company)
/**
* Clear all delivery cargo monitors.
- * @param company clear all delivery monitors for this company or if INVALID_OWNER
+ * @param company clear all delivery monitors for this company or if #INVALID_OWNER
* is passed, all delivery monitors are cleared regardless of company.
*/
void ClearCargoDeliveryMonitoring(CompanyID company)
@@ -69,7 +69,7 @@ void ClearCargoDeliveryMonitoring(CompanyID company)
* @param keep_monitoring After returning from this call, continue monitoring.
* @return Amount collected since last query/activation for the monitored combination.
*/
-static uint32 GetAmount(CargoMonitorMap &monitor_map, CargoMonitorID monitor, bool keep_monitoring)
+static int32 GetAmount(CargoMonitorMap &monitor_map, CargoMonitorID monitor, bool keep_monitoring)
{
CargoMonitorMap::iterator iter = monitor_map.find(monitor);
if (iter == monitor_map.end()) {
@@ -79,7 +79,7 @@ static uint32 GetAmount(CargoMonitorMap &monitor_map, CargoMonitorID monitor, bo
}
return 0;
} else {
- uint32 result = iter->second;
+ int32 result = iter->second;
iter->second = 0;
if (!keep_monitoring) monitor_map.erase(iter);
return result;
@@ -92,7 +92,7 @@ static uint32 GetAmount(CargoMonitorMap &monitor_map, CargoMonitorID monitor, bo
* @param keep_monitoring After returning from this call, continue monitoring.
* @return Amount of delivered cargo for the monitored combination.
*/
-uint32 GetDeliveryAmount(CargoMonitorID monitor, bool keep_monitoring)
+int32 GetDeliveryAmount(CargoMonitorID monitor, bool keep_monitoring)
{
return GetAmount(_cargo_deliveries, monitor, keep_monitoring);
}
@@ -104,7 +104,7 @@ uint32 GetDeliveryAmount(CargoMonitorID monitor, bool keep_monitoring)
* @return Amount of picked up cargo for the monitored combination.
* @note Cargo pick up is counted on final delivery, to prevent users getting credit for picking up cargo without delivering it.
*/
-uint32 GetPickupAmount(CargoMonitorID monitor, bool keep_monitoring)
+int32 GetPickupAmount(CargoMonitorID monitor, bool keep_monitoring)
{
return GetAmount(_cargo_pickups, monitor, keep_monitoring);
}
diff --git a/src/cargomonitor.h b/src/cargomonitor.h
index ce9a8e5d6d..061a1821a4 100644
--- a/src/cargomonitor.h
+++ b/src/cargomonitor.h
@@ -16,6 +16,7 @@
#include "company_func.h"
#include "industry.h"
#include "town.h"
+#include "core/overflowsafe_type.hpp"
#include