Mercurial > mm7
changeset 1896:b6a7410ff0ef
renaming dword_4DF380 to dword_4DF380_hostilityRanges, moved it to actor.cpp
author | Grumpy7 |
---|---|
date | Sun, 20 Oct 2013 02:52:48 -0700 |
parents | 6b4e14436ee8 |
children | 436553b0603c |
files | Actor.cpp mm7_6.cpp mm7_data.cpp mm7_data.h |
diffstat | 4 files changed, 16 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/Actor.cpp Sun Oct 20 02:48:35 2013 -0700 +++ b/Actor.cpp Sun Oct 20 02:52:48 2013 -0700 @@ -44,6 +44,7 @@ stru319 stru_50C198; // idb +std::array<uint, 5> dword_4DF380_hostilityRanges = {0,1024,2560,5120,10240}; //----- (0041AF52) -------------------------------------------------------- @@ -2413,7 +2414,7 @@ } if ( thisActor->pMonsterInfo.uHostilityType ) v10 = pMonsterStats->pInfos[thisActor->pMonsterInfo.uID].uHostilityType; - v11 = dword_4DF380[v10]; + v11 = dword_4DF380_hostilityRanges[v10]; v23 = abs(thisActor->vPosition.x - actor->vPosition.x); v27 = abs(thisActor->vPosition.y - actor->vPosition.y); v12 = abs(thisActor->vPosition.z - actor->vPosition.z); @@ -2445,9 +2446,9 @@ if ( v14 != 0 ) { if ( !thisActor->pMonsterInfo.uHostilityType ) - v15 = dword_4DF380[v14]; + v15 = dword_4DF380_hostilityRanges[v14]; else - v15 = dword_4DF380[4]; + v15 = dword_4DF380_hostilityRanges[4]; v16 = abs(thisActor->vPosition.x - pParty->vPosition.x); v28 = abs(thisActor->vPosition.y - pParty->vPosition.y); v17 = abs(thisActor->vPosition.z - pParty->vPosition.z); @@ -2684,8 +2685,8 @@ //----- (0044FD29) -------------------------------------------------------- void Actor::SummonMinion( int summonerId ) { - unsigned __int8 v3; // al@1 - int v4; // esi@1 + unsigned __int8 extraSummonLevel; // al@1 + int summonMonsterBaseType; // esi@1 int v5; // edx@2 int v7; // edi@10 Actor *v8; // esi@10 @@ -2728,24 +2729,24 @@ return; } - v3 = this->pMonsterInfo.uSpecialAbilityDamageDiceRolls; - v4 = this->pMonsterInfo.field_3C_some_special_attack; - if ( v3 ) + extraSummonLevel = this->pMonsterInfo.uSpecialAbilityDamageDiceRolls; + summonMonsterBaseType = this->pMonsterInfo.field_3C_some_special_attack; + if ( extraSummonLevel ) { - if ( v3 >= 1u && v3 <= 3u ) - v4 = v4 + v3 - 1; + if ( extraSummonLevel >= 1u && extraSummonLevel <= 3u ) + summonMonsterBaseType = summonMonsterBaseType + extraSummonLevel - 1; } else { v5 = rand() % 100; if ( v5 >= 90 ) - v4 += 2; + summonMonsterBaseType += 2; else if ( v5 >= 60 ) { - v4 += 1; + summonMonsterBaseType += 1; } } - v7 = v4 - 1; + v7 = summonMonsterBaseType - 1; v8 = &pActors[uNumActors]; v9 = &pMonsterStats->pInfos[v7 + 1]; pActors[uNumActors].Reset(); @@ -2753,7 +2754,7 @@ strcpy(v8->pActorName, v9->pName); v8->sCurrentHP = LOWORD(v9->uHP); memcpy(&v8->pMonsterInfo, v9, sizeof(v8->pMonsterInfo)); - v8->word_000086_some_monster_id = v4; + v8->word_000086_some_monster_id = summonMonsterBaseType; v8->uActorRadius = v10->uMonsterRadius; v8->uActorHeight = v10->uMonsterHeight; v8->pMonsterInfo.uTreasureDiceRolls = 0;
--- a/mm7_6.cpp Sun Oct 20 02:48:35 2013 -0700 +++ b/mm7_6.cpp Sun Oct 20 02:52:48 2013 -0700 @@ -399,7 +399,7 @@ if ( pActor->pMonsterInfo.uSpecialAbilityType == 2 && pActor->pMonsterInfo.uSpecialAbilityDamageDiceBonus < 3u && rand() % 100 < 5 ) - pActor->_44FD29(a2); + pActor->SummonMinion(a2); v4 = v3->_427102(pActor, pActor->pMonsterInfo.uSpell1ID); v5 = v3->_427102(pActor, pActor->pMonsterInfo.uSpell2ID); if ( v4 && pActor->pMonsterInfo.uSpell1UseChance && rand() % 100 < pActor->pMonsterInfo.uSpell1UseChance )
--- a/mm7_data.cpp Sun Oct 20 02:48:35 2013 -0700 +++ b/mm7_data.cpp Sun Oct 20 02:52:48 2013 -0700 @@ -348,7 +348,6 @@ int (__stdcall *off_4DAFDC)(char); // weak char asc_4DB724[777]; // idb int dword_4DBD94; // weak -std::array<uint, 5> dword_4DF380 = {{0,1024,2560,5120,10240}}; // weak //int dword_4DF390; // weak char Str2[777]; // idb
--- a/mm7_data.h Sun Oct 20 02:48:35 2013 -0700 +++ b/mm7_data.h Sun Oct 20 02:52:48 2013 -0700 @@ -307,7 +307,6 @@ extern int (__stdcall *off_4DAFDC)(char); // weak extern char asc_4DB724[]; // idb extern int dword_4DBD94; // weak -extern std::array<uint, 5> dword_4DF380; // weak extern int dword_4DF390; // weak extern char Str2[]; // idb