@@ -566,7 +566,8 @@ void daNpc_Moi_c::reset() {
566566 setPos (cStack_30);
567567 mPath .setIdx (iVar8);
568568 mPath .setNextIdx (mPath .getNumPnts ());
569- cStack_30 = mPath .getPntPos (mPath .getIdx ());
569+ u16 path_idx = mPath .getIdx ();
570+ cStack_30 = mPath .getPntPos (path_idx);
570571 cStack_80.y = cLib_targetAngleY (¤t.pos , &cStack_30);
571572 }
572573 field_0x1666 = 1 ;
@@ -1309,10 +1310,8 @@ int daNpc_Moi_c::injuryWalk() {
13091310 mPath .setNextIdx (mPath .getNumPnts ());
13101311 }
13111312
1312- if (mPath .getIdx () > 1 ) {
1313- if (mPath .getIdx () < mPath .getNumPnts () - 2 ) {
1314- cLib_calcTimer (&field_0x164c);
1315- }
1313+ if ((int )mPath .getIdx () > 1 && (int )mPath .getIdx () < mPath .getNumPnts () - 2 ) {
1314+ cLib_calcTimer (&field_0x164c);
13161315 }
13171316 }
13181317
@@ -1359,9 +1358,9 @@ int daNpc_Moi_c::poise() {
13591358 {
13601359 cXyz cStack_74 = getAttnPos (daPy_getPlayerActorClass ());
13611360 int speak_dist = attention_info.distances [fopAc_attn_SPEAK_e];
1362- f32 fVar2 = dComIfGp_getAttention (). getDistTable (speak_dist).mDistMax ;
1363- f32 fVar3 = dComIfGp_getAttention (). getDistTable (speak_dist).mLowerY * -1 .0f ;
1364- f32 fVar4 = dComIfGp_getAttention (). getDistTable (speak_dist).mUpperY * -1 .0f ;
1361+ f32 fVar2 = dComIfGp_getAttention ()-> getDistTable (speak_dist).mDistMax ;
1362+ f32 fVar3 = dComIfGp_getAttention ()-> getDistTable (speak_dist).mLowerY * -1 .0f ;
1363+ f32 fVar4 = dComIfGp_getAttention ()-> getDistTable (speak_dist).mUpperY * -1 .0f ;
13651364 if (chkPointInArea (cStack_74, attention_info.position , fVar2 , fVar3 , fVar4 , 0 ))
13661365 {
13671366 if (field_0x1648 == 0 ) {
@@ -1633,7 +1632,8 @@ int daNpc_Moi_c::cutConversationWithUri(int param_1) {
16331632 setPos (cStack_34);
16341633 mPath .setIdx (0 );
16351634 mPath .setNextIdx (mPath .getNumPnts ());
1636- cStack_34 = mPath .getPntPos (mPath .getIdx ());
1635+ u16 path_idx = mPath .getIdx ();
1636+ cStack_34 = mPath .getPntPos (path_idx);
16371637 setAngle (cLib_targetAngleY (¤t.pos , &cStack_34));
16381638 break ;
16391639 case 2 :
@@ -1694,7 +1694,8 @@ int daNpc_Moi_c::cutFindWolf(int param_1) {
16941694 mPath .offReverse ();
16951695 mPath .setIdx (0 );
16961696 mPath .setNextIdx (mPath .getNumPnts ());
1697- cStack_30 = mPath .getPntPos (mPath .getIdx ());
1697+ u16 path_idx = mPath .getIdx ();
1698+ cStack_30 = mPath .getPntPos (path_idx);
16981699 field_0x1664 = fopAcM_searchPlayerAngleY (this );
16991700 setAngle (field_0x1664);
17001701 mPlayerActorMngr .entry (daPy_getPlayerActorClass ());
0 commit comments