File diff r542:6d2403a77bf9 → r543:efdb197f91ad
engine.c
Show inline comments
 
@@ -774,25 +774,25 @@ void EnginesMonthlyLoop()
 
				if(!isWagon(e - _engines))
 
					e->preview_player = 1; // Give to the player with the highest rating.
 
			}
 
		}
 
	}
 
	AdjustAvailAircraft();
 
}
 

	
 
int32 CmdRenameEngine(int x, int y, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	StringID str;
 

	
 
	str = AllocateName((byte*)_decode_parameters, 0);
 
	str = AllocateNameUnique((byte*)_decode_parameters, 0);
 
	if (str == 0)
 
		return CMD_ERROR;
 

	
 
	if (flags & DC_EXEC) {
 
		StringID old_str = _engine_name_strings[p1];
 
		_engine_name_strings[p1] = str;
 
		DeleteName(old_str);
 
		_vehicle_design_names |= 3;
 
		MarkWholeScreenDirty();
 
	} else {
 
		DeleteName(str);
 
	}