comparison mm7_5.cpp @ 2390:c631b1877204

area_of_effect_damage_evaluate - fixed spells radius problem
author zipi
date Thu, 03 Jul 2014 23:27:27 +0100
parents 4100fb5c4913
children f4af3b203f65
comparison
equal deleted inserted replaced
2389:6a7309a847ea 2390:c631b1877204
112 || pActors[target_id].CanAct() ) 112 || pActors[target_id].CanAct() )
113 { 113 {
114 v15 = pActors[target_id].vPosition.y - AttackerInfo.pYs[attacker_id]; 114 v15 = pActors[target_id].vPosition.y - AttackerInfo.pYs[attacker_id];
115 a1 = pActors[target_id].vPosition.x - AttackerInfo.pXs[attacker_id]; 115 a1 = pActors[target_id].vPosition.x - AttackerInfo.pXs[attacker_id];
116 v44 = pActors[target_id].vPosition.z; 116 v44 = pActors[target_id].vPosition.z;
117 v19 = AttackerInfo.pYs[attacker_id] + pActors[target_id].uActorRadius; 117 v19 = AttackerInfo.field_324[attacker_id] + pActors[target_id].uActorRadius;
118 v48 = v15; 118 v48 = v15;
119 if ( a1 * a1 + v15 * v15 + (pActors[target_id].vPosition.z + (pActors[target_id].uActorHeight >> 1) - AttackerInfo.pZs[attacker_id]) 119 if ( a1 * a1 + v15 * v15 + (pActors[target_id].vPosition.z + (pActors[target_id].uActorHeight >> 1) - AttackerInfo.pZs[attacker_id])
120 * (pActors[target_id].vPosition.z + (pActors[target_id].uActorHeight >> 1) - AttackerInfo.pZs[attacker_id]) < (unsigned int)(v19 * v19) ) 120 * (pActors[target_id].vPosition.z + (pActors[target_id].uActorHeight >> 1) - AttackerInfo.pZs[attacker_id]) < (unsigned int)(v19 * v19) )
121 { 121 {
122 attacker_coord.x = AttackerInfo.pXs[attacker_id]; 122 attacker_coord.x = AttackerInfo.pXs[attacker_id];
165 a1 = pActors[actorID].vPosition.x - AttackerInfo.pXs[attacker_id]; 165 a1 = pActors[actorID].vPosition.x - AttackerInfo.pXs[attacker_id];
166 v31 = pActors[actorID].vPosition.z; 166 v31 = pActors[actorID].vPosition.z;
167 v48 = pActors[actorID].vPosition.y - AttackerInfo.pYs[attacker_id]; 167 v48 = pActors[actorID].vPosition.y - AttackerInfo.pYs[attacker_id];
168 v44 = pActors[actorID].vPosition.z; 168 v44 = pActors[actorID].vPosition.z;
169 v32 = (pActors[actorID].uActorHeight / 2) - AttackerInfo.pZs[attacker_id]; 169 v32 = (pActors[actorID].uActorHeight / 2) - AttackerInfo.pZs[attacker_id];
170 v33 = pActors[actorID].uActorRadius + AttackerInfo.pYs[attacker_id]; 170 v33 = pActors[actorID].uActorRadius + AttackerInfo.field_324[attacker_id];
171 if ( a1 * a1 + v48 * v48 + (v31 + v32) * (v31 + v32) < (unsigned int)(v33 * v33) ) 171 if ( a1 * a1 + v48 * v48 + (v31 + v32) * (v31 + v32) < (unsigned int)(v33 * v33) )
172 { 172 {
173 attacker_coord.x = AttackerInfo.pXs[attacker_id]; 173 attacker_coord.x = AttackerInfo.pXs[attacker_id];
174 attacker_coord.y = AttackerInfo.pYs[attacker_id]; 174 attacker_coord.y = AttackerInfo.pYs[attacker_id];
175 attacker_coord.z = AttackerInfo.pZs[attacker_id]; 175 attacker_coord.z = AttackerInfo.pZs[attacker_id];