diff Vis.cpp @ 2378:48dbf99c0f7f

spawn_light_elemental cleaned
author Ritor1
date Mon, 09 Jun 2014 16:26:07 +0600
parents 6e3ca612f132
children 56f87a5c402b
line wrap: on
line diff
--- a/Vis.cpp	Mon Jun 02 12:31:28 2014 +0600
+++ b/Vis.cpp	Mon Jun 09 16:26:07 2014 +0600
@@ -411,13 +411,7 @@
 //----- (004C1944) --------------------------------------------------------
 int Vis::PickClosestActor(int object_id, unsigned int pick_depth, int a4, int a5, int a6)
 {
-  //float v6; // ST00_4@3
-  //int result; // eax@4
   Vis_SelectionFilter v8; // [sp+18h] [bp-20h]@3
-  //__int64 v9; // [sp+2Ch] [bp-Ch]@3
-  //Vis *v14; // [sp+34h] [bp-4h]@1
-
-  //v14 = this;
 
   static Vis_SelectionList Vis_static_sub_4C1944_stru_F8BDE8;
   
@@ -429,10 +423,7 @@
   Vis_static_sub_4C1944_stru_F8BDE8.uNumPointers = 0;
   PickBillboards_Keyboard(pick_depth, &Vis_static_sub_4C1944_stru_F8BDE8, &v8);
   Vis_static_sub_4C1944_stru_F8BDE8.create_object_pointers(Vis_SelectionList::Unique);
-  sort_object_pointers(
-    Vis_static_sub_4C1944_stru_F8BDE8.object_pointers,
-    0,
-    Vis_static_sub_4C1944_stru_F8BDE8.uNumPointers - 1);
+  sort_object_pointers(Vis_static_sub_4C1944_stru_F8BDE8.object_pointers, 0, Vis_static_sub_4C1944_stru_F8BDE8.uNumPointers - 1);
 
   if (!Vis_static_sub_4C1944_stru_F8BDE8.uNumPointers)
     return -1;
@@ -1290,12 +1281,12 @@
 {
   //stru157 *v3; // esi@1
   //int result; // eax@1
-  int v5; // edx@2
+  //int v5; // edx@2
   //int v6; // ecx@2
   //char v7; // zf@3
-  int v8; // esi@5
+  //int v8; // esi@5
 //  std::string *v9; // ecx@7
-  Actor *v10; // edi@18
+  //Actor *v10; // edi@18
   //const char *v12; // [sp-20h] [bp-2Ch]@7
 //  int v13; // [sp-1Ch] [bp-28h]@7
   //std::string v14; // [sp-18h] [bp-24h]@7
@@ -1309,21 +1300,21 @@
 
     case VisObjectType_Sprite:
     {
-      v5 = filter->select_flags;
+      //v5 = filter->select_flags;
       int object_idx = PID_ID(pBillboardRenderList[pRenderer->pBillboardRenderListD3D[(int)uD3DBillboardIdx_or_pBLVFace_or_pODMFace].sParentBillboardID].object_pid);
       int object_type = PID_TYPE(pBillboardRenderList[pRenderer->pBillboardRenderListD3D[(int)uD3DBillboardIdx_or_pBLVFace_or_pODMFace].sParentBillboardID].object_pid);
-      if ( v5 & 2 )
+      if ( filter->select_flags & 2 )
       {
         if (object_type == filter->object_id)
           return false;
         return true;
       }
-      if ( v5 & 4 )
+      if ( filter->select_flags & 4 )
       {
-        v8 = filter->object_id;
+        //v8 = filter->object_id;
         if ( object_type != filter->object_id)
           return true;
-        if (v8 != OBJECT_Decoration)
+        if (filter->object_id != OBJECT_Decoration)
         {
           MessageBoxA(nullptr, "Unsupported \"exclusion if no event\" type in CVis::is_part_of_selection", "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Vis.cpp:207", 0);
           return true;
@@ -1340,16 +1331,16 @@
           return true;
         }
 
-        v10 = &pActors[object_idx];
-        int result = 1 << LOBYTE(v10->uAIState);
+        //v10 = &pActors[object_idx];
+        int result = 1 << LOBYTE(pActors[object_idx].uAIState);
         if ( result & filter->no_at_ai_state
             || !(result & filter->at_ai_state)
-            || v5 & 8 && (result = MonsterStats::BelongsToSupertype(v10->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD)) == 0 )
+            || filter->select_flags & 8 && (result = MonsterStats::BelongsToSupertype(pActors[object_idx].pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD)) == 0 )
           return false;
         if ( !(filter->select_flags & 1) )
           return true;
 
-        result = v10->GetActorsRelation(nullptr);
+        result = pActors[object_idx].GetActorsRelation(nullptr);
         if (result == 0)
           return false;
         return true;