dmitrysenkovich

Untitled

Aug 22nd, 2014
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: Header/Avionics/Sensors/avSimpleRadar.h
  2. ===================================================================
  3. --- Header/Avionics/Sensors/avSimpleRadar.h (revision 91480)
  4. +++ Header/Avionics/Sensors/avSimpleRadar.h (working copy)
  5. @@ -9,6 +9,7 @@
  6.  #include "Utilities/ccTriggerSystem.h"
  7.  #include "Utilities/ccUtilities.h"
  8.  #include "Avionics/avSimpleElectricSystem.h"
  9. +#include "edTerrain/PointOnSurfaceAdapter.h"
  10.  
  11.  class woSpot;
  12.  
  13. @@ -137,8 +138,13 @@
  14.  protected:
  15.     radar_capabilities         basic_capabilities;             
  16.  
  17. +#ifndef USE_TERRAIN4
  18.     landscape::lPointOnSurface surf_info;
  19.     landscape::lPointOnSurface surf_info_2;
  20. +#else
  21. +   edterrain::PointOnSurfaceAdapter surf_info;
  22. +   edterrain::PointOnSurfaceAdapter surf_info_2;
  23. +#endif
  24.  
  25.     woSpot              *spot;
  26.  
  27. Index: Header/Avionics/Sensors/avTVSensor.h
  28. ===================================================================
  29. --- Header/Avionics/Sensors/avTVSensor.h    (revision 91480)
  30. +++ Header/Avionics/Sensors/avTVSensor.h    (working copy)
  31. @@ -3,6 +3,7 @@
  32.  #include "ICommandsCockpitDevice.h"
  33.  #include "viLight.h"
  34.  #include "Avionics/Sensors/avBasicSensor.h"
  35. +#include "edTerrain/PointOnSurfaceAdapter.h"
  36.  
  37.  #ifdef  _DEBUG
  38.  #include "Renderer/DbgGraph.h"
  39. @@ -125,7 +126,11 @@
  40.  
  41.     class COCKPITBASE_API avTVSensor : public avBasicSensor
  42.     {
  43. +#ifndef USE_TERRAIN4
  44.          mutable landscape::lPointOnSurface _terrain_visibility_check_pnt_;
  45. +#else
  46. +       mutable edterrain::PointOnSurfaceAdapter _terrain_visibility_check_pnt_;
  47. +#endif
  48.     public:
  49.         avTVSensor();
  50.        ~avTVSensor();
  51. Index: Header/LoadableEquipment/Weapon/eqTVGuidedWeapon.h
  52. ===================================================================
  53. --- Header/LoadableEquipment/Weapon/eqTVGuidedWeapon.h  (revision 91480)
  54. +++ Header/LoadableEquipment/Weapon/eqTVGuidedWeapon.h  (working copy)
  55. @@ -1,6 +1,7 @@
  56.  #pragma once
  57.  
  58.  #include "Avionics/Sensors/avTVSensor.h"
  59. +#include "edTerrain/PointOnSurfaceAdapter.h"
  60.  
  61.  namespace cockpit {
  62.  
  63. @@ -120,6 +121,10 @@
  64.         bool   forceCorrelateEnabled;
  65.          wModelTime forceCorrelateEnableTime;
  66.  
  67. +#ifndef USE_TERRAIN4
  68.         mutable landscape::lPointOnSurface surfInfo;
  69. +#else
  70. +       mutable edterrain::PointOnSurfaceAdapter surfInfo;
  71. +#endif
  72.     };
  73.  }
  74. Index: SConscript
  75. ===================================================================
  76. --- SConscript  (revision 91480)
  77. +++ SConscript  (working copy)
  78. @@ -7,7 +7,6 @@
  79.     'edCore',
  80.     'edMath',
  81.     'edObjects',
  82. -   'edTerrain',
  83.     'World',
  84.     'WorldGeneral',
  85.     'Inter',
  86. @@ -30,6 +29,11 @@
  87.     'renderer',
  88.  ]
  89.  
  90. +if not env.has_key('TERRAIN4'):
  91. +   libs += [
  92. +       'edTerrain',
  93. +   ]
  94. +
  95.  if not env.getUserVariable('FINAL_VERSION'):
  96.     libs.append('JConfigurator')
  97.  
  98. Index: Source/Avionics/Sensors/avTVSensor.cpp
  99. ===================================================================
  100. --- Source/Avionics/Sensors/avTVSensor.cpp  (revision 91480)
  101. +++ Source/Avionics/Sensors/avTVSensor.cpp  (working copy)
  102. @@ -494,7 +494,7 @@
  103.  
  104.      dVector p = pos.p;
  105.      // из А в Б, PointOnSurface перемещается в А, тогда правильней проверять от цели в себе
  106. -   if (_terrain_visibility_check_pnt_.intersectSurface(p,self_p,0))
  107. +   if (_terrain_visibility_check_pnt_.intersectSurface(p,self_p,(dPoint*)0))
  108.     {
  109.         return false;
  110.     }
  111. Index: Source/Avionics/Weapon/avWeaponsBombSight.cpp
  112. ===================================================================
  113. --- Source/Avionics/Weapon/avWeaponsBombSight.cpp   (revision 91480)
  114. +++ Source/Avionics/Weapon/avWeaponsBombSight.cpp   (working copy)
  115. @@ -15,6 +15,7 @@
  116.  #include "Utilities/ccTriggerSystem.h"
  117.  #include "mathDebug.h"
  118.  #include "unit_converter.h"
  119. +#include "wTerrain.h"
  120.  
  121.  using namespace cockpit;
  122.  
  123. @@ -403,9 +404,13 @@
  124.      {
  125.          if (!ElevationIsFixed)
  126.          {
  127. +#ifndef USE_TERRAIN4
  128.              static landscape::lPointOnSurface surfInfo;
  129.              surfInfo.set(out.p.x, out.p.z);
  130.              lead_target_level = surfInfo.getHeight();
  131. +#else
  132. +           lead_target_level = globalLand->heightSurface(out.p.x, out.p.z);
  133. +#endif
  134.          }
  135.          else
  136.              lead_target_level = target_level;
  137. @@ -456,9 +461,13 @@
  138.      {
  139.          if (!ElevationIsFixed)
  140.          {
  141. +#ifndef USE_TERRAIN4
  142.              static landscape::lPointOnSurface surfInfo;
  143.              surfInfo.set(lead_human_position.p.x, lead_human_position.p.z);
  144.              lead_target_level = surfInfo.getHeight();
  145. +#else
  146. +           lead_target_level = globalLand->heightSurface(lead_human_position.p.x, lead_human_position.p.z);
  147. +#endif
  148.          }
  149.          else
  150.              lead_target_level = target_level;
  151. Index: Source/Utilities/ccLuaLoader.cpp
  152. ===================================================================
  153. --- Source/Utilities/ccLuaLoader.cpp    (revision 91480)
  154. +++ Source/Utilities/ccLuaLoader.cpp    (working copy)
  155. @@ -37,6 +37,7 @@
  156.  #include "smSceneManager.h"
  157.  #include "Oculus.h"
  158.  #include "IwWorld.h"
  159. +#include "wTerrain.h"
  160.  
  161.  using namespace cockpit;
  162.  using namespace Common;
  163. @@ -307,7 +308,11 @@
  164.     }
  165.     const char * data_name     = lua_tostring(L,1);
  166.  
  167. +#ifndef USE_TERRAIN4
  168.     lua_State  * terrain_state =  GetTerraDispatch()->getTerrainCfg();
  169. +#else
  170. +   lua_State  * terrain_state =  globalLand->getTerrainCfg();
  171. +#endif
  172.     lua_getglobal(terrain_state,data_name);
  173.     {
  174.         ED_lua_copyindex (L,terrain_state,-1);
Advertisement
Add Comment
Please, Sign In to add comment