(svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code.

This commit is contained in:
frosch
2011-11-01 00:23:41 +00:00
parent 72cd855978
commit acc3c75951
17 changed files with 84 additions and 64 deletions

View File

@@ -59,7 +59,7 @@ uint GetNumSounds()
*/
bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event)
{
const GRFFile *file = GetEngineGRF(v->engine_type);
const GRFFile *file = v->GetGRF();
uint16 callback;
/* If the engine has no GRF ID associated it can't ever play any new sounds */