diff options
author | smatz <smatz@openttd.org> | 2009-08-06 17:35:20 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-08-06 17:35:20 +0000 |
commit | 50d03a87511183edc614cbaad14a297949e87e71 (patch) | |
tree | 07f64fac40bcfaf499386c6b722d930d8e5e2755 /src | |
parent | 23fd4bedd8fa426ac90e76326a70440216258876 (diff) | |
download | openttd-50d03a87511183edc614cbaad14a297949e87e71.tar.xz |
(svn r17091) -Fix (r17089)(r17090): regression test was right
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicle.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index b00e4bb88..4943e6902 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -576,9 +576,10 @@ static void RunVehicleDayProc() /* Call the 32-day callback if needed */ if ((v->day_counter & 0x1F) == 0) { uint16 callback = GetVehicleCallback(CBID_VEHICLE_32DAY_CALLBACK, 0, 0, v->engine_type, v); - if (callback == CALLBACK_FAILED) return; - if (HasBit(callback, 0)) TriggerVehicle(v, VEHICLE_TRIGGER_CALLBACK_32); // Trigger vehicle trigger 10 - if (HasBit(callback, 1)) v->colourmap = PAL_NONE; + if (callback != CALLBACK_FAILED) { + if (HasBit(callback, 0)) TriggerVehicle(v, VEHICLE_TRIGGER_CALLBACK_32); // Trigger vehicle trigger 10 + if (HasBit(callback, 1)) v->colourmap = PAL_NONE; + } } /* This is called once per day for each vehicle, but not in the first tick of the day */ |