diff Indoor.cpp @ 872:2db21a810d48

Merge
author Nomad
date Mon, 01 Apr 2013 13:39:39 +0200
parents 710cf848ad24 f4394e320312
children 0d96349d8c87
line wrap: on
line diff
--- a/Indoor.cpp	Mon Apr 01 13:39:19 2013 +0200
+++ b/Indoor.cpp	Mon Apr 01 13:39:39 2013 +0200
@@ -3478,15 +3478,15 @@
             //v66 = 0;
             //v65 = 0;
             //v64 = 0;
-            //v7 = 8 * i | OBJECT_BLVDoor;
+            //v7 = PID(OBJECT_BLVDoor,i);
             //v63 = 0;
             //v62 = -1;
-            //LOBYTE(v7) = 8 * i | OBJECT_BLVDoor;
+            //LOBYTE(v7) = PID(OBJECT_BLVDoor,i);
             //v61 = 0;
-            //v60 = 8 * i | OBJECT_BLVDoor;
+            //v60 = PID(OBJECT_BLVDoor,i);
             //v59 = (SoundID)((int)eDoorSoundID + 1);
 //LABEL_17:
-            pAudioPlayer->PlaySound((SoundID)((int)eDoorSoundID + 1), 8 * i | OBJECT_BLVDoor, 0, -1, 0, 0, 0, 0);
+            pAudioPlayer->PlaySound((SoundID)((int)eDoorSoundID + 1), PID(OBJECT_BLVDoor,i), 0, -1, 0, 0, 0, 0);
             //goto LABEL_18;
           }
           goto LABEL_18;
@@ -3509,14 +3509,14 @@
         //v66 = 0;
         //v65 = 0;
         //v64 = 0;
-        //v8 = 8 * i | OBJECT_BLVDoor;
+        //v8 = PID(OBJECT_BLVDoor,i);
         //v63 = 0;
         //v62 = -1;
         //LOBYTE(v8) = 8 * v1 | 1;
         //v61 = 1;
-        //v60 = 8 * i | OBJECT_BLVDoor;
+        //v60 = PID(OBJECT_BLVDoor,i);
         //v59 = eDoorSoundID;
-        pAudioPlayer->PlaySound(eDoorSoundID, 8 * i | OBJECT_BLVDoor, 1, -1, 0, 0, 0, 0);
+        pAudioPlayer->PlaySound(eDoorSoundID, PID(OBJECT_BLVDoor,i), 1, -1, 0, 0, 0, 0);
         //goto LABEL_18;
       }
 LABEL_18:
@@ -3999,7 +3999,7 @@
       {
         v58 = v22;
         v24 = 8 * v63;
-        LOBYTE(v24) = 8 * v63 | 3;
+        LOBYTE(v24) = PID(OBJECT_Actor,v63);
         v61 = v22;
         _this = v24;
         do
@@ -4082,12 +4082,12 @@
             v0->vPosition.z += (unsigned int)(stru_721530.field_7C * stru_721530.field_58.z) >> 16;
             v0->uSectorID = LOWORD(stru_721530.uSectorID);
             stru_721530.field_70 += stru_721530.field_7C;
-            v37 = v36 >> 3;
-            if ( (v36 & 7) != OBJECT_Actor)
+            v37 = PID_ID(v36);
+            if ( PID_TYPE(v36) != OBJECT_Actor)
             {
-              if ( (v36 & 7) != OBJECT_Player)
+              if ( PID_TYPE(v36) != OBJECT_Player)
               {
-                if ( (v36 & 7) == OBJECT_Decoration)
+                if ( PID_TYPE(v36) == OBJECT_Decoration)
                 {
                   _this = integer_sqrt(v0->vVelocity.x * v0->vVelocity.x + v0->vVelocity.y * v0->vVelocity.y);
                   v45 = stru_5C6E00->Atan2(
@@ -4104,7 +4104,7 @@
                   v0->vVelocity.y = WORD1(v48);
                   goto LABEL_119;
                 }
-                if ( (v36 & 7) == OBJECT_BModel)
+                if ( PID_TYPE(v36) == OBJECT_BModel)
                 {
                   stru_721530.field_84 = v36 >> 3;
                   v38 = &pIndoor->pFaces[v37];
@@ -4207,7 +4207,7 @@
                 if ( !pActors[v37].pMonsterInfo.uHostilityType )
                   goto LABEL_118;
 LABEL_114:
-                Actor::_402968(v63, v36, v22, (AIDirection *)v22);
+                Actor::Flee(v63, v36, v22, (AIDirection *)v22);
                 goto LABEL_119;
               }
             }