diff --git a/SQF/dayz_code/compile/fn_lightFunctions.sqf b/SQF/dayz_code/compile/fn_lightFunctions.sqf index a30ba3a5c..88bdadcc4 100644 --- a/SQF/dayz_code/compile/fn_lightFunctions.sqf +++ b/SQF/dayz_code/compile/fn_lightFunctions.sqf @@ -1,14 +1,13 @@ /* DayZ Epoch Lighting System - Light Functions - Made for DayZ Epoch by axeman please ask permission to use/edit/distribute email gregory.andrew@gmail.com or vbawol@veteranbastards.com. + Made for DayZ Epoch by axeman please ask permission to use/edit/distribute email gregory.andrew@gmail.com. */ -axe_returnStreetLights={ -private["_lights","_objName","_rng","_nrstGen","_rndLights","_sleeptime"]; -_rng = _this select 0; -_nrstGen = _this select 1; -_rndLights = _this select 2; +axe_NoStreetLights={//For testing - Need to see brightness of house lights +private["_lights","_rng","_target","_objName"]; +_target = _this select 0; +_rng = _this select 1; + _lights = ["a_fuelstation_sign.p3d","lampa_ind_zebr.p3d","lampa_ind.p3d","lampa_sidl_3.p3d","lampa_sidl_2.p3d","lampa_sidl.p3d","powlines_concl.p3d","powlines_woodl.p3d"]; -axe_streetLamps=[]; { if("" != typeOf _x) then { @@ -18,40 +17,16 @@ axe_streetLamps=[]; _objName = _x call DZE_getModelName; if (_objName in _lights) then { - if(_rndLightsrandom 100)then{//Reduce chance more due to speed of script - - for "_s" from 1 to 8 do { - if(_s%2==0)then{ - _x switchlight "off"; - - }else{ - _x switchlight "on"; - ; - }; - _sleeptime=(random 100)/100; - sleep _sleeptime; - }; - _x switchlight "off"; - //axeDiagLog = format["FN:SL NEW OFF:%1",_x]; - //publicVariable "axeDiagLog"; - }else{ - _x switchlight "on"; - //axeDiagLog = format["FN:SL NEW ON:%1",_x]; - //publicVariable "axeDiagLog"; - }; - }else{ - _x switchlight "on"; - //axeDiagLog = format["FN:SL NEW ON:%1",_x]; - //publicVariable "axeDiagLog"; - }; - [axe_streetLamps , [_x]] call BIS_fnc_arrayPush; + + _x switchlight "off"; + }; }; }; - } foreach nearestObjects [getPos _nrstGen, [], _rng]; -axe_streetLamps + } foreach nearestObjects [getPos _target, [], _rng]; + }; + axe_newLightPoint={ private ["_lp","_pos","_col","_brt","_amb","_pos","_dir","_vect"]; _col = _this select 0; @@ -60,16 +35,18 @@ _amb = _this select 2; _pos = _this select 3; _dir = _this select 4; _vect = _this select 5; -_lp = "#lightpoint" createVehicleLocal _pos; +_lp = "#lightpoint" createVehicleLocal _pos;//Only create locally now. _lp setLightColor _col; _lp setLightBrightness _brt; _lp setLightAmbient _amb; _lp setDir _dir; _lp setVectorUp _vect; -//axeDiagLog = format["FN:LP NEW CREATE:%1",_lp]; +//_lp enableSimulation false;//Using this stops lights from illuminating for local player (not tried moving it to before parameters set) - Makes no difference to network broadcast, other players DO NOT see the object anyway +//axeDiagLog = format["FN:LP NEW CREATE:BRIGHT:%3 | %1 for %2",_lp,player,_brt]; //publicVariable "axeDiagLog"; _lp }; + axe_lightPoint={ private ["_lp","_col","_brt","_amb"]; _col = _this select 0; @@ -82,6 +59,26 @@ _lp setLightAmbient _amb; //axeDiagLog = format["FN:LP EXISTS LIGHT:%1",_lp]; //publicVariable "axeDiagLog"; }; + +//return brightness of light attached to object +axe_lightBrightness={ +private["_plyr","_brtns","_lightPcnt","_target"]; +_plyr = _this select 0; +_target = _this select 1; + +if(isNil "dayz_fullMoonNights")then{dayz_fullMoonNights = false;}; +if(dayz_fullMoonNights)then{ +_brtns = 0.024; +}else{ +_brtns = 0.018; +}; +_brtns = _brtns + ((_brtns/100) * ((_plyr distance _target)/15)); //Add percentage of brightness based on distance from player +//Min / Max Levels +//if (_brtns > 0.025)then{_brtns = 0.025;}; +//if (_brtns < 0.015)then{_brtns = 0.015;}; +_brtns +}; + axe_towerLight={ private["_twr","_lCol","_lbrt","_lamb","_oset","_twrPos","_rad","_a","_b","_ang","_nrTLs","_doLit"]; _twr = _this select 3 select 0; diff --git a/SQF/dayz_code/compile/local_lights_house.sqf b/SQF/dayz_code/compile/local_lights_house.sqf index 433e87ce9..d808c7bff 100644 --- a/SQF/dayz_code/compile/local_lights_house.sqf +++ b/SQF/dayz_code/compile/local_lights_house.sqf @@ -1,102 +1,164 @@ /* DayZ Epoch Lighting System - House Lights - Made for DayZ Epoch by axeman please ask permission to use/edit/distribute email gregory.andrew@gmail.com or vbawol@veteranbastards.com. + Made for DayZ Epoch by axeman please ask permission to use/edit/distribute email gregory.andrew@gmail.com. */ -private ["_objLightPoint","_pos","_objHouse","_dir","_rng","_lpDist","_nrstTrig","_rndLights","_lmpCol","_hsAnimPer","_brtns","_lightPcnt","_hsLPDist","_hsTime","_hsCount","_litCount","_hsAnimPer2","_chnGCount","_debug"]; -_hsCount = 0; -_litCount = 0; -_chnGCount = 0; -//_debug = false; +private ["_validHouses","_animPhase","_maxHouses","_houseNum","_plyr","_objLightPoint","_pos","_objHouse","_dir","_rng","_rngPlyr","_lpRange","_nrstTrig","_lmpCol","_hsAnimPer","_brtns","_lightPcnt","_hsLPDist","_notLitHouses","_areaLit","_litHouses","_hsAnimPhase","_litWindowFound","_currLighting"]; -_rng = _this select 0;//player range to light windows -_nrstTrig = _this select 1; -_rndLights = _this select 2; -_lmpCol = _this select 3; -_lpDist = _this select 4;//Range to create lightpoints at -_hsLPDist = 2; //Distance to dettect local lightpoint from house center -_objHouse = nearestObjects [_nrstTrig, ["House"], _rng]; -if(!isNil "_objHouse")then{ - _hsTime = time; - { - //axeDiagLog = format["HL:ATTEMPT typeof _x:%1 | _x:%2",typeof _x,_x]; - //publicVariable "axeDiagLog"; - _hsAnimPer = getNumber (configFile >> "CfgVehicles" >> (typeof _x) >> "AnimationSources" >> "Lights_1" >> "animPeriod"); - _hsAnimPer2 = getNumber (configFile >> "CfgVehicles" >> (typeof _x) >> "AnimationSources" >> "Lights_2" >> "animPeriod"); - //axeDiagLog = format["HL:CONFIG:%1 | Base:%2 | MLight Bright:%3 | MLight Blink:%4 | Alive:%5 | Lights_2:%6",_hsAnimPer,_base,_mLights,_mLightsBlink, alive _x,_hsAnimPer2]; - //publicVariable "axeDiagLog"; - if(_hsAnimPer>0 && alive _x)then{//Is house with window - - _brtns = 0.0025; - _lightPcnt = (player distance _x)/10; - _brtns = _brtns * _lightPcnt;//Light brightness by percentage - //Min / Max Levels - if (_brtns > 0.06)then{_brtns = 0.06;}; - if (_brtns < 0.015)then{_brtns = 0.015;}; + +//test +private["_animPhase2"]; - _objLightPoint = nearestObject [_x, "#lightpoint"]; - _pos = getPos _x; - _dir = getDir _x; - - if(_x getVariable ["axeHLight", 0]<1)then{ - if(_rndLights>random 100)then{ - _litCount = _litCount +1; - if(_x animationPhase "Lights_1"==0) then{ - _x animate ["Lights_1",1]; - if(_hsAnimPer2>0)then{ - if(42 > random 100) then{_x animate ["Lights_2",1];};//Randomly light second set of windows if house has the option - }; - //Wait for animation phase - while{true}do{sleep .1;if (_x animationPhase "Lights_1"==1) exitWith {};}; - }; - //axeDiagLog = format["HL: animPhase:%1",_x animationPhase "Lights_1"]; - //publicVariable "axeDiagLog"; - if((_x animationPhase "Lights_1">0))then{ - - if((abs ([_pos, _objLightPoint] call BIS_fnc_distance2D))>_hsLPDist)then{ - if(player distance _x < _lpDist)then{ - //if(_debug)then{axeDiagLog = format["HL:NEW LP:%1 | _brtns:%2",_x,_brtns];publicVariable "axeDiagLog";}; - //[_lmpCol,0.01,_lmpCol,[_pos select 0,_pos select 1,1],_dir,[0,0,-1]] call axe_newLightPoint; - [_lmpCol,_brtns,_lmpCol,getPos _x,_dir,[0,0,-2.6]] call axe_newLightPoint; - _x setVariable ["brtns", _brtns, false]; - _x setVariable ["axeHLight", 1, false]; - }; - }else{ - if(player distance _x < _lpDist)then{ - //if(_debug)then{axeDiagLog = format["HL:EXISTS LP:%1 | _brtns:%2",_x,_brtns];publicVariable "axeDiagLog";}; - //[_lmpCol,_brtns,_lmpCol,_objLightPoint] call axe_lightPoint; - _objLightPoint setLightColor _lmpCol; - _objLightPoint setLightBrightness _brtns; - _objLightPoint setLightAmbient _lmpCol; - _chnGCount = _chnGCount + 1; - _x setVariable ["brtns", _brtns, false]; - _x setVariable ["axeHLight", 1, false]; - }; - }; + +//_debug = false; +_rng = _this select 0;//player range to light windows - REDUCE if individual players experience lag (Is client based) +_nrstTrig = _this select 1; +_lightPcnt = _this select 2; +_lmpCol = _this select 3; +_lpRange = round(_rng - ((_rng/100)*16));//Create an outer radius to cleanup lightpoints in +_plyr = _this select 4; +_houseNum = _this select 5; +_hsLPDist = 2; //Distance to detect local lightpoint from house center +_notLitHouses = []; +_litHouses = []; +_areaLit = false; +_litWindowFound = false; +_currLighting = 0; +_validHouses = 0; +_maxHouses = 0; +//Create a routine to reduce range if house amount limit is hit, reduce lag in cities.. + + +//TESTING +//if(_houseNum>200)then{_rng = _rng - (_rng/100)*(_houseNum/10)};//Reduce range by % of housenum. If 600 houses reduce range by 60%, 400 house reduce by 40% etc.. - USAGE: In cities where visible houses are lower +//TESTING + + + +_objHouse = nearestObjects [_nrstTrig, ["House"], _rng]; + +//axeDiagLog = format["HL:HOUSE NUM:%1 (From Last Run) | Range:%2 | Total House Objs:%3",_houseNum,_rng, count _objHouse]; +//publicVariable "axeDiagLog"; + +_houseNum = count _objHouse; + + + +if(!isNil "_objHouse")then{ + + { + _animPhase = getNumber(configFile >> "cfgVehicles" >> typeOf _x >> "AnimationSources" >> "Lights_1" >> "animPeriod"); + + //test + + //axeDiagLog = format["HL:House Found: InitPhase: %3 | InPhase2:%4 | Phase:%1 for %2",_x animationPhase "Lights_1", _x,_animPhase,_animPhase2]; + //publicVariable "axeDiagLog"; + + if(_animPhase>0)then{//Only if has a window (Lights_1) + if(_x animationPhase "Lights_1" == 0)then{//If not lit + [_notLitHouses , _x] call BIS_fnc_arrayPush; + }else{//Already Lit - Do your thing.. later + [_litHouses , _x] call BIS_fnc_arrayPush; + _currLighting = _currLighting + 1; + }; + _validHouses = _validHouses +1; + }; + + } forEach _objHouse; + + _maxHouses = ((_validHouses/100)*_lightPcnt); + + //axeDiagLog = format["HL:START(%5): Max Houses: %1 | Previous Houses: %2 | LIT HOUSES:%3 | Not Lit:%4",_maxHouses, _houseNum,count _litHouses,count _notLitHouses, name player]; + //publicVariable "axeDiagLog"; + + if(count _litHouses < _maxHouses)then{ + _currLighting = count _litHouses; + + { + if(_currLighting < _maxHouses)then{ + + + if(_lightPcnt > floor (random 100))then{//Randomness required or first nearest houses to player get lit in a block - Needs to be based on range ! + + //axeDiagLog = format["HL:Lighting New House: %3 Num:%1 Type: %4 for %2 | Dist:%5",_currLighting, name player,_x,typeOf _x,player distance _x]; + //publicVariable "axeDiagLog"; + + //_x enableSimulation false;//Attempt to stop Arma from broadcasting animationphase. DOESN'T WORK - House lights_1 animationphase is still broadcast regardless - Using that as the basis for lights ! Removed as it may stop destruction of building.. (For Now) + _x animate ["Lights_1",1]; + + //Randomly light second window(s) + if(42 > floor (random 100)) then{ + //Only light if available otherwise animate 'attempt' may continue indefinitely.. + _animPhase2 = getNumber(configFile >> "cfgVehicles" >> typeOf _x >> "AnimationSources" >> "Lights_2" >> "animPeriod"); + if(_animPhase2>0)then{ + _x animate ["Lights_2",1]; }; }; - }else{//change brightness - if(player distance _x < _lpDist)then{ - if((abs ([_pos, _objLightPoint] call BIS_fnc_distance2D))<_hsLPDist)then{ - _litCount = _litCount +1; - //if(_debug)then{axeDiagLog = format["HL:EXISTS LP:%1 | _brtns:%2",_x,_brtns];publicVariable "axeDiagLog";}; - _chnGCount = _chnGCount + 1; - _x setVariable ["brtns", _brtns, false]; - //[_lmpCol,_brtns,_lmpCol,_objLightPoint] call axe_lightPoint; - _objLightPoint setLightColor _lmpCol; - _objLightPoint setLightBrightness _brtns; - _objLightPoint setLightAmbient _lmpCol; + + _brtns = [_plyr,_x] call axe_lightBrightness; + while{true}do{sleep .1;if (_x animationPhase "Lights_1"==1) exitWith {};}; + + //axeDiagLog = format["HL:NEW HOUSE LIT:%1",_x]; + //publicVariable "axeDiagLog"; + + _objLightPoint = nearestObject [_x, "#lightpoint"]; + _pos = getPos _x; + _dir = getDir _x; + + if(_plyr distance _x < _lpRange)then{//If within create radius + [_lmpCol,_brtns,_lmpCol,getPos _x,_dir,[0,0,-1]] call axe_newLightPoint; + //_x setVariable ["axeHLight", 1, false]; }; - }else{ - deleteVehicle _objLightPoint; - _x setVariable ["axeHLight", 0, false]; + + _currLighting=_currLighting+1; + }; }; - }; - //axeDiagLog = "-------------------------------------------"; - _hsCount = _hsCount + 1; - } forEach _objHouse; - if(_debug)then{ - //axeDiagLog = format["HL:FINISHED: Time:%1 | Total Houses:%2 | Lit Houses:%3",time - _hsTime,_hsCount,_litCount]; + + }forEach _notLitHouses; + + }else{ + //axeDiagLog = format["House Limit Reached(%3): Max:%1 | Count:%2",_maxHouses,count _litHouses,name player]; //publicVariable "axeDiagLog"; }; + + if(count _litHouses > 0 )then{ + { + _objLightPoint = nearestObject [_x, "#lightpoint"]; + _pos = getPos _x; + if((abs ([_pos, _objLightPoint] call BIS_fnc_distance2D))<_hsLPDist)then{//In House + + if(_plyr distance _x < _lpRange)then{//If within range and outside band + _brtns = [_plyr,_x] call axe_lightBrightness; + _objLightPoint enableSimulation false;//Attempt to stop Arma from broadcasting lightpoint, just reminding it here ! DO NOT USE ! Will stop light from being visible to player (At least upon creation) ! + _objLightPoint setLightColor _lmpCol; + _objLightPoint setLightBrightness _brtns; + _objLightPoint setLightAmbient _lmpCol; + //_x setVariable ["axeHLight", 1, false]; + //axeDiagLog = format["HL:Resetting brightness (%3) of house %1 for player %2 at %4m distance",_x,player,_brtns,_x distance player]; + //publicVariable "axeDiagLog"; + }else{//If outside create radius delete light that IS in house + + //axeDiagLog = format["HL:Deleteing old light %1 for %2 ",_objLightPoint,name player]; + //publicVariable "axeDiagLog"; + deleteVehicle _objLightPoint;//Clean up lightpoints as player leaves area. + + }; + + }else{ + if(_plyr distance _x < _lpRange)then{//If within create radius recreate lightpoint (after logging) + _brtns = [_plyr,_x] call axe_lightBrightness; + [_lmpCol,_brtns,_lmpCol,getPos _x,_dir,[0,0,-2.6]] call axe_newLightPoint; + //axeDiagLog = format["HL:Recreating light %1 for %2 ",_x,name player]; + //publicVariable "axeDiagLog"; + }; + }; + + }forEach _litHouses; + }; + +}else{ +_houseNum = 0; }; +//axeDiagLog = format["HL:EXIT: Max Houses%1", _maxHouses]; +//publicVariable "axeDiagLog"; +_houseNum diff --git a/SQF/dayz_code/compile/local_lights_init.sqf b/SQF/dayz_code/compile/local_lights_init.sqf index 3ceaeaad4..fc0699aa6 100644 --- a/SQF/dayz_code/compile/local_lights_init.sqf +++ b/SQF/dayz_code/compile/local_lights_init.sqf @@ -1,109 +1,153 @@ /* DayZ Epoch Lighting System - Light Init - Made for DayZ Epoch by axeman please ask permission to use/edit/distribute email gregory.andrew@gmail.com or vbawol@veteranbastards.com. - - To Do - Light poles - Automatic lighting for bases (with or without generator) - Menu action to switch off house and tower lights - Add sparks and electrical sound - Add slight randomness to 'reliable' light source - Try and use ASC_EU lights for map based streetlights so they have bulbs and look better - Towers within 20m of 3 house light sources may not always light up - Add Custom (enterable) buildings and items (water pump). Maybe create brighter house lightpoints at further distances to compensate for engine limits. - Wishlist - Detect weather to make lights fail in thunder :) + Made for DayZ Epoch by axeman please ask permission to use/edit/distribute email gregory.andrew@gmail.com. + */ -private ["_sunrise","_slpTime","_lpRange","_hsRange","_nrGen","_genCount","_rndLightsIn","_rndLightsOut","_genClass","_doHouse","_doTower","_doLight","_fnHr","_stHr","_plyr","_ndGen","_trgRng","_rngPlyr","_lightTrig","_lmpCol"]; -//Start / Stop Time -_stHr = _this select 0; -_fnHr = _this select 1; -_doHouse = _this select 2; -_doTower = _this select 3; -_ndGen = _this select 4; -_rndLightsIn = _this select 5; -_trgRng = _this select 6; -_rngPlyr = _this select 7; -_lmpCol = _this select 8; -_genClass = _this select 9; -_slpTime = _this select 10; -_lpRange = _rngPlyr -20; -_doLight = true; -_nrGen = []; -_genCount = 0; -_hsRange = 250; -_lightTrig = vehicle player;//Central point around which to run the lights -call compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_lightFunctions.sqf"; -axeTowerLights = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_lights_tower.sqf"; -axeHouseLights = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_lights_house.sqf"; -//axeStreetLights = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_lights_street.sqf"; -axeDeleteLights = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_lights_off.sqf"; -waitUntil {getPos Player select 0 > 0}; +if(!isDedicated)then{ + private ["_plyPos","_sunrise","_slpTime","_lpRange","_hsRange","_nrGen","_genCount","_rndLights","_genClass","_doHouse","_doTower","_doLight","_fnHr","_stHr","_plyr","_ndGen","_trgRng","_rngPlyr","_lightTrig","_lmpCol","_houseNum"]; -//Detect Dusk and Dawn -_sunrise = call world_sunRise; -if(_fnHr < 1)then{_fnHr = _sunrise + 0.5;}; -if(_stHr < 1)then{_stHr = (24 - _sunrise) - 0.5;}; + //Start / Stop Time + _doHouse = true; + _doTower = true; + _noStreetLights = true; + _ndGen = _this select 0; + _rndLights = _this select 1;//Default 12 + if(_rndLights<1)exitWith{};//EXIT + _trgRng = 280;//Distance from Gen + _rngPlyr = 480;//Distance from Player + _lmpCol = [0.698, 0.556, 0.419];//Light colour + _genClass = "Generator_DZ"; + _slpTime = 6; + _doLight = true; + _nrGen = []; + _genCount = 0; + _hsRange = 250;//set var + _houseNum = 0;//Monitor house numbers in range.. Pass around and reduce range if too many and/or client lag (NOT server / client lag) + _lightTrig = vehicle player;//Central point around which to run the lights + _plyPos = [0,0,0]; + call compile preprocessFileLineNumbers "lights\fn_lightFunctions.sqf"; + axeTowerLights = compile preprocessFileLineNumbers "lights\local_lights_tower.sqf"; + axeHouseLights = compile preprocessFileLineNumbers "lights\local_lights_house.sqf"; -//axeDiagLog = format["IL:LIGHTS STARTED: _stHr:%1 | _fnHr:%2 | time:%3 | for:%4",_stHr,_fnHr, dayTime, vehicle player]; -//publicVariable "axeDiagLog"; - -while {alive player}do{ - if(daytime<_fnHr||daytime>_stHr)then{ - _plyr = vehicle player; - _rndLightsOut = _rndLightsIn; - _nrGen = nearestObjects [_plyr, [_genClass], _rngPlyr]; - _genCount = count _nrGen; - - //Set Generator to use and Assign trigger object - _lightTrig = _plyr; - if(_genCount>0)then{ - { - if(_x getVariable["GeneratorRunning",false])then{ - _lightTrig = _x; - }; - }forEach _nrGen; - }; - - if(!_ndGen)then{_lightTrig = _plyr;}; - - //Nearby Generator ? - if(_ndGen && _genCount<1)then{_doLight = false;}else{_doLight=true;}; - - //Generator not required ! - if(!_ndGen)then{_doLight = true;}; - - //Choose range, player or generator - if(_ndGen)then{_hsRange = _trgRng;}else{_hsRange = _rngPlyr;}; - - //100% chance of lights with nearby generator - ToDo, make this slightly lower. - if(_genCount>0&&(_lightTrig getVariable["GeneratorRunning",false]))then{ - _rndLightsOut = 100; - }; - - //Do streetlight stuff - [_trgRng,player,_rndLightsOut] call axe_returnStreetLights; - - if(_ndGen && !(_lightTrig getVariable["GeneratorRunning",false]))then{_doLight = false;};//Final check - Not run if nearest gen isn't running - - //axeDiagLog = format["IL:RUNNING: _doLight:%1 | _ndGen:%2 | _lightTrig:%3 | _rndLightsOut:%4",_doLight,_ndGen,_lightTrig,_rndLightsOut]; + waitUntil {getPos Player select 0 > 0}; + + //Detect Dusk and Dawn + _sunrise = call world_sunRise; + _fnHr = _sunrise + 0.5; + _stHr = (24 - _sunrise) - 0.5; + if(_rndLights>75)then{_rndLights=75;};//Max allowed + //axeDiagLog = format["IL:LIGHTS STARTED: _stHr:%1 | _fnHr:%2 | time:%3 | for:%4",_stHr,_fnHr, dayTime, vehicle player]; //publicVariable "axeDiagLog"; + + while {alive player}do{ + if(daytime<_fnHr||daytime>_stHr)then{ + _plyr = vehicle player; + //if(_plyPos distance _plyr > 6)then{//Only run if player moves + _lightTrig = _plyr; - if(_doLight)then{ - //if(speed _plyr > 0 )then{ - if(_doHouse)then{ - //axeDiagLog = format["IL:RUNNING HOUSE: _doLight:%1 | _ndGen:%2 | _lightTrig:%3 | _rndLightsOut:%4",_doLight,_ndGen,_lightTrig,_rndLightsOut]; - //publicVariable "axeDiagLog"; - [_hsRange,_lightTrig,_rndLightsOut,_lmpCol,_lpRange] call axeHouseLights; - }; - //}; - if(_doTower)then{ - //axeDiagLog = format["IL:RUNNING TOWER: _doLight:%1 | _ndGen:%2 | _lightTrig:%3 | _rndLightsOut:%4",_doLight,_ndGen,_lightTrig,_rndLightsOut]; - //publicVariable "axeDiagLog"; - [_rngPlyr,_lightTrig,_rndLightsOut] call axeTowerLights; + if(_ndGen)then{ + _nrGen = nearestObjects [_plyr, [_genClass], _rngPlyr]; + _genCount = count _nrGen; + + //Set Generator to use and Assign trigger object + + if(_genCount>0)then{ + { + if(_x getVariable["GeneratorRunning",false])exitWith{ + _lightTrig = _x; + }; + }forEach _nrGen; }; }; - //Decide how and if to turn lights off - if(_ndGen && !(_lightTrig getVariable["GeneratorRunning",false]))then{ - [_rngPlyr,_lightTrig,false,_genCount,_lpRange] call axeDeleteLights; + //if(!_ndGen)then{_lightTrig = _plyr;}; + + //Nearby Generator ? + if(_ndGen && _genCount<1)then{_doLight = false;}else{_doLight=true;}; + + //Generator not required ! + if(!_ndGen)then{_doLight = true;}; + + //Choose range, player or generator + if(_ndGen)then{_hsRange = _trgRng;}else{_hsRange = _rngPlyr;}; + + //100% chance of lights with nearby generator - ToDo, make this slightly lower. + if(_ndGen && _genCount>0&&(_lightTrig getVariable["GeneratorRunning",false]))then{ + _rndLights = 75; }; - if(_rndLightsOut 0 )then{ + if(_doHouse)then{ + //axeDiagLog = format["IL:RUNNING HOUSE: _doLight:%1 | _ndGen:%2 | _lightTrig:%3 | _rndLights:%4",_doLight,_ndGen,_lightTrig,_rndLights]; + //publicVariable "axeDiagLog"; + _houseNum = [_hsRange,_lightTrig,_rndLights,_lmpCol,_plyr,_houseNum] call axeHouseLights; + }; + //}; + if(_doTower)then{ + //axeDiagLog = format["IL:RUNNING TOWER: _doLight:%1 | _ndGen:%2 | _lightTrig:%3 | _rndLights:%4",_doLight,_ndGen,_lightTrig,_rndLights]; + //publicVariable "axeDiagLog"; + [_rngPlyr,_lightTrig,_rndLights] call axeTowerLights; + }; + + if(_noStreetLights)then{ + [player,_rngPlyr] call axe_NoStreetLights + }; + }; + //}; + _plyPos = getPos player; + }; + sleep _slpTime; + }; }; +//Attempt a server cleanup - Not detectable.. +/* +if(isServer)then{ + + server_spawnCleanLightpoints = { + private ["_pos","_delQtyLights","_qty","_missonLights","_nearby","_missionObjs"]; + if(!isNil "DZE_DYN_cleanLightpoints") exitWith { }; + DZE_DYN_cleanLightpoints = true; + _missonLights = entities "#lightpoint"; + _missionObjs = allMissionObjects "#lightpoint"; + diag_log (format["CLEANUP: Attempting Cleanup of Lights out of %1 or %2",count _missonLights, count _missionObjs]); + _delQtyLights = 0; + { + if (local _x) then { + _x call dayz_perform_purge; + sleep 0.025; + _delQtyLights = _delQtyLights + 1; + } else { + if (!alive _x) then { + _pos = getPosATL _x; + if (count _pos > 0) then { + _nearby = {(isPlayer _x) and (alive _x)} count (_pos nearEntities [["CAManBase","AllVehicles"], 420]);//Use calculated range here. + if (_nearby==0) then { + _x call dayz_perform_purge; + sleep 0.025; + _delQtyLights = _delQtyLights + 1; + }; + }; + }; + }; + sleep 0.001; + } forEach _missonLights; + if (_delQtyLights > 0) then { + _qty = count _missonLights; + diag_log (format["CLEANUP: Deleted %1 Lights out of %2",_delQtyLights,_qty]); + }; + DZE_DYN_cleanLightpoints = nil; + }; + + while{true}do{ + [] spawn server_spawnCleanLightpoints; + sleep 30; + }; +}; +*/ diff --git a/SQF/dayz_code/compile/local_lights_tower.sqf b/SQF/dayz_code/compile/local_lights_tower.sqf index 9f426aae8..215f2a862 100644 --- a/SQF/dayz_code/compile/local_lights_tower.sqf +++ b/SQF/dayz_code/compile/local_lights_tower.sqf @@ -1,6 +1,6 @@ /* DayZ Epoch Lighting System - Illuminant Tower Lights - Made for DayZ Epoch by axeman please ask permission to use/edit/distribute email gregory.andrew@gmail.com or vbawol@veteranbastards.com. + Made for DayZ Epoch by axeman please ask permission to use/edit/distribute email gregory.andrew@gmail.com. */ private ["_nrTowers","_nrstTrig","_lCol","_lbrt","_lamb","_twrCl"]; _nrstTrig = _this select 1; @@ -8,12 +8,10 @@ _lCol = [1, 0.88, 0.73]; _lbrt = 0.04; _lamb = [1, 0.88, 0.73]; _twrCl = "Land_Ind_IlluminantTower"; -_nrTowers = nearestObjects [_nrstTrig, [_twrCl], 1000]; +_nrTowers = nearestObjects [_nrstTrig, [_twrCl], 600]; if(count _nrTowers >0)then{ { if((_x getVariable ["axeTLight", 0])<1)then{ - //axeDiagLog = format["TL: FOUND:%1",_x]; - //publicVariable "axeDiagLog"; [_lCol,_lbrt,_lamb,[_x],[true]] call axe_towerLight; _x setVariable ["axeTLight", 1, false]; }; diff --git a/Server Files/@DayZ_Epoch_Server/addons/dayz_server.pbo b/Server Files/@DayZ_Epoch_Server/addons/dayz_server.pbo index 228902c4b..fc63c0525 100644 Binary files a/Server Files/@DayZ_Epoch_Server/addons/dayz_server.pbo and b/Server Files/@DayZ_Epoch_Server/addons/dayz_server.pbo differ diff --git a/Server Files/MPMissions/DayZ_Epoch_1.Takistan/init.sqf b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/init.sqf index f9c96975e..6b4e04678 100644 --- a/Server Files/MPMissions/DayZ_Epoch_1.Takistan/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/init.sqf @@ -83,7 +83,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf index 90410cd16..3dfe0e723 100644 --- a/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf @@ -84,7 +84,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; diff --git a/Server Files/MPMissions/DayZ_Epoch_12.isladuala/init.sqf b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/init.sqf index d35987271..72905d6c9 100644 --- a/Server Files/MPMissions/DayZ_Epoch_12.isladuala/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/init.sqf @@ -81,7 +81,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_13.Tavi/init.sqf b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/init.sqf index 390368266..7eabb4b00 100644 --- a/Server Files/MPMissions/DayZ_Epoch_13.Tavi/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/init.sqf @@ -85,7 +85,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_15.namalsk/init.sqf b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/init.sqf index 589768cdb..63852cef1 100644 --- a/Server Files/MPMissions/DayZ_Epoch_15.namalsk/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/init.sqf @@ -84,7 +84,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/init.sqf b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/init.sqf index c88878dab..c11b5b6f7 100644 --- a/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/init.sqf @@ -84,7 +84,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/init.sqf b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/init.sqf index 534fc2adb..c2389fba3 100644 --- a/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/init.sqf @@ -82,7 +82,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_18.Sara/init.sqf b/Server Files/MPMissions/DayZ_Epoch_18.Sara/init.sqf index 29a17985f..0ca0ce5ae 100644 --- a/Server Files/MPMissions/DayZ_Epoch_18.Sara/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_18.Sara/init.sqf @@ -82,7 +82,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/init.sqf b/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/init.sqf index dc71c6157..ea4cd62d1 100644 --- a/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/init.sqf @@ -81,7 +81,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_2.Utes/init.sqf b/Server Files/MPMissions/DayZ_Epoch_2.Utes/init.sqf index 8233b3cc1..f1c4a5851 100644 --- a/Server Files/MPMissions/DayZ_Epoch_2.Utes/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_2.Utes/init.sqf @@ -83,7 +83,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_20.fapovo/init.sqf b/Server Files/MPMissions/DayZ_Epoch_20.fapovo/init.sqf index 9e5e24f67..fe1b20519 100644 --- a/Server Files/MPMissions/DayZ_Epoch_20.fapovo/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_20.fapovo/init.sqf @@ -82,7 +82,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_21.Caribou/init.sqf b/Server Files/MPMissions/DayZ_Epoch_21.Caribou/init.sqf index aa7cb3fc1..9635704df 100644 --- a/Server Files/MPMissions/DayZ_Epoch_21.Caribou/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_21.Caribou/init.sqf @@ -82,7 +82,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/init.sqf b/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/init.sqf index b0b964e84..4fbc4148c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/init.sqf @@ -82,7 +82,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/init.sqf b/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/init.sqf index 1ef9a2e07..fa3dac31b 100644 --- a/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/init.sqf @@ -80,7 +80,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_24.Napf/init.sqf b/Server Files/MPMissions/DayZ_Epoch_24.Napf/init.sqf index d7f2addbb..492775cc5 100644 --- a/Server Files/MPMissions/DayZ_Epoch_24.Napf/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_24.Napf/init.sqf @@ -84,7 +84,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_25.sauerland/init.sqf b/Server Files/MPMissions/DayZ_Epoch_25.sauerland/init.sqf index 78e22c20f..b91c5a1a4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_25.sauerland/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_25.sauerland/init.sqf @@ -84,7 +84,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/init.sqf b/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/init.sqf index fcca02ce8..9dc4ae541 100644 --- a/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/init.sqf @@ -83,7 +83,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/init.sqf b/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/init.sqf index 8a6f39fe6..1d497d043 100644 --- a/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/init.sqf @@ -83,7 +83,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/init.sqf b/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/init.sqf index e5241afc4..385ccc4ba 100644 --- a/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/init.sqf @@ -82,7 +82,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_6.Dingor/init.sqf b/Server Files/MPMissions/DayZ_Epoch_6.Dingor/init.sqf index a1c95f379..56d7885d8 100644 --- a/Server Files/MPMissions/DayZ_Epoch_6.Dingor/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_6.Dingor/init.sqf @@ -83,7 +83,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_7.Lingor/init.sqf b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/init.sqf index c085ce19c..92b3b62c0 100644 --- a/Server Files/MPMissions/DayZ_Epoch_7.Lingor/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/init.sqf @@ -83,7 +83,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf b/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf index 71b9e4e80..b9afce144 100644 --- a/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf @@ -82,7 +82,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/init.sqf b/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/init.sqf index 08422fd86..bb5d5a550 100644 --- a/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/init.sqf @@ -82,7 +82,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather diff --git a/Server Files/MPMissions/TEMPLATE/init.sqf b/Server Files/MPMissions/TEMPLATE/init.sqf index b0e914753..38529e787 100644 --- a/Server Files/MPMissions/TEMPLATE/init.sqf +++ b/Server Files/MPMissions/TEMPLATE/init.sqf @@ -80,7 +80,7 @@ if (!isDedicated) then { [] execVM "\z\addons\dayz_code\system\antihack.sqf"; //Lights - //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather