summaryrefslogtreecommitdiff
path: root/src
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
commitda1743e98062a3b64fa2730727d86a94a6869121 (patch)
tree55c97e1a74b53a5e65a7aef4819fbbc99314b352 /src
parent031565527e7b5f625baaae6e4626bbef0b228aad (diff)
downloadopenttd-da1743e98062a3b64fa2730727d86a94a6869121.tar.xz
(svn r10126) -Fix (r10111, FS#864): old_new_hash cache was not reset when the position hash were
Diffstat (limited to 'src')
-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));
}