summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 86151e48a..48f16b582 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1398,6 +1398,15 @@ Vehicle *CheckClickOnVehicle(const ViewPort *vp, int x, int y)
return found;
}
+void CheckVehicle32Day(Vehicle *v)
+{
+ if ((v->day_counter & 0x1F) != 0) return;
+
+ 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->colormap = PAL_NONE; // Update colormap via callback 2D
+}
void DecreaseVehicleValue(Vehicle *v)
{