Removed the other foreach.

develop
Japa 2016-08-29 22:29:40 +05:30
parent af5d4ec5a8
commit 1862106fd1
1 changed files with 5 additions and 3 deletions

@ -944,13 +944,15 @@ bool IsspatterChanged(DFCoord pos)
uint16_t hash = 0; uint16_t hash = 0;
for each (auto mat in materials) for (int i = 0; i < materials.size(); i++)
{ {
auto mat = materials[i];
hash ^= fletcher16((uint8_t*)mat, sizeof(df::block_square_event_material_spatterst)); hash ^= fletcher16((uint8_t*)mat, sizeof(df::block_square_event_material_spatterst));
} }
for each (auto mat in items) for (int i = 0; i < items.size(); i++)
{ {
hash ^= fletcher16((uint8_t*)mat, sizeof(df::block_square_event_item_spatterst)); auto item = items[i];
hash ^= fletcher16((uint8_t*)item, sizeof(df::block_square_event_item_spatterst));
} }
if (spatterHashes[pos] != hash) if (spatterHashes[pos] != hash)
{ {