Mercurial > mm7
comparison mm7_3.cpp @ 417:55684f4eda73
Actor::SelectTarget & ai_near_actors_targets_pid
author | Nomad |
---|---|
date | Sat, 23 Feb 2013 19:31:56 +0200 |
parents | d8b3056df4e2 |
children | ad1e9c0bf6da |
comparison
equal
deleted
inserted
replaced
414:d8b3056df4e2 | 417:55684f4eda73 |
---|---|
17689 //unsigned int v15; // edi@67 | 17689 //unsigned int v15; // edi@67 |
17690 //char *v16; // eax@67 | 17690 //char *v16; // eax@67 |
17691 //unsigned int v17; // edx@67 | 17691 //unsigned int v17; // edx@67 |
17692 //unsigned int v18; // ecx@67 | 17692 //unsigned int v18; // ecx@67 |
17693 //unsigned __int16 v19; // ax@72 | 17693 //unsigned __int16 v19; // ax@72 |
17694 int *v20; // esi@80 | 17694 //int *v20; // esi@80 |
17695 Actor *v21; // ebx@80 | 17695 Actor *v21; // ebx@80 |
17696 unsigned __int16 v22; // ax@86 | 17696 unsigned __int16 v22; // ax@86 |
17697 signed int v23; // eax@94 | 17697 signed int v23; // eax@94 |
17698 unsigned int v24; // eax@102 | 17698 unsigned int v24; // eax@102 |
17699 signed int v25; // edi@102 | 17699 signed int v25; // edi@102 |
17846 //do | 17846 //do |
17847 //{ | 17847 //{ |
17848 //pActor = (Actor *)(LODWORD(v80) - 176); | 17848 //pActor = (Actor *)(LODWORD(v80) - 176); |
17849 //v11 = *(unsigned int *)LODWORD(v80); | 17849 //v11 = *(unsigned int *)LODWORD(v80); |
17850 //v49 = *(unsigned int *)LODWORD(v80) == 5; | 17850 //v49 = *(unsigned int *)LODWORD(v80) == 5; |
17851 dword_4F6E08[i] = 4; | 17851 ai_near_actors_targets_pid[i] = OBJECT_Player; |
17852 if (actor->uAIState == Dead || actor->uAIState == Removed || actor->uAIState == Disabled || actor->uAttributes & 0x0400) | 17852 if (actor->uAIState == Dead || actor->uAIState == Removed || actor->uAIState == Disabled || actor->uAttributes & 0x0400) |
17853 continue; | 17853 continue; |
17854 | 17854 |
17855 if (!actor->sCurrentHP && actor->uAIState != Dying) | 17855 if (!actor->sCurrentHP && actor->uAIState != Dying) |
17856 Actor::Die(i); | 17856 Actor::Die(i); |
17935 while ( 1 ) | 17935 while ( 1 ) |
17936 { | 17936 { |
17937 actor_id = ai_near_actors_ids[v78]; | 17937 actor_id = ai_near_actors_ids[v78]; |
17938 assert(actor_id < uNumActors); | 17938 assert(actor_id < uNumActors); |
17939 | 17939 |
17940 v20 = &dword_4F6E08[actor_id]; | 17940 //v20 = &ai_near_actors_targets_pid[actor_id]; |
17941 v21 = &pActors[actor_id]; | 17941 v21 = &pActors[actor_id]; |
17942 Actor::_401221(actor_id, &dword_4F6E08[actor_id], 1u); | 17942 Actor::_SelectTarget(actor_id, &ai_near_actors_targets_pid[actor_id], true); |
17943 if ( v21->pMonsterInfo.uHostilityType && !*v20 ) | 17943 if (v21->pMonsterInfo.uHostilityType && !ai_near_actors_targets_pid[actor_id]) |
17944 v21->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly; | 17944 v21->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly; |
17945 a2 = *v20; | 17945 a2 = ai_near_actors_targets_pid[actor_id]; |
17946 v76 = a2 & 7; | 17946 v76 = a2 & 7; |
17947 if ( (a2 & 7) == OBJECT_Actor) | 17947 if ( (a2 & 7) == OBJECT_Actor) |
17948 v80 = 0.5; | 17948 v80 = 0.5; |
17949 else | 17949 else |
17950 v80 = 1.0; | 17950 v80 = 1.0; |
18694 if ( pActors[v37].CanAct() ) | 18694 if ( pActors[v37].CanAct() ) |
18695 { | 18695 { |
18696 v7 = v6->uAttributes; | 18696 v7 = v6->uAttributes; |
18697 if ( v7 & 0x8000 < 0 ) | 18697 if ( v7 & 0x8000 < 0 ) |
18698 { | 18698 { |
18699 v8 = dword_4F6E08[v5]; | 18699 v8 = ai_near_actors_targets_pid[v5]; |
18700 LOBYTE(v7) = v7 | 0x80; | 18700 LOBYTE(v7) = v7 | 0x80; |
18701 v6->uAttributes = v7; | 18701 v6->uAttributes = v7; |
18702 v33 = 8 * v5 | OBJECT_Actor; | 18702 v33 = 8 * v5 | OBJECT_Actor; |
18703 memcpy(&v31, Actor::GetDirectionInfo(8 * v5 | OBJECT_Actor, v8, &a3, 0), sizeof(v31)); | 18703 memcpy(&v31, Actor::GetDirectionInfo(8 * v5 | OBJECT_Actor, v8, &a3, 0), sizeof(v31)); |
18704 memcpy(&v30, &v31, sizeof(v30)); | 18704 memcpy(&v30, &v31, sizeof(v30)); |