comparison 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
comparison
equal deleted inserted replaced
2255:4c9fef516e0a 2256:27f2a2c2fd8f
1152 1152
1153 bool Party::IsPartyGood() 1153 bool Party::IsPartyGood()
1154 { 1154 {
1155 return _449B57_test_bit(_quest_bits, 99); 1155 return _449B57_test_bit(_quest_bits, 99);
1156 } 1156 }
1157
1158
1159
1160 //----- (0046A89E) --------------------------------------------------------
1161 int Party::_46A89E_immolation_effect(int* affected, int affectedArrSize, int effectRange)
1162 {
1163 int v5; // ebx@3
1164 int v17; // [sp+Ch] [bp-10h]@3
1165 int v18; // [sp+10h] [bp-Ch]@3
1166 int affectedCount; // [sp+18h] [bp-4h]@1
1167
1168 affectedCount = 0;
1169 for ( size_t i = 0; i < uNumActors; ++i )
1170 {
1171 v5 = abs(pActors[i].vPosition.x - this->vPosition.x);
1172 v17 = abs(pActors[i].vPosition.y - this->vPosition.y);
1173 v18 = abs(pActors[i].vPosition.z - this->vPosition.z);
1174 if ( int_get_vector_length(v5, v17, v18) <= effectRange )
1175 {
1176 if ( pActors[i].uAIState != Dead && pActors[i].uAIState != Dying && pActors[i].uAIState != Removed
1177 && pActors[i].uAIState != Disabled && pActors[i].uAIState != Summoned )
1178 {
1179 affected[affectedCount] = i;
1180 affectedCount++;
1181 if ( affectedCount >= affectedArrSize )
1182 break;
1183 }
1184 }
1185 }
1186 return affectedCount;
1187 }