diff mm7_5.cpp @ 849:8fafe3645f36

* PID replaces * Actor::GetDirectionInfo cleaning
author zipi
date Sun, 31 Mar 2013 11:46:28 +0100
parents ceef50611567
children 8fc2f035abc0
line wrap: on
line diff
--- a/mm7_5.cpp	Sun Mar 31 10:44:43 2013 +0100
+++ b/mm7_5.cpp	Sun Mar 31 11:46:28 2013 +0100
@@ -5321,7 +5321,7 @@
     }
     v17 = (SoundID)a4;
 LABEL_26:
-    pAudioPlayer->PlaySound(v17, (8 * a4 + 80) | 4, 0, -1, 0, 0, 0, 0);
+    pAudioPlayer->PlaySound(v17, PID(a4 + 80,OBJECT_Player), 0, -1, 0, 0, 0, 0);
     v18 = Actor::_43B3E0_CalcDamage(v7, v74);
     v19 = HIDWORD(v7->pActorBuffs[3].uExpireTime) == 0;
     v20 = SHIDWORD(v7->pActorBuffs[3].uExpireTime) < 0;
@@ -6779,7 +6779,7 @@
     {
       *(int *)v4 = 100;
       v6 = 8 * v19;
-      LOBYTE(v6) = 8 * v19 | 4;
+      LOBYTE(v6) = PID(v19,OBJECT_Player);
       *((int *)v4 + 2) = v2;
       *((int *)v4 - 1) = v6;
       *((int *)v4 + 1) = v2;
@@ -6815,7 +6815,7 @@
         v9 = ai_near_actors_ids[v20];
         *(int *)v7 = 1;
         *((int *)v7 + 2) = v2;
-        *((int *)v7 - 1) = 8 * v9 | 3;
+        *((int *)v7 - 1) = PID(v9,OBJECT_Actor);
         *((int *)v7 + 1) = v2;
         ++v3;
         v7 += 16;
@@ -7409,7 +7409,7 @@
         if ( v5->pMonsterInfo.uHostilityType && !*v6 )
           v5->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
         v22 = *v6;
-        v7 = Actor::GetDirectionInfo(8 * (int)v4 | 3, *v6, &a3, 0);
+        v7 = Actor::GetDirectionInfo(PID((int)v4,OBJECT_Actor), *v6, &a3, 0);
         v8 = v5->uActorRadius;
         memcpy(&a3, v7, sizeof(a3));
         memcpy(&v18, &a3, sizeof(v18));