changeset 7415:fd7e14cd690d draft

(svn r10808) -Fix (r10353): Make sure spectators can't open infrastructure building menus.
author maedhros <maedhros@openttd.org>
date Mon, 06 Aug 2007 11:58:15 +0000
parents 2496ac7d0086
children 5e887e08fd59
files src/vehicle.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -2554,6 +2554,7 @@
 {
 	assert(IsPlayerBuildableVehicleType(type));
 
+	if (!IsValidPlayer(_current_player)) return false;
 	if (_patches.always_build_infrastructure) return true;
 
 	UnitID max;