From 57a44b42433b59762a591031feddc14ccca73009 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Sat, 14 May 2005 19:25:18 +0000 Subject: (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. --- vehicle.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vehicle.h') 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]; -- cgit v1.2.3-54-g00ecf