summaryrefslogtreecommitdiff
path: root/src/road_gui.cpp
diff options
context:
space:
mode:
authorglx22 <glx22@users.noreply.github.com>2019-09-07 18:37:01 +0200
committerCharles Pigott <charlespigott@googlemail.com>2019-09-07 17:37:01 +0100
commitb3fd7879596defeb6af78acb4ea45e4418821bdf (patch)
tree08b94b2cd65012e573b0e8c94196daab5aab12ba /src/road_gui.cpp
parent381c2a45875206afe43241d0c76619638cf613fc (diff)
downloadopenttd-b3fd7879596defeb6af78acb4ea45e4418821bdf.tar.xz
Fix #7188: check the validity of command callback for scripts (#7701)
Diffstat (limited to 'src/road_gui.cpp')
-rw-r--r--src/road_gui.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/road_gui.cpp b/src/road_gui.cpp
index 67132f093..b215d519f 100644
--- a/src/road_gui.cpp
+++ b/src/road_gui.cpp
@@ -68,7 +68,7 @@ static RoadType _cur_roadtype;
static DiagDirection _road_depot_orientation;
static DiagDirection _road_station_picker_orientation;
-void CcPlaySound_SPLAT_OTHER(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
+void CcPlaySound_SPLAT_OTHER(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, tile);
}
@@ -96,8 +96,9 @@ static void PlaceRoad_Bridge(TileIndex tile, Window *w)
* @param p1 bit 0-3 railtype or roadtypes
* bit 8-9 transport type
* @param p2 unused
+ * @param cmd unused
*/
-void CcBuildRoadTunnel(const CommandCost &result, TileIndex start_tile, uint32 p1, uint32 p2)
+void CcBuildRoadTunnel(const CommandCost &result, TileIndex start_tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Succeeded()) {
if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, start_tile);
@@ -130,7 +131,7 @@ void ConnectRoadToStructure(TileIndex tile, DiagDirection direction)
}
}
-void CcRoadDepot(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
+void CcRoadDepot(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
@@ -153,9 +154,10 @@ void CcRoadDepot(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2
* bit 3: #Axis of the road for drive-through stops.
* bit 5..9: The roadtype.
* bit 16..31: Station ID to join (NEW_STATION if build new one).
+ * @param cmd Unused.
* @see CmdBuildRoadStop
*/
-void CcRoadStop(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
+void CcRoadStop(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;