xracer Posted May 29, 2010 Posted May 29, 2010 To anyone who knows for sure what he is talking about... I need some help on a parameter in the "Weather" section of the mission LUA file. When i make a mission (any complexity) and dont touch the weather settings and save the mission, then the fog section looks like this: fog = { density = 0, thickness = 0, }, -- end of fog Ok if i do touch the settings on weather in the editor and even reset to default and save the mission then the fog section looks like this: fog = { density = 0, visibility = 500, thickness = 0, }, -- end of fog What i wanna ask is what is the default value for "visibility" when the parameter ISN'T present in the file? and is it a problem that its allways there? System spec: Intel Core i7 920@4.2Ghz (stable, 65degC fully loaded), EVGA GTX-780, Asus P6T Deluxe V2 v.5.04 BIOS, Saitek X52, 1TB/500GB WD HD for system/storage. Kingston SSD 120 GB for DCS, 250GB Samsung 840 SSD for the rest. 16GB Kingston KHX1600C9D3 Memory, 9 GB Pagefile, EK HFX-240 Watercooling, Corsair HX-1000 PSU. HAF-932 Tower, TrackIR-5, Win64Ult [sIGPIC][/sIGPIC]
Frederf Posted May 30, 2010 Posted May 30, 2010 I assume it's a cascading-like structure that only modifies values from the base class when necessary. Something like: Default{ value=1}; Example1:Default{ }; Example2:Default{ value=2}; Both Example1 and Example2 inherit from Default and so the value "value" is defined in both cases even though it's not specifically mentioned in Example1.
xracer Posted May 30, 2010 Author Posted May 30, 2010 I assume it's a cascading-like structure that only modifies values from the base class when necessary. Something like: Default{ value=1}; Example1:Default{ }; Example2:Default{ value=2}; Both Example1 and Example2 inherit from Default and so the value "value" is defined in both cases even though it's not specifically mentioned in Example1. Thanks for the info btw. i think i have found some of the info i need in these fragments: local fogVisibility = { [0] = 0, [1] = 1000, [2] = 500, [3] = 300, [4] = 200, [5] = 80, [6] = 45, [7] = 25, [8] = 10, [9] = 5, [10] = 5, } and if 0 == vdata.fog.density then vdata.fog.visibility = nil else vdata.fog.visibility = fogVisibility[vdata.fog.density] end System spec: Intel Core i7 920@4.2Ghz (stable, 65degC fully loaded), EVGA GTX-780, Asus P6T Deluxe V2 v.5.04 BIOS, Saitek X52, 1TB/500GB WD HD for system/storage. Kingston SSD 120 GB for DCS, 250GB Samsung 840 SSD for the rest. 16GB Kingston KHX1600C9D3 Memory, 9 GB Pagefile, EK HFX-240 Watercooling, Corsair HX-1000 PSU. HAF-932 Tower, TrackIR-5, Win64Ult [sIGPIC][/sIGPIC]
Recommended Posts