(svn r17292) -Codechange: use unified ToPercent() function to convert fract numbers to percents

This commit is contained in:
smatz
2009-08-27 13:31:26 +00:00
parent 984efae368
commit 100ae8efcc
9 changed files with 58 additions and 36 deletions

View File

@@ -99,7 +99,7 @@
if (!IsValidEngine(engine_id)) return -1;
if (GetVehicleType(engine_id) == AIVehicle::VT_RAIL && IsWagon(engine_id)) return -1;
return (::Engine::Get(engine_id)->reliability * 100 >> 16);
return ::ToPercent16(::Engine::Get(engine_id)->reliability);
}
/* static */ int32 AIEngine::GetMaxSpeed(EngineID engine_id)