(svn r10734) -Fix [FS#1030]: Revert r10513) and add special cases for collision detection on bridges/tunnels.

This commit is contained in:
peter1138
2007-07-30 08:49:41 +00:00
parent 7fb3f54584
commit 92061aba4e
3 changed files with 15 additions and 9 deletions

View File

@@ -471,8 +471,8 @@ static void UpdateNewVehiclePosHash(Vehicle *v, bool remove)
if (remove) {
new_hash = NULL;
} else {
int x = GB(v->x_pos / TILE_SIZE, HASH_RES, HASH_BITS);
int y = GB(v->y_pos / TILE_SIZE, HASH_RES, HASH_BITS) << HASH_BITS;
int x = GB(TileX(v->tile), HASH_RES, HASH_BITS);
int y = GB(TileY(v->tile), HASH_RES, HASH_BITS) << HASH_BITS;
new_hash = &_new_vehicle_position_hash[(x + y) & TOTAL_HASH_MASK];
}