diff options
author | glx22 <glx22@users.noreply.github.com> | 2019-09-07 18:37:01 +0200 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2019-09-07 17:37:01 +0100 |
commit | b3fd7879596defeb6af78acb4ea45e4418821bdf (patch) | |
tree | 08b94b2cd65012e573b0e8c94196daab5aab12ba /src/script/script_storage.hpp | |
parent | 381c2a45875206afe43241d0c76619638cf613fc (diff) | |
download | openttd-b3fd7879596defeb6af78acb4ea45e4418821bdf.tar.xz |
Fix #7188: check the validity of command callback for scripts (#7701)
Diffstat (limited to 'src/script/script_storage.hpp')
-rw-r--r-- | src/script/script_storage.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/script/script_storage.hpp b/src/script/script_storage.hpp index ef7d81ed7..d06cc9efa 100644 --- a/src/script/script_storage.hpp +++ b/src/script/script_storage.hpp @@ -46,6 +46,11 @@ private: uint last_error; ///< The last error of the command. bool last_command_res; ///< The last result of the command. + TileIndex last_tile; ///< The last tile passed to a command. + uint32 last_p1; ///< The last p1 passed to a command. + uint32 last_p2; ///< The last p2 passed to a command. + uint32 last_cmd; ///< The last cmd passed to a command. + VehicleID new_vehicle_id; ///< The ID of the new Vehicle. SignID new_sign_id; ///< The ID of the new Sign. GroupID new_group_id; ///< The ID of the new Group. @@ -73,6 +78,10 @@ public: last_cost (0), last_error (STR_NULL), last_command_res (true), + last_tile (INVALID_TILE), + last_p1 (0), + last_p2 (0), + last_cmd (CMD_END), new_vehicle_id (0), new_sign_id (0), new_group_id (0), |