summaryrefslogtreecommitdiff
path: root/vehicle.h
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-05-14 19:25:18 +0000
committerDarkvater <Darkvater@openttd.org>2005-05-14 19:25:18 +0000
commit57a44b42433b59762a591031feddc14ccca73009 (patch)
tree6105bafccb126db7c1e070468a8b12c6ea7dbe10 /vehicle.h
parente4eb0c672a9c6f492924a4a0b6b94665826415d6 (diff)
downloadopenttd-57a44b42433b59762a591031feddc14ccca73009.tar.xz
(svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
- CodeChange: move ValParamRailtype() to check rail type from command.h to vehicle.h where it is better suited.
Diffstat (limited to 'vehicle.h')
-rw-r--r--vehicle.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/vehicle.h b/vehicle.h
index f0699b5a6..a760cbf2b 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -420,6 +420,9 @@ static inline Vehicle *GetFirstVehicleFromSharedList(Vehicle *v)
return u;
}
+/* Validate functions for rail building */
+static inline bool ValParamRailtype(uint32 rail) { return rail <= GetPlayer(_current_player)->max_railtype;}
+
// NOSAVE: Can be regenerated by inspecting the vehicles.
VARDEF VehicleID _vehicle_position_hash[0x1000];