Mercurial > mm7
comparison mm7_5.cpp @ 413:111f25d1cc04
AI_Stand
author | Nomad |
---|---|
date | Sat, 23 Feb 2013 16:39:32 +0200 |
parents | c0700eaabeb8 |
children | d8b3056df4e2 |
comparison
equal
deleted
inserted
replaced
412:bbd8888534dc | 413:111f25d1cc04 |
---|---|
10102 Actor::_402F87(v4, a2a, &a4); | 10102 Actor::_402F87(v4, a2a, &a4); |
10103 return; | 10103 return; |
10104 } | 10104 } |
10105 v21 = 64; | 10105 v21 = 64; |
10106 LABEL_26: | 10106 LABEL_26: |
10107 Actor::_403EB6(v15, v16, v21, v23); | 10107 Actor::AI_Stand(v15, v16, v21, v23); |
10108 return; | 10108 return; |
10109 } | 10109 } |
10110 LABEL_21: | 10110 LABEL_21: |
10111 v5->uCurrentActionTime = 0; | 10111 v5->uCurrentActionTime = 0; |
10112 v5->uCurrentActionLength = 0; | 10112 v5->uCurrentActionLength = 0; |
10298 v3 = v21; | 10298 v3 = v21; |
10299 v21->field_C = 3; | 10299 v21->field_C = 3; |
10300 goto LABEL_48; | 10300 goto LABEL_48; |
10301 } | 10301 } |
10302 LABEL_47: | 10302 LABEL_47: |
10303 Actor::_403EB6(v13, v22, 0x40u, &v18); | 10303 Actor::AI_Stand(v13, v22, 0x40u, &v18); |
10304 v3 = v21; | 10304 v3 = v21; |
10305 v21->field_C = 0; | 10305 v21->field_C = 0; |
10306 goto LABEL_48; | 10306 goto LABEL_48; |
10307 } | 10307 } |
10308 } | 10308 } |
10341 if ( (v10->uPackedID & 7) == OBJECT_Actor) | 10341 if ( (v10->uPackedID & 7) == OBJECT_Actor) |
10342 { | 10342 { |
10343 v8 = dword_4F6E08[v5 >> 3]; | 10343 v8 = dword_4F6E08[v5 >> 3]; |
10344 memcpy(&v7, Actor::GetDirectionInfo(v5, v8, &a3, v2), sizeof(v7)); | 10344 memcpy(&v7, Actor::GetDirectionInfo(v5, v8, &a3, v2), sizeof(v7)); |
10345 if ( !v1->_406D10(a2) ) | 10345 if ( !v1->_406D10(a2) ) |
10346 Actor::_403EB6(v10->uPackedID >> 3, v8, 0x20u, &v7); | 10346 Actor::AI_Stand(v10->uPackedID >> 3, v8, 0x20u, &v7); |
10347 } | 10347 } |
10348 ++a2; | 10348 ++a2; |
10349 ++v10; | 10349 ++v10; |
10350 if ( a2 >= v1->uActorQueueSize ) | 10350 if ( a2 >= v1->uActorQueueSize ) |
10351 break; | 10351 break; |
10384 if ( pActors[v3].CanAct() ) | 10384 if ( pActors[v3].CanAct() ) |
10385 { | 10385 { |
10386 v4 = v2->uPackedID; | 10386 v4 = v2->uPackedID; |
10387 v9 = dword_4F6E08[v3]; | 10387 v9 = dword_4F6E08[v3]; |
10388 memcpy(&v6, Actor::GetDirectionInfo(v4, v9, &a3, 0), sizeof(v6)); | 10388 memcpy(&v6, Actor::GetDirectionInfo(v4, v9, &a3, 0), sizeof(v6)); |
10389 Actor::_403EB6(v8, v9, 0x20u, &v6); | 10389 Actor::AI_Stand(v8, v9, 0x20u, &v6); |
10390 v2->field_C = 0; | 10390 v2->field_C = 0; |
10391 v2->uActionLength = 0; | 10391 v2->uActionLength = 0; |
10392 v1 = v7; | 10392 v1 = v7; |
10393 } | 10393 } |
10394 } | 10394 } |
10465 v6->uAIState = Dead; | 10465 v6->uAIState = Dead; |
10466 v6->UpdateAnimation(); | 10466 v6->UpdateAnimation(); |
10467 } | 10467 } |
10468 if ( !thisa->_406D10(a2) ) | 10468 if ( !thisa->_406D10(a2) ) |
10469 LABEL_26: | 10469 LABEL_26: |
10470 Actor::_403EB6(v12, v13, 0x20u, &v9); | 10470 Actor::AI_Stand(v12, v13, 0x20u, &v9); |
10471 } | 10471 } |
10472 } | 10472 } |
10473 } | 10473 } |
10474 ++a2; | 10474 ++a2; |
10475 result = (signed int)thisa; | 10475 result = (signed int)thisa; |
10607 v15 = a2a; | 10607 v15 = a2a; |
10608 v23 = 0; | 10608 v23 = 0; |
10609 v21 = 32; | 10609 v21 = 32; |
10610 if ( v4->pMonsterInfo.uMovementType == 5 ) | 10610 if ( v4->pMonsterInfo.uMovementType == 5 ) |
10611 { | 10611 { |
10612 Actor::_403EB6(uActorID, a2a, 0x20u, 0); | 10612 Actor::AI_Stand(uActorID, a2a, 0x20u, 0); |
10613 goto LABEL_25; | 10613 goto LABEL_25; |
10614 } | 10614 } |
10615 LABEL_24: | 10615 LABEL_24: |
10616 Actor::_402968(v16, v15, v21, v23); | 10616 Actor::_402968(v16, v15, v21, v23); |
10617 LABEL_25: | 10617 LABEL_25: |
10666 Actor::_4032B2(uActorID, a2a, 10240, 32); | 10666 Actor::_4032B2(uActorID, a2a, 10240, 32); |
10667 goto LABEL_53; | 10667 goto LABEL_53; |
10668 } | 10668 } |
10669 if ( v4->pMonsterInfo.uMovementType == 5 ) | 10669 if ( v4->pMonsterInfo.uMovementType == 5 ) |
10670 { | 10670 { |
10671 Actor::_403EB6(uActorID, a2a, 0x20u, 0); | 10671 Actor::AI_Stand(uActorID, a2a, 0x20u, 0); |
10672 LABEL_53: | 10672 LABEL_53: |
10673 v17 = v29; | 10673 v17 = v29; |
10674 v29->field_C = 2; | 10674 v29->field_C = 2; |
10675 goto LABEL_60; | 10675 goto LABEL_60; |
10676 } | 10676 } |
10740 v5->uAIState = Dead; | 10740 v5->uAIState = Dead; |
10741 v5->UpdateAnimation(); | 10741 v5->UpdateAnimation(); |
10742 return; | 10742 return; |
10743 } | 10743 } |
10744 if ( rand() % 2 ) | 10744 if ( rand() % 2 ) |
10745 Actor::_403EB6(uActorID, a2, 0x40u, &a4); | 10745 Actor::AI_Stand(uActorID, a2, 0x40u, &a4); |
10746 else | 10746 else |
10747 Actor::_402F87(uActorID, a2, &a4); | 10747 Actor::_402F87(uActorID, a2, &a4); |
10748 } | 10748 } |
10749 } | 10749 } |
10750 } | 10750 } |
12096 v6 = 1; | 12096 v6 = 1; |
12097 if (_449B57_test_bit(pParty->_award_bits, 99)) | 12097 if (_449B57_test_bit(pParty->_award_bits, 99)) |
12098 v7 = 1; | 12098 v7 = 1; |
12099 if (_449B57_test_bit(pParty->_award_bits, 100)) | 12099 if (_449B57_test_bit(pParty->_award_bits, 100)) |
12100 v5 = 1; | 12100 v5 = 1; |
12101 | |
12102 Log::Warning(L"%S %S %u", __FILE__, __FUNCTION__, __LINE__); // dword_4F6E08[i] for AI_Stand seems always 0; original code behaviour is identical | |
12101 for (uint i = 0; i < uNumActors; ++i) | 12103 for (uint i = 0; i < uNumActors; ++i) |
12102 { | 12104 { |
12103 auto actor = pActors + i; | 12105 auto actor = pActors + i; |
12104 | 12106 |
12105 if (actor->CanAct() || actor->uAIState == Disabled) | 12107 if (actor->CanAct() || actor->uAIState == Disabled) |
12107 actor->vPosition.x = actor->vInitialPosition.x; | 12109 actor->vPosition.x = actor->vInitialPosition.x; |
12108 actor->vPosition.y = actor->vInitialPosition.y; | 12110 actor->vPosition.y = actor->vInitialPosition.y; |
12109 actor->vPosition.z = actor->vInitialPosition.z; | 12111 actor->vPosition.z = actor->vInitialPosition.z; |
12110 actor->sCurrentHP = actor->pMonsterInfo.uHP; | 12112 actor->sCurrentHP = actor->pMonsterInfo.uHP; |
12111 if (actor->uAIState != Disabled) | 12113 if (actor->uAIState != Disabled) |
12112 Actor::_403EB6(i, dword_4F6E08[i], actor->pMonsterInfo.uRecoveryTime, 0); | 12114 { |
12115 Actor::AI_Stand(i, dword_4F6E08[i], actor->pMonsterInfo.uRecoveryTime, 0); | |
12116 } | |
12113 } | 12117 } |
12114 | 12118 |
12115 actor->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly; | 12119 actor->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly; |
12116 | 12120 |
12117 if (!v8 || v7) | 12121 if (!v8 || v7) |