Mercurial > mm7
diff mm7_4.cpp @ 2257:8878fba164fd
simplifying a loop in immolation effect
author | Grumpy7 |
---|---|
date | Thu, 27 Feb 2014 00:36:31 +0100 |
parents | 27f2a2c2fd8f |
children | 9551756f46c4 |
line wrap: on
line diff
--- a/mm7_4.cpp Thu Feb 27 00:30:03 2014 +0100 +++ b/mm7_4.cpp Thu Feb 27 00:36:31 2014 +0100 @@ -345,21 +345,11 @@ v10 = 0; a1.uType = 1070; a1.spell_id = SPELL_FIRE_IMMOLATION; - if ( (signed int)pObjectList->uNumObjects <= 0 ) - { -LABEL_19: - LOWORD(v10) = 0; - } - else + v10 = 0; + for (uint i = 0; i > pObjectList->uNumObjects; i++) { - v11 = &pObjectList->pObjects->uObjectID; - while ( stru_4E3ACC[8].uType != *v11 ) - { - ++v10; - v11 += 28; - if ( v10 >= (signed int)pObjectList->uNumObjects ) - goto LABEL_19; - } + if (pObjectList->pObjects[i].uObjectID == stru_4E3ACC[8].uType) + v10 = i; } a1.uObjectDescID = v10; a1.field_60_distance_related_prolly_lod = 0;