vehicle.h
changeset 1330 8a67d04016ce
parent 1313 bba6afb8a995
child 1359 8ba976aed634
--- a/vehicle.h	Sun Feb 06 22:25:27 2005 +0000
+++ b/vehicle.h	Sun Feb 06 22:36:08 2005 +0000
@@ -372,6 +372,14 @@
 #define FOR_ALL_VEHICLES(v) FOR_ALL_VEHICLES_FROM(v, 0)
 
 /**
+ * Check if a Vehicle really exists.
+ */
+static inline bool IsValidVehicle(Vehicle* v)
+{
+	return v->type != 0;
+}
+
+/**
  * Check if an index is a vehicle-index (so between 0 and max-vehicles)
  *
  * @return Returns true if the vehicle-id is in range