diff options
author | frosch <frosch@openttd.org> | 2010-10-25 20:43:36 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-10-25 20:43:36 +0000 |
commit | 8dc7521bf219b85bca668593f0d331a34a4eeeb5 (patch) | |
tree | b1f862a415dd8048b21ac4f9504d4fb7388eb0a4 /src | |
parent | 07093d0a262bc33277d6ab22f0b18bba23d51e28 (diff) | |
download | openttd-8dc7521bf219b85bca668593f0d331a34a4eeeb5.tar.xz |
(svn r21039) -Fix/Cleanup: Remove an unneeded and even wrong test, which is never reached anyway though.
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index f27017a1f..5cb07b6c6 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1581,9 +1581,9 @@ static PaletteID GetEngineColourMap(EngineID engine_type, CompanyID company, Eng /* Check if we should use the colour map callback */ if (HasBit(e->info.callback_mask, CBM_VEHICLE_COLOUR_REMAP)) { uint16 callback = GetVehicleCallback(CBID_VEHICLE_COLOUR_MAPPING, 0, 0, engine_type, v); - /* A return value of 0xC000 is stated to "use the default two-colour - * maps" which happens to be the failure action too... */ - if (callback != CALLBACK_FAILED && callback != 0xC000) { + /* Failure means "use the default two-colour" */ + if (callback != CALLBACK_FAILED) { + assert_compile(PAL_NONE == 0); // Returning 0x4000 (resp. 0xC000) conincidences with default value (PAL_NONE) map = GB(callback, 0, 14); /* If bit 14 is set, then the company colours are applied to the * map else it's returned as-is. */ |