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
commit2bf3d14dfca00d62469b115428cdb26e7540fc9c (patch)
tree6105bafccb126db7c1e070468a8b12c6ea7dbe10 /vehicle.h
parentfbb794d450bd900a9a0b3326f20daa931781261f (diff)
downloadopenttd-2bf3d14dfca00d62469b115428cdb26e7540fc9c.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];