Mercurial > mm7
diff Party.cpp @ 2256:27f2a2c2fd8f
_46A89E_immolation_effect moved into Party
author | Grumpy7 |
---|---|
date | Thu, 27 Feb 2014 00:30:03 +0100 |
parents | aff7a7b072b7 |
children | d6887ee81068 |
line wrap: on
line diff
--- a/Party.cpp Thu Feb 27 00:27:58 2014 +0100 +++ b/Party.cpp Thu Feb 27 00:30:03 2014 +0100 @@ -1153,4 +1153,35 @@ bool Party::IsPartyGood() { return _449B57_test_bit(_quest_bits, 99); +} + + + +//----- (0046A89E) -------------------------------------------------------- +int Party::_46A89E_immolation_effect(int* affected, int affectedArrSize, int effectRange) +{ + int v5; // ebx@3 + int v17; // [sp+Ch] [bp-10h]@3 + int v18; // [sp+10h] [bp-Ch]@3 + int affectedCount; // [sp+18h] [bp-4h]@1 + + affectedCount = 0; + for ( size_t i = 0; i < uNumActors; ++i ) + { + v5 = abs(pActors[i].vPosition.x - this->vPosition.x); + v17 = abs(pActors[i].vPosition.y - this->vPosition.y); + v18 = abs(pActors[i].vPosition.z - this->vPosition.z); + if ( int_get_vector_length(v5, v17, v18) <= effectRange ) + { + if ( pActors[i].uAIState != Dead && pActors[i].uAIState != Dying && pActors[i].uAIState != Removed + && pActors[i].uAIState != Disabled && pActors[i].uAIState != Summoned ) + { + affected[affectedCount] = i; + affectedCount++; + if ( affectedCount >= affectedArrSize ) + break; + } + } + } + return affectedCount; } \ No newline at end of file