File diff r2497:4f8fde59a2e8 → r2498:8dfa040ed505
vehicle.c
Show inline comments
 
@@ -331,13 +331,13 @@ void UpdateVehiclePosHash(Vehicle *v, in
 
	if (old_hash == new_hash)
 
		return;
 

	
 
	/* remove from hash table? */
 
	if (old_hash != NULL) {
 
		Vehicle *last = NULL;
 
		int idx = *old_hash;
 
		VehicleID idx = *old_hash;
 
		while ((u = GetVehicle(idx)) != v) {
 
			idx = u->next_hash;
 
			assert(idx != INVALID_VEHICLE);
 
			last = u;
 
		}
 

	
 
@@ -1455,13 +1455,13 @@ int32 ReplaceVehicle(Vehicle *v)
 
	}
 

	
 
	/* Check if there is money for the upgrade.. if not, give a nice news-item
 
	    (that is needed, because this CMD is called automaticly) */
 
	if ( p->money64 < (int32)(p->engine_renew_money + build_cost + rear_engine_cost - v->value)) {
 
		if (( _local_player == v->owner ) && ( v->unitnumber != 0 )) {  //v->unitnumber = 0 for train cars
 
			int message;
 
			StringID message;
 
			SetDParam(0, v->unitnumber);
 
			switch (v->type) {
 
				case VEH_Train:    message = STR_TRAIN_AUTORENEW_FAILED;       break;
 
				case VEH_Road:     message = STR_ROADVEHICLE_AUTORENEW_FAILED; break;
 
				case VEH_Ship:     message = STR_SHIP_AUTORENEW_FAILED;        break;
 
				case VEH_Aircraft: message = STR_AIRCRAFT_AUTORENEW_FAILED;    break;