mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-03-01 11:11:52 +03:00
Update fn_lightFunctions.sqf
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
|
/*
|
||||||
|
DayZ Epoch Lighting System - Light Functions
|
||||||
|
Made for DayZ Epoch please ask permission to use/edit/distrubute email axeman@thefreezer.co.uk.
|
||||||
|
*/
|
||||||
axe_returnStreetLights={
|
axe_returnStreetLights={
|
||||||
private["_lights","_objName","_rng","_nrstGen"];
|
private["_lights","_objName","_rng","_nrstGen"];
|
||||||
_rng = _this select 0;
|
_rng = _this select 0;
|
||||||
_nrstGen = _this select 1;
|
_nrstGen = _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"];
|
_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=[];
|
axe_streetLamps=[];
|
||||||
axe_generators=[];
|
axe_generators=[];
|
||||||
{
|
{
|
||||||
@@ -22,7 +24,6 @@ axe_generators=[];
|
|||||||
} foreach nearestObjects [getPos _nrstGen, [], _rng];
|
} foreach nearestObjects [getPos _nrstGen, [], _rng];
|
||||||
[axe_streetLamps,axe_generators]
|
[axe_streetLamps,axe_generators]
|
||||||
};
|
};
|
||||||
|
|
||||||
axe_newLightPoint={
|
axe_newLightPoint={
|
||||||
private ["_lp","_pos","_col","_brt","_amb","_pos","_dir","_vect"];
|
private ["_lp","_pos","_col","_brt","_amb","_pos","_dir","_vect"];
|
||||||
_col = _this select 0;
|
_col = _this select 0;
|
||||||
@@ -31,14 +32,14 @@ _amb = _this select 2;
|
|||||||
_pos = _this select 3;
|
_pos = _this select 3;
|
||||||
_dir = _this select 4;
|
_dir = _this select 4;
|
||||||
_vect = _this select 5;
|
_vect = _this select 5;
|
||||||
_lp = "#lightpoint" createVehicle _pos;
|
_lp = "#lightpoint" createVehicleLocal _pos;
|
||||||
_lp setLightColor _col;
|
_lp setLightColor _col;
|
||||||
_lp setLightBrightness _brt;
|
_lp setLightBrightness _brt;
|
||||||
_lp setLightAmbient _amb;
|
_lp setLightAmbient _amb;
|
||||||
_lp setDir _dir;
|
_lp setDir _dir;
|
||||||
_lp setVectorUp _vect;
|
_lp setVectorUp _vect;
|
||||||
|
_lp
|
||||||
};
|
};
|
||||||
|
|
||||||
axe_lightPoint={
|
axe_lightPoint={
|
||||||
private ["_lp","_col","_brt","_amb"];
|
private ["_lp","_col","_brt","_amb"];
|
||||||
_col = _this select 0;
|
_col = _this select 0;
|
||||||
@@ -49,7 +50,6 @@ _lp setLightColor _col;
|
|||||||
_lp setLightBrightness _brt;
|
_lp setLightBrightness _brt;
|
||||||
_lp setLightAmbient _amb;
|
_lp setLightAmbient _amb;
|
||||||
};
|
};
|
||||||
|
|
||||||
axe_towerLight={
|
axe_towerLight={
|
||||||
private["_twr","_lCol","_lbrt","_lamb","_oset","_twrPos","_rad","_a","_b","_ang","_nrTLs","_doLit"];
|
private["_twr","_lCol","_lbrt","_lamb","_oset","_twrPos","_rad","_a","_b","_ang","_nrTLs","_doLit"];
|
||||||
_twr = _this select 3 select 0;
|
_twr = _this select 3 select 0;
|
||||||
@@ -82,20 +82,9 @@ _nrTLs= position _twr nearObjects ["#lightpoint",30];
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
DZE_getModelName = {
|
axe_TestMoveHC={
|
||||||
_objInfo = toArray(str(_this));
|
private ["_startPos","_currPos"];
|
||||||
_lenInfo = count _objInfo - 1;
|
_currPos = _this select 0;
|
||||||
_objName = [];
|
_startPos = [_currPos,50,180,20,0,800,0] call BIS_fnc_findSafePos;
|
||||||
_i = 0;
|
player setPosATL _startPos;
|
||||||
// determine where the object name starts
|
|
||||||
{
|
|
||||||
if (58 == _objInfo select _i) exitWith {};
|
|
||||||
_i = _i + 1;
|
|
||||||
} forEach _objInfo;
|
|
||||||
_i = _i + 2; // skip the ": " part
|
|
||||||
for "_k" from _i to _lenInfo do {
|
|
||||||
_objName = _objName + [_objInfo select _k];
|
|
||||||
};
|
|
||||||
_objName = toLower(toString(_objName));
|
|
||||||
_objName
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user