Mercurial > mm7
diff mm7_3.cpp @ 130:1c471f3629fb
Party expressions update
author | Nomad |
---|---|
date | Mon, 11 Feb 2013 19:40:49 +0200 |
parents | 48bea61a12a5 |
children | a8ec7e1e18b6 c49af6426e37 |
line wrap: on
line diff
--- a/mm7_3.cpp Mon Feb 11 18:22:21 2013 +0200 +++ b/mm7_3.cpp Mon Feb 11 19:40:49 2013 +0200 @@ -2734,7 +2734,7 @@ do { if ( !(*v41)->HasEnchantedItemEquipped(72) && !(*v41)->WearsItem(529, 8) ) - (*v41)->PlayEmotion(46, 0); + (*v41)->PlayEmotion(CHARACTER_EXPRESSION_46, 0); ++v41; } while ( (signed int)v41 <= (signed int)&pPlayers[4] ); @@ -16307,13 +16307,13 @@ v20 = v19 - 1; if ( !v20 ) { - v23 = v0->evtb; + v23 = v0->_anim_current_time; goto LABEL_63; } v21 = v20 - 1; if ( !v21 ) { - v23 = v0->evtc; + v23 = v0->_anim_end_time; goto LABEL_63; } v22 = v21 - 1; @@ -17231,12 +17231,12 @@ } else { - v33->evtc = v30; + v33->_anim_end_time = v30; } } else { - v33->evtb = v30; + v33->_anim_current_time = v30; } } else @@ -17388,13 +17388,13 @@ LABEL_108: v52 = &pParty->pPlayers[v53]; LABEL_109: - v52->PlayEmotion(v113, v117); + v52->PlayEmotion((CHARACTER_EXPRESSION_ID)v113, v117); goto LABEL_291; } v51 = pParty->pPlayers; do { - v51->PlayEmotion(_evt->v6, 0); + v51->PlayEmotion((CHARACTER_EXPRESSION_ID)_evt->v6, 0); ++v51; } while ( (signed int)v51 < (signed int)pParty->pHirelings ); @@ -19443,25 +19443,17 @@ //----- (0044A56A) -------------------------------------------------------- void __cdecl sub_44A56A() { - signed int v0; // edi@1 - NPCData *v1; // esi@2 - pParty->field_70A = 0; - v0 = 0; - if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) - { - v1 = pNPCStats->pNewNPCData; - do - { - if ( v1->uFlags & 0x80 && (!pParty->pHirelings[0].pName || strcmp(v1->pName, pParty->pHirelings[0].pName)) ) - { - if ( !pParty->pHirelings[1].pName || strcmp(v1->pName, pParty->pHirelings[1].pName) ) - ++pParty->field_70A; - } - ++v0; - ++v1; - } - while ( v0 < (signed int)pNPCStats->uNumNewNPCs ); + + for (int i = 0; i < pNPCStats->uNumNewNPCs; ++i) + { + auto npc = pNPCStats->pNewNPCData + i; + if (npc->uFlags & 0x80 && + (!pParty->pHirelings[0].pName || strcmp(npc->pName, pParty->pHirelings[0].pName))) + { + if (!pParty->pHirelings[1].pName || strcmp(npc->pName, pParty->pHirelings[1].pName)) + ++pParty->field_70A; + } } }