SHOW:
|
|
- or go back to the newest paste.
| 1 | - | Index: Base/Header/Avionics/Sensors/avSimpleRadar.h |
| 1 | + | Index: Header/Avionics/Sensors/avSimpleRadar.h |
| 2 | =================================================================== | |
| 3 | - | --- Base/Header/Avionics/Sensors/avSimpleRadar.h (revision 91428) |
| 3 | + | --- Header/Avionics/Sensors/avSimpleRadar.h (revision 91428) |
| 4 | - | +++ Base/Header/Avionics/Sensors/avSimpleRadar.h (working copy) |
| 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/ITerrain.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: Base/Header/Avionics/Sensors/avTVSensor.h |
| 27 | + | Index: Header/Avionics/Sensors/avTVSensor.h |
| 28 | =================================================================== | |
| 29 | - | --- Base/Header/Avionics/Sensors/avTVSensor.h (revision 91428) |
| 29 | + | --- Header/Avionics/Sensors/avTVSensor.h (revision 91428) |
| 30 | - | +++ Base/Header/Avionics/Sensors/avTVSensor.h (working copy) |
| 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/ITerrain.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::PointOnSurface _terrain_visibility_check_pnt_; |
| 46 | + | + mutable edterrain::PointOnSurfaceAdapter _terrain_visibility_check_pnt_; |
| 47 | +#endif | |
| 48 | public: | |
| 49 | avTVSensor(); | |
| 50 | ~avTVSensor(); | |
| 51 | - | Index: Base/Header/LoadableEquipment/Weapon/eqTVGuidedWeapon.h |
| 51 | + | Index: Header/LoadableEquipment/Weapon/eqTVGuidedWeapon.h |
| 52 | =================================================================== | |
| 53 | - | --- Base/Header/LoadableEquipment/Weapon/eqTVGuidedWeapon.h (revision 91428) |
| 53 | + | --- Header/LoadableEquipment/Weapon/eqTVGuidedWeapon.h (revision 91428) |
| 54 | - | +++ Base/Header/LoadableEquipment/Weapon/eqTVGuidedWeapon.h (working copy) |
| 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/ITerrain.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::PointOnSurface surfInfo; |
| 70 | + | + mutable edterrain::PointOnSurfaceAdapter surfInfo; |
| 71 | +#endif | |
| 72 | }; | |
| 73 | } | |
| 74 | - | Index: Base/SConscript |
| 74 | + | Index: SConscript |
| 75 | =================================================================== | |
| 76 | - | --- Base/SConscript (revision 91428) |
| 76 | + | --- SConscript (revision 91428) |
| 77 | - | +++ Base/SConscript (working copy) |
| 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: Base/Source/Avionics/Sensors/avSimpleRadar.cpp |
| 98 | + | Index: Source/Avionics/Sensors/avSimpleRadar.cpp |
| 99 | =================================================================== | |
| 100 | - | --- Base/Source/Avionics/Sensors/avSimpleRadar.cpp (revision 91428) |
| 100 | + | --- Source/Avionics/Sensors/avSimpleRadar.cpp (revision 91428) |
| 101 | - | +++ Base/Source/Avionics/Sensors/avSimpleRadar.cpp (working copy) |
| 101 | + | +++ Source/Avionics/Sensors/avSimpleRadar.cpp (working copy) |
| 102 | @@ -7,7 +7,6 @@ | |
| 103 | #include "viObjectManager.h" | |
| 104 | #include "wsType_Level4.h" | |
| 105 | #include "wConst.h" | |
| 106 | -#include "wTerrain.h" | |
| 107 | #include "wsInitData.h" | |
| 108 | #include "IwInfo.h" | |
| 109 | #include "Math\_math.h" | |
| 110 | @@ -20,6 +19,7 @@ | |
| 111 | #include "Utilities/ccTriggerSystem.h" | |
| 112 | #include "woSpot.h" | |
| 113 | #include "wDetectable.h" | |
| 114 | +#include "wTerrain.h" | |
| 115 | ||
| 116 | using namespace cockpit; | |
| 117 | ||
| 118 | - | @@ -643,7 +643,8 @@ |
| 118 | + | @@ -643,6 +643,7 @@ |
| 119 | dVector end_ = antenna_pos.p + antenna_pos.x * d | |
| 120 | + antenna_pos.y * 0.5 * h * d *rnd_y | |
| 121 | + antenna_pos.z * 0.5 * w * d *rnd_z; | |
| 122 | - | - if (surf_info.intersectSurface(start_,end_,&res_)) |
| 122 | + | |
| 123 | if (surf_info.intersectSurface(start_,end_,&res_)) | |
| 124 | - | + if (surf_info.intersectSurface(start_,end_,(cPoint*)&res_))) |
| 124 | + | |
| 125 | } | |
| 126 | Index: Source/Avionics/Sensors/avTVSensor.cpp | |
| 127 | =================================================================== | |
| 128 | - | Index: Base/Source/Avionics/Sensors/avTVSensor.cpp |
| 128 | + | --- Source/Avionics/Sensors/avTVSensor.cpp (revision 91428) |
| 129 | +++ Source/Avionics/Sensors/avTVSensor.cpp (working copy) | |
| 130 | - | --- Base/Source/Avionics/Sensors/avTVSensor.cpp (revision 91428) |
| 130 | + | |
| 131 | - | +++ Base/Source/Avionics/Sensors/avTVSensor.cpp (working copy) |
| 131 | + | |
| 132 | #include "Registry/RegisterManager.h" | |
| 133 | #include "Avionics/Sensors/avSensorRoutines.h" | |
| 134 | +#include "wTerrain.h" | |
| 135 | ||
| 136 | using namespace cockpit; | |
| 137 | ||
| 138 | @@ -408,7 +409,7 @@ | |
| 139 | cVector start_ = getPlatformPosition().p; | |
| 140 | - | @@ -408,8 +409,8 @@ |
| 140 | + | |
| 141 | cVector end_ = start_ + dir_ * max_dist; | |
| 142 | - // из А в Б, PointOnSurface перемещается в А, тогда правильней проверять от цели в себе | |
| 143 | + // из А в Б, PointOnSurface перемещается в А, тогда правильней проверять от цели в себе | |
| 144 | if (_terrain_visibility_check_pnt_.intersectSurface(end_,start_,&res)) | |
| 145 | - | - if (_terrain_visibility_check_pnt_.intersectSurface(end_,start_,&res)) |
| 145 | + | |
| 146 | gyro_stabilize_point = res; | |
| 147 | - | + if (_terrain_visibility_check_pnt_.intersectSurface(end_,start_,(cPoint*)&res)) |
| 147 | + | |
| 148 | ||
| 149 | dVector p = pos.p; | |
| 150 | - | end_ = res; |
| 150 | + | |
| 151 | - if (_terrain_visibility_check_pnt_.intersectSurface(p,self_p,0)) | |
| 152 | + if (_terrain_visibility_check_pnt_.intersectSurface(p,self_p,(cPoint*)NULL)) | |
| 153 | {
| |
| 154 | return false; | |
| 155 | } | |
| 156 | - | + if (_terrain_visibility_check_pnt_.intersectSurface(end_,start_,(cPoint*)&NULL)) |
| 156 | + | |
| 157 | if (!checkTargetTVvisibility(p,maxdistance)) | |
| 158 | {
| |
| 159 | return false; | |
| 160 | Index: Source/Avionics/Weapon/avWeaponsBombSight.cpp | |
| 161 | =================================================================== | |
| 162 | --- Source/Avionics/Weapon/avWeaponsBombSight.cpp (revision 91428) | |
| 163 | +++ Source/Avionics/Weapon/avWeaponsBombSight.cpp (working copy) | |
| 164 | - | Index: Base/Source/Avionics/Weapon/avWeaponsBombSight.cpp |
| 164 | + | |
| 165 | #include "Utilities/ccTriggerSystem.h" | |
| 166 | - | --- Base/Source/Avionics/Weapon/avWeaponsBombSight.cpp (revision 91428) |
| 166 | + | |
| 167 | - | +++ Base/Source/Avionics/Weapon/avWeaponsBombSight.cpp (working copy) |
| 167 | + | |
| 168 | +#include "wTerrain.h" | |
| 169 | ||
| 170 | using namespace cockpit; | |
| 171 | ||
| 172 | @@ -403,9 +404,13 @@ | |
| 173 | {
| |
| 174 | if (!ElevationIsFixed) | |
| 175 | {
| |
| 176 | +#ifndef USE_TERRAIN4 | |
| 177 | static landscape::lPointOnSurface surfInfo; | |
| 178 | surfInfo.set(out.p.x, out.p.z); | |
| 179 | lead_target_level = surfInfo.getHeight(); | |
| 180 | +#else | |
| 181 | + lead_target_level = globalLand->heightSurface(out.p.x, out.p.z); | |
| 182 | +#endif | |
| 183 | } | |
| 184 | else | |
| 185 | - | + lead_target_level = surfInfo->height(); |
| 185 | + | |
| 186 | @@ -456,9 +461,13 @@ | |
| 187 | {
| |
| 188 | if (!ElevationIsFixed) | |
| 189 | {
| |
| 190 | +#ifndef USE_TERRAIN4 | |
| 191 | static landscape::lPointOnSurface surfInfo; | |
| 192 | surfInfo.set(lead_human_position.p.x, lead_human_position.p.z); | |
| 193 | lead_target_level = surfInfo.getHeight(); | |
| 194 | +#else | |
| 195 | + lead_target_level = globalLand->heightSurface(lead_human_position.p.x, lead_human_position.p.z); | |
| 196 | +#endif | |
| 197 | } | |
| 198 | else | |
| 199 | - | + lead_target_level = surfInfo.height(); |
| 199 | + | |
| 200 | Index: Source/Utilities/ccLuaLoader.cpp | |
| 201 | =================================================================== | |
| 202 | --- Source/Utilities/ccLuaLoader.cpp (revision 91428) | |
| 203 | +++ Source/Utilities/ccLuaLoader.cpp (working copy) | |
| 204 | - | Index: Base/Source/LoadableEquipment/Weapon/eqTVGuidedWeapon.cpp |
| 204 | + | |
| 205 | #include "smSceneManager.h" | |
| 206 | - | --- Base/Source/LoadableEquipment/Weapon/eqTVGuidedWeapon.cpp (revision 91428) |
| 206 | + | |
| 207 | - | +++ Base/Source/LoadableEquipment/Weapon/eqTVGuidedWeapon.cpp (working copy) |
| 207 | + | |
| 208 | - | @@ -717,7 +717,7 @@ |
| 208 | + | |
| 209 | - | dVector res; |
| 209 | + | |
| 210 | - | const dPosition& platform_position = getPlatformPosition(); |
| 210 | + | |
| 211 | using namespace Common; | |
| 212 | - | - if (surfInfo.intersectSurface(platform_position.p, platform_position.p + platform_position.x * max_distance, &res)) |
| 212 | + | |
| 213 | - | + if (surfInfo.intersectSurface(platform_position.p, platform_position.p + platform_position.x * max_distance, (cPoint*)&res)) |
| 213 | + | |
| 214 | const char * data_name = lua_tostring(L,1); | |
| 215 | - | return (res - platform_position.p).length(); |
| 215 | + | |
| 216 | +#ifndef USE_TERRAIN4 | |
| 217 | - | Index: Base/Source/Utilities/ccLuaLoader.cpp |
| 217 | + | |
| 218 | +#else | |
| 219 | - | --- Base/Source/Utilities/ccLuaLoader.cpp (revision 91428) |
| 219 | + | |
| 220 | - | +++ Base/Source/Utilities/ccLuaLoader.cpp (working copy) |
| 220 | + | |
| 221 | + | |
| 222 | lua_getglobal(terrain_state,data_name); | |
| 223 | {
| |
| 224 | ED_lua_copyindex (L,terrain_state,-1); |