diff --git a/dayz_code/actions/player_build.sqf b/dayz_code/actions/player_build.sqf index a4340a390..75196c745 100644 --- a/dayz_code/actions/player_build.sqf +++ b/dayz_code/actions/player_build.sqf @@ -22,20 +22,28 @@ _require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); _offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset"); +_isPole = (_classname == "Plastic_Pole_EP1_DZ"); + +_distance = 30; +if(_isPole) then { + _distance = 45; +}; + // check for near plot -_findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], 30]; +_findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance]; _findNearestPole = []; {if (alive _x) then {_findNearestPole set [(count _findNearestPole),_x];};} foreach _findNearestPoles; _IsNearPlot = count (_findNearestPole); +// If item is plot pole and another one exists within 45m +if(_isPole and _IsNearPlot > 0) exitWith { TradeInprogress = false; cutText ["Cannot build plot pole within 45m of an existing plot." , "PLAIN DOWN"]; }; + if(_IsNearPlot == 0) then { // Allow building of plot - if(_classname == "Plastic_Pole_EP1_DZ") then { - if({alive _x} count (nearestObjects[(vehicle player), ["Plastic_Pole_EP1_DZ"], 45]) == 0) then { - _canBuildOnPlot = true; - }; + if(_isPole) then { + _canBuildOnPlot = true; }; } else { @@ -50,14 +58,14 @@ if(_IsNearPlot == 0) then { // check if friendly to owner if(dayz_characterID == _ownerID) then { - // owner can build anything within his plot except other plots witin - if(_classname != "Plastic_Pole_EP1_DZ") then { + // owner can build anything within his plot except other plots + if(!_isPole) then { _canBuildOnPlot = true; }; } else { // disallow building plot - if(_classname != "Plastic_Pole_EP1_DZ") then { + if(!_isPole) then { _friendlies = player getVariable ["friendlyTo",[]]; // check if friendly to owner if(_ownerID in _friendlies) then { @@ -69,7 +77,7 @@ if(_IsNearPlot == 0) then { }; // _message -if(!_canBuildOnPlot) exitWith { TradeInprogress = false; cutText ["Building requires plot pole within 30m" , "PLAIN DOWN"]; }; +if(!_canBuildOnPlot) exitWith { TradeInprogress = false; cutText ["Building requires plot pole within 30m." , "PLAIN DOWN"]; }; _missing = ""; _hasrequireditem = true; @@ -162,7 +170,6 @@ if (_hasrequireditem) then { player allowDamage true; - // testing new way of finding building _buildings = nearestObjects [(vehicle player), ["Building"], 100]; { diff --git a/dayz_code/compile/building_spawnZombies.sqf b/dayz_code/compile/building_spawnZombies.sqf index 22dba4ba0..2a4996aa6 100644 --- a/dayz_code/compile/building_spawnZombies.sqf +++ b/dayz_code/compile/building_spawnZombies.sqf @@ -13,11 +13,11 @@ if (_canLoot) then { _unitTypes = getArray (_config >> "zombieClass"); _min = getNumber (_config >> "minRoaming"); _max = getNumber (_config >> "maxRoaming"); -//Walking Zombies + //Walking Zombies //_num = round(random _max) min _min; _num = (round(random _max)) max _min; _config = configFile >> "CfgBuildingLoot" >> _type; -//Get zombie class + //Get zombie class _zombieChance = getNumber (_config >> "zombieChance"); _rnd = random 1; diff --git a/dayz_code/compile/spawn_loot.sqf b/dayz_code/compile/spawn_loot.sqf index 53fca049e..f02ab71e7 100644 --- a/dayz_code/compile/spawn_loot.sqf +++ b/dayz_code/compile/spawn_loot.sqf @@ -4,8 +4,8 @@ _iClass = _this select 1; _iPos = _this select 2; _radius = _this select 3; -//_iPosZ = _iPos select 2; -//if( _iPosZ < 0 ) then { _iPos = [_iPos select 0,_iPos select 1,0]; }; +_iPosZ = _iPos select 2; +if( _iPosZ < 0 ) then { _iPos = [_iPos select 0,_iPos select 1,0]; }; switch (_iClass) do { default { diff --git a/dayz_code/compile/zombie_generate.sqf b/dayz_code/compile/zombie_generate.sqf index 5c480c3ac..84401e368 100644 --- a/dayz_code/compile/zombie_generate.sqf +++ b/dayz_code/compile/zombie_generate.sqf @@ -34,7 +34,9 @@ dayzSpawnZed = [_agent]; publicVariableServer "dayzSpawnZed"; if (_doLoiter) then { + _agent setDir round(random 180); _agent setPosATL _position; + _agent setvelocity [0, 0, 1]; //_agent setVariable ["doLoiter",true,true]; } else { _agent setVariable ["doLoiter",false,true]; diff --git a/dayz_equip/models/oil_drum_model.p3d b/dayz_equip/models/oil_drum_model.p3d index 0b310fdfd..4538289ff 100644 Binary files a/dayz_equip/models/oil_drum_model.p3d and b/dayz_equip/models/oil_drum_model.p3d differ diff --git a/dayz_equip/textures/equip_oil_drum_model_ca.paa b/dayz_equip/textures/equip_oil_drum_model_ca.paa index 132b989b1..fb6d79ea4 100644 Binary files a/dayz_equip/textures/equip_oil_drum_model_ca.paa and b/dayz_equip/textures/equip_oil_drum_model_ca.paa differ diff --git a/dayz_equip/textures/equip_oildrum_e_CA.paa b/dayz_equip/textures/equip_oildrum_e_CA.paa index 5960388e4..344281a41 100644 Binary files a/dayz_equip/textures/equip_oildrum_e_CA.paa and b/dayz_equip/textures/equip_oildrum_e_CA.paa differ diff --git a/dayz_equip/textures/oildrum.rvmat b/dayz_equip/textures/oildrum.rvmat new file mode 100644 index 000000000..2f9bfb969 --- /dev/null +++ b/dayz_equip/textures/oildrum.rvmat @@ -0,0 +1,45 @@ +ambient[]={0.74650967,0.74192148,0.74213719,0.96900016}; +diffuse[]={1,1,1,0.92000002}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0.3764706,0.47843137,0.16078432,1}; +specularPower=100; +PixelShaderID="NormalMapSpecularDIMap"; +VertexShaderID="NormalMap"; +class Stage1 +{ + texture="dayz_equip\textures\oildrum_norm.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; +class Stage2 +{ + texture="dayz_equip\textures\oildrum_spec.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={0,0,0}; + up[]={0,0,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; + Filter="Point"; +}; +class Stage3 +{ + texture="#(ai,64,64,1)fresnel(2.68,3.69)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; diff --git a/dayz_equip/textures/oildrum_diffuse.paa b/dayz_equip/textures/oildrum_diffuse.paa new file mode 100644 index 000000000..f49f1789e Binary files /dev/null and b/dayz_equip/textures/oildrum_diffuse.paa differ diff --git a/dayz_equip/textures/oildrum_norm.paa b/dayz_equip/textures/oildrum_norm.paa new file mode 100644 index 000000000..af0a36f20 Binary files /dev/null and b/dayz_equip/textures/oildrum_norm.paa differ diff --git a/dayz_equip/textures/oildrum_spec.paa b/dayz_equip/textures/oildrum_spec.paa new file mode 100644 index 000000000..15273f97c Binary files /dev/null and b/dayz_equip/textures/oildrum_spec.paa differ diff --git a/dayz_server/init/server_functions.sqf b/dayz_server/init/server_functions.sqf index 9d9ae5648..54cd18564 100644 --- a/dayz_server/init/server_functions.sqf +++ b/dayz_server/init/server_functions.sqf @@ -275,9 +275,6 @@ spawn_vehicles = { _num = floor(random 4); _allCfgLoots = ["trash","civilian","food","generic","medical","military","policeman","hunter","worker","clothes","militaryclothes","specialclothes","trash"]; - - diag_log("DEBUG: spawing loot inside vehicle " + str(_allCfgLoots)); - for "_x" from 1 to _num do { _iClass = _allCfgLoots call BIS_fnc_selectRandom;