Changeset - r1235:e5041bfe7f02
[Not reviewed]
master
0 3 0
darkvater - 20 years ago 2005-01-30 18:51:08
darkvater@openttd.org
(svn r1739) - Fix: type checking when selling vehicles (TrueLight)
3 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
aircraft_cmd.c
Show inline comments
 
@@ -364,7 +364,7 @@ int32 CmdSellAircraft(int x, int y, uint
 

	
 
	v = GetVehicle(p1);
 

	
 
	if (!CheckOwnership(v->owner) || !CheckStoppedInHangar(v))
 
	if (v->type != VEH_Aircraft || !CheckOwnership(v->owner) || !CheckStoppedInHangar(v))
 
		return CMD_ERROR;
 

	
 
	if (flags & DC_EXEC) {
ship_cmd.c
Show inline comments
 
@@ -919,7 +919,7 @@ int32 CmdSellShip(int x, int y, uint32 f
 

	
 
	v = GetVehicle(p1);
 

	
 
	if (!CheckOwnership(v->owner))
 
	if (v->type != VEH_Ship || !CheckOwnership(v->owner))
 
		return CMD_ERROR;
 

	
 
	if (!IsShipDepotTile(v->tile) || v->u.road.state != 0x80 || !(v->vehstatus&VS_STOPPED))
train_cmd.c
Show inline comments
 
@@ -873,7 +873,7 @@ int32 CmdSellRailWagon(int x, int y, uin
 

	
 
	v = GetVehicle(p1);
 

	
 
	if (v->type == 0 || !CheckOwnership(v->owner))
 
	if (v->type != VEH_Train || !CheckOwnership(v->owner))
 
		return CMD_ERROR;
 

	
 
	// get first vehicle in chain
0 comments (0 inline, 0 general)