Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: Header/Avionics/Sensors/avSimpleRadar.h
- ===================================================================
- --- Header/Avionics/Sensors/avSimpleRadar.h (revision 91428)
- +++ Header/Avionics/Sensors/avSimpleRadar.h (working copy)
- @@ -9,6 +9,7 @@
- #include "Utilities/ccTriggerSystem.h"
- #include "Utilities/ccUtilities.h"
- #include "Avionics/avSimpleElectricSystem.h"
- +#include "edTerrain/ITerrain.h"
- class woSpot;
- @@ -137,8 +138,13 @@
- protected:
- radar_capabilities basic_capabilities;
- +#ifndef USE_TERRAIN4
- landscape::lPointOnSurface surf_info;
- landscape::lPointOnSurface surf_info_2;
- +#else
- + edterrain::PointOnSurfaceAdapter surf_info;
- + edterrain::PointOnSurfaceAdapter surf_info_2;
- +#endif
- woSpot *spot;
- Index: Header/Avionics/Sensors/avTVSensor.h
- ===================================================================
- --- Header/Avionics/Sensors/avTVSensor.h (revision 91428)
- +++ Header/Avionics/Sensors/avTVSensor.h (working copy)
- @@ -3,6 +3,7 @@
- #include "ICommandsCockpitDevice.h"
- #include "viLight.h"
- #include "Avionics/Sensors/avBasicSensor.h"
- +#include "edTerrain/ITerrain.h"
- #ifdef _DEBUG
- #include "Renderer/DbgGraph.h"
- @@ -125,7 +126,11 @@
- class COCKPITBASE_API avTVSensor : public avBasicSensor
- {
- +#ifndef USE_TERRAIN4
- mutable landscape::lPointOnSurface _terrain_visibility_check_pnt_;
- +#else
- + mutable edterrain::PointOnSurfaceAdapter _terrain_visibility_check_pnt_;
- +#endif
- public:
- avTVSensor();
- ~avTVSensor();
- Index: Header/LoadableEquipment/Weapon/eqTVGuidedWeapon.h
- ===================================================================
- --- Header/LoadableEquipment/Weapon/eqTVGuidedWeapon.h (revision 91428)
- +++ Header/LoadableEquipment/Weapon/eqTVGuidedWeapon.h (working copy)
- @@ -1,6 +1,7 @@
- #pragma once
- #include "Avionics/Sensors/avTVSensor.h"
- +#include "edTerrain/ITerrain.h"
- namespace cockpit {
- @@ -120,6 +121,10 @@
- bool forceCorrelateEnabled;
- wModelTime forceCorrelateEnableTime;
- +#ifndef USE_TERRAIN4
- mutable landscape::lPointOnSurface surfInfo;
- +#else
- + mutable edterrain::PointOnSurfaceAdapter surfInfo;
- +#endif
- };
- }
- Index: SConscript
- ===================================================================
- --- SConscript (revision 91428)
- +++ SConscript (working copy)
- @@ -7,7 +7,6 @@
- 'edCore',
- 'edMath',
- 'edObjects',
- - 'edTerrain',
- 'World',
- 'WorldGeneral',
- 'Inter',
- @@ -30,6 +29,11 @@
- 'renderer',
- ]
- +if not env.has_key('TERRAIN4'):
- + libs += [
- + 'edTerrain',
- + ]
- +
- if not env.getUserVariable('FINAL_VERSION'):
- libs.append('JConfigurator')
- Index: Source/Avionics/Sensors/avSimpleRadar.cpp
- ===================================================================
- --- Source/Avionics/Sensors/avSimpleRadar.cpp (revision 91428)
- +++ Source/Avionics/Sensors/avSimpleRadar.cpp (working copy)
- @@ -7,7 +7,6 @@
- #include "viObjectManager.h"
- #include "wsType_Level4.h"
- #include "wConst.h"
- -#include "wTerrain.h"
- #include "wsInitData.h"
- #include "IwInfo.h"
- #include "Math\_math.h"
- @@ -20,6 +19,7 @@
- #include "Utilities/ccTriggerSystem.h"
- #include "woSpot.h"
- #include "wDetectable.h"
- +#include "wTerrain.h"
- using namespace cockpit;
- @@ -643,6 +643,7 @@
- dVector end_ = antenna_pos.p + antenna_pos.x * d
- + antenna_pos.y * 0.5 * h * d *rnd_y
- + antenna_pos.z * 0.5 * w * d *rnd_z;
- +
- if (surf_info.intersectSurface(start_,end_,&res_))
- make_ground_spot(res_);
- }
- Index: Source/Avionics/Sensors/avTVSensor.cpp
- ===================================================================
- --- Source/Avionics/Sensors/avTVSensor.cpp (revision 91428)
- +++ Source/Avionics/Sensors/avTVSensor.cpp (working copy)
- @@ -14,6 +14,7 @@
- #include "Modeler/Utility.h"
- #include "Registry/RegisterManager.h"
- #include "Avionics/Sensors/avSensorRoutines.h"
- +#include "wTerrain.h"
- using namespace cockpit;
- @@ -408,7 +409,7 @@
- cVector start_ = getPlatformPosition().p;
- cVector dir_ = getPlatformPosition().x;
- cVector end_ = start_ + dir_ * max_dist;
- - // из А в Б, PointOnSurface перемещается в А, тогда правильней проверять от цели в себе
- + // из А в Б, PointOnSurface перемещается в А, тогда правильней проверять от цели в себе
- if (_terrain_visibility_check_pnt_.intersectSurface(end_,start_,&res))
- {
- gyro_stabilize_point = res;
- @@ -494,11 +495,10 @@
- dVector p = pos.p;
- // из А в Б, PointOnSurface перемещается в А, тогда правильней проверять от цели в себе
- - if (_terrain_visibility_check_pnt_.intersectSurface(p,self_p,0))
- + if (_terrain_visibility_check_pnt_.intersectSurface(p,self_p,(cPoint*)NULL))
- {
- return false;
- }
- -
- if (!checkTargetTVvisibility(p,maxdistance))
- {
- return false;
- Index: Source/Avionics/Weapon/avWeaponsBombSight.cpp
- ===================================================================
- --- Source/Avionics/Weapon/avWeaponsBombSight.cpp (revision 91428)
- +++ Source/Avionics/Weapon/avWeaponsBombSight.cpp (working copy)
- @@ -15,6 +15,7 @@
- #include "Utilities/ccTriggerSystem.h"
- #include "mathDebug.h"
- #include "unit_converter.h"
- +#include "wTerrain.h"
- using namespace cockpit;
- @@ -403,9 +404,13 @@
- {
- if (!ElevationIsFixed)
- {
- +#ifndef USE_TERRAIN4
- static landscape::lPointOnSurface surfInfo;
- surfInfo.set(out.p.x, out.p.z);
- lead_target_level = surfInfo.getHeight();
- +#else
- + lead_target_level = globalLand->heightSurface(out.p.x, out.p.z);
- +#endif
- }
- else
- lead_target_level = target_level;
- @@ -456,9 +461,13 @@
- {
- if (!ElevationIsFixed)
- {
- +#ifndef USE_TERRAIN4
- static landscape::lPointOnSurface surfInfo;
- surfInfo.set(lead_human_position.p.x, lead_human_position.p.z);
- lead_target_level = surfInfo.getHeight();
- +#else
- + lead_target_level = globalLand->heightSurface(lead_human_position.p.x, lead_human_position.p.z);
- +#endif
- }
- else
- lead_target_level = target_level;
- Index: Source/Utilities/ccLuaLoader.cpp
- ===================================================================
- --- Source/Utilities/ccLuaLoader.cpp (revision 91428)
- +++ Source/Utilities/ccLuaLoader.cpp (working copy)
- @@ -37,6 +37,7 @@
- #include "smSceneManager.h"
- #include "Oculus.h"
- #include "IwWorld.h"
- +#include "wTerrain.h"
- using namespace cockpit;
- using namespace Common;
- @@ -307,7 +308,12 @@
- }
- const char * data_name = lua_tostring(L,1);
- +#ifndef USE_TERRAIN4
- lua_State * terrain_state = GetTerraDispatch()->getTerrainCfg();
- +#else
- + lua_State * terrain_state = globalLand->getTerrainCfg();
- +#endif
- +
- lua_getglobal(terrain_state,data_name);
- {
- ED_lua_copyindex (L,terrain_state,-1);
Advertisement
Add Comment
Please, Sign In to add comment