Changeset - r1185:a37b0493cf5e
[Not reviewed]
master
0 1 0
bjarni - 19 years ago 2005-01-26 19:03:01
bjarni@openttd.org
(svn r1687) - Feature: [autoreplace] server now checks for plane<->helicopter replacement and reject replacement if needed
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
vehicle.c
Show inline comments
 
@@ -1351,6 +1351,9 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
	// check that it's the vehicle's owner that requested the replace
 
	if (!CheckOwnership(v->owner)) return CMD_ERROR;
 

	
 
	// makes sure that we do not replace a plane with a helicopter or vise versa
 
	if (HASBIT(AircraftVehInfo(old_engine_type)->subtype, 0) != HASBIT(AircraftVehInfo(new_engine_type)->subtype, 0)) return CMD_ERROR;
 

	
 

	
 
	switch (v->type) {
 
		case VEH_Train:    build_cost = EstimateTrainCost(RailVehInfo(new_engine_type)); break;
0 comments (0 inline, 0 general)