summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-06-13 01:38:00 +0000
committerglx <glx@openttd.org>2007-06-13 01:38:00 +0000
commit3de84383147dcf1be2ce071aa4979e64fbfc87e1 (patch)
tree55c97e1a74b53a5e65a7aef4819fbbc99314b352 /src/vehicle.cpp
parent0b90d5319d59bdb88ab21c41321d240200618bc9 (diff)
downloadopenttd-3de84383147dcf1be2ce071aa4979e64fbfc87e1.tar.xz
(svn r10126) -Fix (r10111, FS#864): old_new_hash cache was not reset when the position hash were
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 2d46bdcbb..540ef8c0b 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -540,6 +540,8 @@ static void UpdateVehiclePosHash(Vehicle* v, int x, int y)
void ResetVehiclePosHash()
{
+ Vehicle *v;
+ FOR_ALL_VEHICLES(v) { v->old_new_hash = NULL; }
memset(_vehicle_position_hash, 0, sizeof(_vehicle_position_hash));
memset(_new_vehicle_position_hash, 0, sizeof(_new_vehicle_position_hash));
}