diff Vis.cpp @ 331:72de4ad353c6

Слияние
author Ritor1
date Tue, 19 Feb 2013 22:37:58 +0600
parents 640a176c030f
children d720a13e2273
line wrap: on
line diff
--- a/Vis.cpp	Tue Feb 19 22:37:39 2013 +0600
+++ b/Vis.cpp	Tue Feb 19 22:37:58 2013 +0600
@@ -428,37 +428,34 @@
 //{return DoesRayIntersectBillboard(fDepth, uD3DBillboardIdx);}
 
 //----- (004C1944) --------------------------------------------------------
-int Vis::_4C1944(int object_id, unsigned int a3, int a4, int a5, int a6)
+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
+  //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
+  //__int64 v9; // [sp+2Ch] [bp-Ch]@3
+  //Vis *v14; // [sp+34h] [bp-4h]@1
 
-  v14 = this;
+  //v14 = this;
 
   static Vis_SelectionList Vis_static_sub_4C1944_stru_F8BDE8;
-
+  
+  v8.object_type = VisObjectType_Sprite;
   v8.object_id = object_id;
   v8.field_8 = a6;
   v8.field_C = a5;
   v8.field_10 = a4;
-  v9 = a3;
   Vis_static_sub_4C1944_stru_F8BDE8.uNumPointers = 0;
-  v6 = (double)a3;
-  v8.object_type = VisObjectType_Sprite;
-  PickBillboards_Keyboard(v6, &Vis_static_sub_4C1944_stru_F8BDE8, &v8);
+  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);
-  if ( (signed int)Vis_static_sub_4C1944_stru_F8BDE8.uNumPointers <= 0 )
-    result = -1;
-  else
-    result = Vis_static_sub_4C1944_stru_F8BDE8.object_pointers[0]->sZValue;
-  return result;
+
+  if (!Vis_static_sub_4C1944_stru_F8BDE8.uNumPointers)
+    return -1;
+  return Vis_static_sub_4C1944_stru_F8BDE8.object_pointers[0]->sZValue;
 }
 
 //----- (004C1A02) --------------------------------------------------------