diff --git a/dayz_code/CfgMagazines.hpp b/dayz_code/CfgMagazines.hpp index 5facf1eed..1724349b4 100644 --- a/dayz_code/CfgMagazines.hpp +++ b/dayz_code/CfgMagazines.hpp @@ -715,7 +715,7 @@ class CfgMagazines { picture = "\z\addons\dayz_communityassets\pictures\equip_razor_CA.paa"; type = 256; }; - + class 8Rnd_B_Beneli_74Slug; class 8Rnd_B_Beneli_Pellets; diff --git a/dayz_code/actions/fill_startGenerator.sqf b/dayz_code/actions/fill_startGenerator.sqf new file mode 100644 index 000000000..5b94b1d6f --- /dev/null +++ b/dayz_code/actions/fill_startGenerator.sqf @@ -0,0 +1,66 @@ +private ["_vehicle","_started","_finished","_animState","_isMedic"]; + +if(TradeInprogress) exitWith { cutText ["Refuel already in progress." , "PLAIN DOWN"] }; +TradeInprogress = true; + +// Use target from addaction +_vehicle = _this select 3; + +// force animation +player playActionNow "Medic"; + +r_interrupt = false; +_animState = animationState player; +r_doLoop = true; +_started = false; +_finished = false; + +cutText ["Preparing to fuel and start generator, move to cancel.", "PLAIN DOWN"]; + +[player,50,true,(getPosATL player)] spawn player_alertZombies; + +while {r_doLoop} do { + _animState = animationState player; + _isMedic = ["medic",_animState] call fnc_inString; + if (_isMedic) then { + _started = true; + }; + if (_started and !_isMedic) then { + r_doLoop = false; + _finished = true; + }; + if (r_interrupt) then { + r_doLoop = false; + }; + sleep 0.1; +}; +r_doLoop = false; + +if(!_finished) then { + r_interrupt = false; + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + cutText ["Canceled refuel." , "PLAIN DOWN"] +}; + +if (_finished) then { + // take jerry can and replace with empty + if(([player,"ItemJerrycan"] call BIS_fnc_invRemove) == 1) then { + player addMagazine "ItemJerrycanEmpty"; + // Start generator + _vehicle setVariable ["GeneratorRunning", true,true]; + + // Sound_Generator1 + // Looks like this was the entended way of making the sound, lets test + _classname = "Sound_Generator1"; + + _location = (getPosATL _vehicle); + + _tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; + + // TODO: Add running sounds to generator + cutText ["Generator has been started.", "PLAIN DOWN"]; + }; +}; + +TradeInprogress = false; \ No newline at end of file diff --git a/dayz_code/actions/player_build.sqf b/dayz_code/actions/player_build.sqf index 70e6442fd..afed687e5 100644 --- a/dayz_code/actions/player_build.sqf +++ b/dayz_code/actions/player_build.sqf @@ -7,6 +7,7 @@ _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animati _isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming; _cancel = false; _reason = ""; +_canBuildOnPlot = false; call gear_ui_init; @@ -14,9 +15,6 @@ if(_isWater) exitWith {TradeInprogress = false; cutText [localize "str_player_26 if(_onLadder) exitWith {TradeInprogress = false; cutText [localize "str_player_21", "PLAIN DOWN"];}; if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText ["Cannot build while in combat.", "PLAIN DOWN"];}; - - - _item = _this; _classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create"); _require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require"); @@ -24,13 +22,56 @@ _require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); _offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset"); -// Allow building of plot -if(_classname == "Plastic_Pole_EP1_DZ") then { - _IsNearPlot = 1; +// check for near plot +_findNearestPole = [player, ["Plastic_Pole_EP1_DZ"], 30]; + +_IsNearPlot = count (_findNearestPole); + +if(_IsNearPlot == 0) then { + + // Allow building of plot + if(_classname == "Plastic_Pole_EP1_DZ") then { + if(count ([player, ["Plastic_Pole_EP1_DZ"], 60]) == 0) then { + _canBuildOnPlot = true; + }; + }; + } else { - _IsNearPlot = count (position player nearObjects ["Plastic_Pole_EP1_DZ",30]); + // Since there are plots nearby we check for ownership and then for friend status + + // select closest pole + _nearestPole = _findNearestPole select 0; + + // Find owner + _ownerID = _nearestPole getVariable["CharacterID","0"]; + + // check if friendly to owner + if(dayz_characterID == _ownerID) then { + // owner can build anything within his plot + + if(_classname == "Plastic_Pole_EP1_DZ") then { + if(count ([player, ["Plastic_Pole_EP1_DZ"], 30]) == 0) then { + _canBuildOnPlot = true; + }; + } else { + _canBuildOnPlot = true; + }; + + } else { + // not the owner so check if user is friendly to owner. + + _friendlies = player getVariable ["friendlies",[]]; + // check if friendly to owner + if(_ownerID in _friendlies) then { + if(_classname != "Plastic_Pole_EP1_DZ") then { + _canBuildOnPlot = true; + }; + }; + }; }; -if(_IsNearPlot == 0) exitWith { TradeInprogress = false; cutText ["Building requires plot within 30m" , "PLAIN DOWN"]; }; + + +if(!_canBuildOnPlot) exitWith { TradeInprogress = false; cutText ["Building requires plot within 30m" , "PLAIN DOWN"]; }; _missing = ""; _hasrequireditem = true; diff --git a/dayz_code/actions/pzombie/pz_vision.sqf b/dayz_code/actions/pzombie/pz_vision.sqf index 188ff8df3..c2747c4d7 100644 --- a/dayz_code/actions/pzombie/pz_vision.sqf +++ b/dayz_code/actions/pzombie/pz_vision.sqf @@ -6,7 +6,12 @@ _id = _this select 2; _gen removeAction _id; -_NV = player getvariable "NV"; +// get first rbg + m +_NV1 = player getvariable ["NV1",[1.8,-1.5,-0.5,0]]; +_NV2 = player getvariable ["NV2",[2.4,0.6,0.3,-0.3]]; +_NV3 = player getvariable ["NV3",[-0.6,0.8,0.3,0.6]]; + +_NV = player getvariable ["NV", ["OFF", 0.1]]; _NVOn = (_NV select 0); _OldAperture = (_NV select 1); @@ -17,22 +22,34 @@ exitwith ppEffectDestroy ppColor; ppEffectDestroy ppBlur; player setvariable ["NV",["OFF",_oldAperture]]; - player addAction ["Night Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 0, false, true, "nightVision", "_this == _target"]; + player addAction ["Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 0, false, true, "nightVision", "_this == _target"]; }; ppEffectDestroy ppColor; ppEffectDestroy ppBlur; + ppColor = ppEffectCreate ["ColorCorrections", 1999]; ppColor ppEffectEnable true; -ppColor ppEffectAdjust [1, 1, 0, [0.4, 1, 0.4, 0], [0.4, 1, 0.4, 0.0], [0.4, 1, 0.4, 1.0]]; +ppColor ppEffectAdjust [1, 1, 0, _NV1, _NV2, _NV3]; ppColor ppEffectCommit 0; +/* +ppInversion = ppEffectCreate ['colorInversion', 2555]; +ppInversion ppEffectEnable false; +ppInversion ppEffectAdjust [1,1,1]; +ppInversion ppEffectCommit 0; +*/ + +diag_log format ["DEBUG: Aperture : %1 First %2 Second %3 Third %4", _OldAperture, _NV1,_NV2,_NV3]; + + ppBlur = ppEffectCreate ["dynamicBlur", 505]; ppBlur ppEffectEnable true; ppBlur ppEffectAdjust [.2]; ppBlur ppEffectCommit 0; + aperture = 0.0001; while { aperture < _oldAperture } do { @@ -42,7 +59,12 @@ while { aperture < _oldAperture } do }; + player setVariable ["NV", ["ON", _oldAperture]]; +player setVariable ["NV1",_NV1]; +player setVariable ["NV2",_NV2]; +player setVariable ["NV3",_NV3]; + player addAction ["Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 0, false, true, "nightVision", "_this == _target"]; exit; \ No newline at end of file diff --git a/dayz_code/actions/pzombie/pz_vision_ap.sqf b/dayz_code/actions/pzombie/pz_vision_ap.sqf new file mode 100644 index 000000000..59d0561c9 --- /dev/null +++ b/dayz_code/actions/pzombie/pz_vision_ap.sqf @@ -0,0 +1,28 @@ +private ["_gen","_caller","_id","_NV","_NVOn","_OldAperture"]; + +_gen = _this select 0; +_caller = _this select 1; +_id = _this select 2; + +// _gen removeAction _id; + +// array from tweaking settings +_new = _this select 3; +_inc = _new select 0; + +// get Aperture +_NV = player getvariable ["NV",["OFF", 0.1]]; + +_newap = (_NV select 1)+_inc; + +_NVOn = (_NV select 0); + +if(_NVOn == "ON") then { + + setAperture _newap; + + player setVariable ["NV", ["OFF", _newap]]; +} else { + player setVariable ["NV", ["ON", _newap]]; +}; +cutText [format["%1 %2","NV",_newap], "PLAIN DOWN"]; \ No newline at end of file diff --git a/dayz_code/actions/pzombie/pz_vision_rbg1.sqf b/dayz_code/actions/pzombie/pz_vision_rbg1.sqf new file mode 100644 index 000000000..30bb2036e --- /dev/null +++ b/dayz_code/actions/pzombie/pz_vision_rbg1.sqf @@ -0,0 +1,55 @@ +private ["_gen","_caller","_id","_NV","_NVOn","_OldAperture"]; + +_gen = _this select 0; +_caller = _this select 1; +_id = _this select 2; + +// _gen removeAction _id; + +// array from tweaking settings +_new = _this select 3; + +_NVx = _new select 0; + +// get first rbg + m +_NV = player getvariable [_NVx,[0.0, 0.0, 0.0, 0.0]]; + +_increase = (_new select 1); + +_index = 0; +{ + _NV set [_index,(_NV select _index) + _x]; + + _index =_index + 1; +} forEach _increase; + +// set rgb + m +player setVariable [_NVx, _NV]; +cutText [format["%1 %2",_NVx,_NV], "PLAIN DOWN"]; + +_NV = player getvariable ["NV",["OFF", 0.1]]; +_NVOn = (_NV select 0); +_newap = (_NV select 1); + +if(_NVOn == "ON") then { + + _NV1 = player getvariable ["NV1",[0,0,0,0]]; + _NV2 = player getvariable ["NV2",[0,0,0,0]]; + _NV3 = player getvariable ["NV3",[0,0,0,0]]; + + ppEffectDestroy ppColor; + ppEffectDestroy ppBlur; + + ppColor = ppEffectCreate ["ColorCorrections", 1999]; + ppColor ppEffectEnable true; + ppColor ppEffectAdjust [1, 1, 0, _NV1, _NV2, _NV3]; + ppColor ppEffectCommit 0; + + diag_log format ["DEBUG: Aperture : %1 First %2 Second %3 Third %4", _newap, _NV1,_NV2,_NV3]; + + player setVariable ["NV", ["OFF", _newap]]; +} else { + player setVariable ["NV", ["ON", _newap]]; +}; + +exit; \ No newline at end of file diff --git a/dayz_code/actions/remove.sqf b/dayz_code/actions/remove.sqf index 6a032c610..687de2009 100644 --- a/dayz_code/actions/remove.sqf +++ b/dayz_code/actions/remove.sqf @@ -12,20 +12,48 @@ _proceed = false; _objType = typeOf _obj; _limit = 5; - if(isNumber (configFile >> "CfgVehicles" >> _objType >> "constructioncount")) then { _limit = getNumber(configFile >> "CfgVehicles" >> _objType >> "constructioncount"); }; +_findNearestPole = [player, ["Plastic_Pole_EP1_DZ"], 30]; +_IsNearPlot = count (_findNearestPole); + +if(_IsNearPlot >= 1) then { + + _nearestPole = _findNearestPole select 0; + + // Find owner + _ownerID = _nearestPole getVariable["CharacterID","0"]; + + // check if friendly to owner + if(dayz_characterID != _ownerID) then { + + _friendlies = player getVariable ["friendlies",[]]; + // check if friendly to owner + if(!(_ownerID in _friendlies)) then { + _limit = round(_limit*2); + }; + }; +}; + + + cutText [format["Starting de-construction of %1.",_objType], "PLAIN DOWN"]; // Alert zombies once. -_id = [player,50,true,(getPosATL player)] spawn player_alertZombies; +[player,50,true,(getPosATL player)] spawn player_alertZombies; // Start de-construction loop _counter = 0; while {_isOk} do { + // if object no longer exits this should return true. + if(isNull(_obj)) exitWith { + _isOk = false; + _proceed = false; + }; + player playActionNow "Medic"; _dis=20; [player,_dis,true,(getPosATL player)] spawn player_alertZombies; @@ -51,6 +79,7 @@ while {_isOk} do { if (r_interrupt) then { r_doLoop = false; }; + sleep 0.1; }; @@ -75,29 +104,35 @@ while {_isOk} do { // Remove only if player waited if (_proceed) then { - cutText [format["De-constructing %1.",_objType], "PLAIN DOWN"]; - //["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure; - dayzDeleteObj = [_objectID,_objectUID]; - publicVariableServer "dayzDeleteObj"; + // Double check that object is not null + if(!isNull(_obj)) then { + cutText [format["De-constructing %1.",_objType], "PLAIN DOWN"]; + + //["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure; + dayzDeleteObj = [_objectID,_objectUID]; + publicVariableServer "dayzDeleteObj"; - deleteVehicle _obj; + deleteVehicle _obj; - // give refund items - _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); - if((count _selectedRemoveOutput) > 0) then { - // Put items - { - _itemOut = _x select 0; - _countOut = _x select 1; - diag_log format["Removal Output: %1 %2", _itemOut,_countOut]; + // give refund items + _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); + if((count _selectedRemoveOutput) > 0) then { + // Put items + { + _itemOut = _x select 0; + _countOut = _x select 1; + diag_log format["Removal Output: %1 %2", _itemOut,_countOut]; - for "_x" from 1 to _countOut do { - player addMagazine _itemOut; - }; + for "_x" from 1 to _countOut do { + player addMagazine _itemOut; + }; - } forEach _selectedRemoveOutput; - cutText ["De-constructed parts are now in your inventory.", "PLAIN DOWN"]; + } forEach _selectedRemoveOutput; + cutText ["De-constructed parts are now in your inventory.", "PLAIN DOWN"]; + }; + } else { + cutText ["Failed object not longer exists.", "PLAIN DOWN"]; }; } else { diff --git a/dayz_code/actions/trade_any_vehicle.sqf b/dayz_code/actions/trade_any_vehicle.sqf index d9dc9728d..6fd33abab 100644 --- a/dayz_code/actions/trade_any_vehicle.sqf +++ b/dayz_code/actions/trade_any_vehicle.sqf @@ -116,23 +116,29 @@ if (_qty >= _qty_in) then { cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; } else { - // Sell Vehicle - for "_x" from 1 to _qty_out do { - player addMagazine _part_out; + + if((damage _obj) >= 0.75) then { + // Sell Vehicle + for "_x" from 1 to _qty_out do { + player addMagazine _part_out; + }; + + _obj = _obj select 0; + _objectID = _obj getVariable ["ObjectID","0"]; + _objectUID = _obj getVariable ["ObjectUID","0"]; + + //["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure; + dayzDeleteObj = [_objectID,_objectUID]; + publicVariableServer "dayzDeleteObj"; + + deleteVehicle _obj; + + cutText [format[("Sold %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; + } else { + _dampercent = (damage _obj) * 100; + cutText [format[("Cannot sell %1 it is %2% damaged and cannot be sold under 75%."),_textPartIn,_dampercent], "PLAIN DOWN"]; }; - _obj = _obj select 0; - _objectID = _obj getVariable ["ObjectID","0"]; - _objectUID = _obj getVariable ["ObjectUID","0"]; - - //["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure; - dayzDeleteObj = [_objectID,_objectUID]; - publicVariableServer "dayzDeleteObj"; - - deleteVehicle _obj; - - cutText [format[("Sold %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; - }; {player removeAction _x} forEach s_player_parts;s_player_parts = []; diff --git a/dayz_code/cfgLoot.hpp b/dayz_code/cfgLoot.hpp index 40ab741af..327521ffa 100644 --- a/dayz_code/cfgLoot.hpp +++ b/dayz_code/cfgLoot.hpp @@ -32,7 +32,8 @@ class CfgLoot { "2Rnd_shotgun_74Pellets", "ItemBandage", "ItemPainkiller", - "FoodBioMeat" + "FoodBioMeat", + "8Rnd_9x18_Makarov" }, { 0.09, @@ -50,6 +51,7 @@ class CfgLoot { 0.05, 0.06, 0.06, + 0.01, 0.01 } }; @@ -221,7 +223,10 @@ class CfgLoot { "HandChemBlue", "HandChemRed", "ItemHeatPack", - "FoodMRE" + "FoodMRE", + "8Rnd_9x18_MakarovSD", + "20Rnd_B_765x17_Ball", + "30Rnd_9x19_UZI_SD" }, { 0.18, @@ -260,7 +265,10 @@ class CfgLoot { 0.02, 0.02, 0.04, - 0.03 + 0.03, + 0.01, + 0.04, + 0.01, } }; policeman[] = { @@ -373,6 +381,10 @@ class CfgLoot { "Skin_Soldier_Sniper_PMC_DZ", "Skin_Soldier_Bodyguard_AA12_PMC_DZ", "Skin_CZ_Special_Forces_GL_DES_EP1_DZ", + "Skin_FR_OHara_DZ", + "Skin_FR_Rodriguez_DZ", + "Skin_CZ_Soldier_Sniper_EP1_DZ", + "Skin_Graves_Light_DZ" }, { 0.03, // "Skin_Camo1_DZ", @@ -384,6 +396,10 @@ class CfgLoot { 0.02, // Skin_Soldier_Sniper_PMC_DZ 0.02, // Skin_Soldier_Bodyguard_AA12_PMC_DZ 0.02, // Skin_CZ_Special_Forces_GL_DES_EP1_DZ + 0.01, // "Skin_FR_OHara_DZ", + 0.01, // "Skin_FR_Rodriguez_DZ", + 0.01, // "Skin_CZ_Soldier_Sniper_EP1_DZ", + 0.01, // "Skin_Graves_Light_DZ" } }; specialclothes[] = { diff --git a/dayz_code/cfgVehicles.hpp b/dayz_code/cfgVehicles.hpp index 298b31590..5d4bc6e4f 100644 --- a/dayz_code/cfgVehicles.hpp +++ b/dayz_code/cfgVehicles.hpp @@ -887,7 +887,59 @@ class Citizen1; // External class reference weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072"; canHideBodies = 1; }; - + class FR_OHara; + class FR_OHara_DZ: FR_OHara { + displayName = "Jungle Camo"; + side = 1; + weapons[] = {"Throw","Put"}; + backpack = ""; + magazines[] = {}; + respawnWeapons[] = {"Throw","Put"}; + respawnMagazines[] = {}; + weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072"; + canHideBodies = 1; + canCarryBackPack = 1; + }; + class FR_Rodriguez; + class FR_Rodriguez_DZ: FR_Rodriguez { + displayName = "Gunner Outfit"; + side = 1; + weapons[] = {"Throw","Put"}; + backpack = ""; + magazines[] = {}; + respawnWeapons[] = {"Throw","Put"}; + respawnMagazines[] = {}; + weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072"; + canHideBodies = 1; + canCarryBackPack = 1; + }; + class CZ_Soldier_Sniper_EP1; + class CZ_Soldier_Sniper_EP1_DZ: CZ_Soldier_Sniper_EP1 { + displayName = "Desert Guille"; + side = 1; + weapons[] = {"Throw","Put"}; + backpack = ""; + magazines[] = {}; + respawnWeapons[] = {"Throw","Put"}; + respawnMagazines[] = {}; + weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072"; + canHideBodies = 1; + canCarryBackPack = 1; + }; + class Graves_Light; + class Graves_Light_DZ: Graves_Light { + displayName = "Urban Camo"; + side = 1; + weapons[] = {"Throw","Put"}; + backpack = ""; + magazines[] = {}; + respawnWeapons[] = {"Throw","Put"}; + respawnMagazines[] = {}; + weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072"; + canHideBodies = 1; + canCarryBackPack = 1; + }; + class BAF_Soldier_W; class Soldier1_DZ: BAF_Soldier_W { diff --git a/dayz_code/compile/fn_damageActions.sqf b/dayz_code/compile/fn_damageActions.sqf index c412f4179..8e89e6597 100644 --- a/dayz_code/compile/fn_damageActions.sqf +++ b/dayz_code/compile/fn_damageActions.sqf @@ -128,13 +128,13 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco //CAN WE REFUEL THE OBJECT? if ((fuel _unit < 1) and (_hasJerry or _hasBarrel)) then { r_action = true; - _action = _unit addAction [format[localize "str_actions_medical_10",_typeVeh], "\z\addons\dayz_code\actions\refuel.sqf",[_unit], 0, true, true, "", ""]; + _action = _unit addAction [format[localize "str_actions_medical_10",_typeVeh], "\z\addons\dayz_code\actions\refuel.sqf",[], 0, true, true, "", ""]; r_player_actions set [count r_player_actions,_action]; }; //CAN WE siphon fuel from THE OBJECT? if ((fuel _unit > 0) and (_hasJerryE or _hasBarrelE)) then { r_action = true; - _action = _unit addAction [format["Siphon fuel from %1",_typeVeh], "\z\addons\dayz_code\actions\siphonFuel.sqf",[_unit], 0, true, true, "", ""]; + _action = _unit addAction [format["Siphon fuel from %1",_typeVeh], "\z\addons\dayz_code\actions\siphonFuel.sqf",[], 0, true, true, "", ""]; r_player_actions set [count r_player_actions,_action]; }; diff --git a/dayz_code/compile/fn_selfActions.sqf b/dayz_code/compile/fn_selfActions.sqf index 16fd2bcd3..996621961 100644 --- a/dayz_code/compile/fn_selfActions.sqf +++ b/dayz_code/compile/fn_selfActions.sqf @@ -72,8 +72,38 @@ if(_isPZombie) then { if (s_player_pzombiesvision < 0) then { - player setVariable ["NV", ["OFF", 0.02]]; - s_player_pzombiesvision = player addAction ["Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 0, false, true, "nightVision", "_this == _target"]; + s_player_pzombiesvision = player addAction ["Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 4, false, true, "nightVision", "_this == _target"]; + + player addAction ["Aperture + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_ap.sqf", [0.1], 0, false, true, "", "_this == _target"]; + player addAction ["Aperture - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_ap.sqf", [-0.1], 0, false, true, "", "_this == _target"]; + + player addAction ["First R + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV1",[0.1,0,0,0]], 0, false, true, "", "_this == _target"]; + player addAction ["First R - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV1",[-0.1,0,0,0]], 0, false, true, "", "_this == _target"]; + player addAction ["First B + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV1",[0,0.1,0,0]], 0, false, true, "", "_this == _target"]; + player addAction ["First B - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV1",[0,-0.1,0,0]], 0, false, true, "", "_this == _target"]; + player addAction ["First G + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV1",[0,0,0.1,0]], 0, false, true, "", "_this == _target"]; + player addAction ["First G - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV1",[0,0,-0.1,0]], 0, false, true, "", "_this == _target"]; + player addAction ["First M + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV1",[0,0,0,0.1]], 0, false, true, "", "", "_this == _target"]; + player addAction ["First M - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV1",[0,0,0,-0.1]], 0, false, true, "", "", "_this == _target"]; + + player addAction ["Second R + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV2",[0.1,0,0,0]], 0, false, true, "", "_this == _target"]; + player addAction ["Second R - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV2",[-0.1,0,0,0]], 0, false, true, "", "_this == _target"]; + player addAction ["Second B + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV2",[0,0.1,0,0]], 0, false, true, "", "_this == _target"]; + player addAction ["Second B - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV2",[0,-0.1,0,0]], 0, false, true, "", "_this == _target"]; + player addAction ["Second G + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV2",[0,0,0.1,0]], 0, false, true, "", "_this == _target"]; + player addAction ["Second G - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV2",[0,0,-0.1,0]], 0, false, true, "", "_this == _target"]; + player addAction ["Second M + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV2",[0,0,0,0.1]], 0, false, true, "", "_this == _target"]; + player addAction ["Second M - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV2",[0,0,0,-0.1]], 0, false, true, "", "_this == _target"]; + + player addAction ["Third R + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV3",[0.1,0,0,0]], 0, false, true, "", "_this == _target"]; + player addAction ["Third R - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV3",[-0.1,0,0,0]], 0, false, true, "", "_this == _target"]; + player addAction ["Third B + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV3",[0,0.1,0,0]], 0, false, true, "", "_this == _target"]; + player addAction ["Third B - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV3",[0,-0.1,0,0]], 0, false, true, "", "_this == _target"]; + player addAction ["Third G + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV3",[0,0,0.1,0]], 0, false, true, "", "_this == _target"]; + player addAction ["Third G - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV3",[0,0,-0.1,0]], 0, false, true, "", "_this == _target"]; + player addAction ["Third M + 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV3",[0,0,0,0.1]], 0, false, true, "", "_this == _target"]; + player addAction ["Third M - 0.1", "\z\addons\dayz_code\actions\pzombie\pz_vision_rbg1.sqf", ["NV3",[0,0,0,-0.1]], 0, false, true, "", "_this == _target"]; + }; if (!isNull cursorTarget and (player distance cursorTarget < 3)) then { //Has some kind of target @@ -119,7 +149,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu _isZombie = cursorTarget isKindOf "zZombie_base"; _isDestructable = cursorTarget isKindOf "BuiltItems"; _isWreck = typeOf cursorTarget in ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"]; - _isRemovable = typeOf cursorTarget in ["Fence_corrugated_DZ"]; + _isRemovable = typeOf cursorTarget in ["Fence_corrugated_DZ","M240Nest_DZ"]; _isDisallowRepair = typeOf cursorTarget in ["M240Nest_DZ"]; _isTent = cursorTarget isKindOf "TentStorage"; @@ -315,6 +345,16 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu player removeAction s_player_information; s_player_information = -1; }; + + //Start Generator + if(cursorTarget isKindOf "Generator_DZ" and _canDo and ("ItemJerrycan" in magazines player) and cursorTarget getVariable ["GeneratorRunning", 0] == 0) then { + if ((s_player_fillgen < 0) and (player distance cursorTarget < 3)) then { + s_player_fillgen = player addAction ["Fill and Start Generator", "\z\addons\dayz_code\actions\fill_startGenerator.sqf",cursorTarget, 0, false, true, "",""]; + }; + } else { + player removeAction s_player_fillgen; + s_player_fillgen = -1; + }; //Sleep @@ -504,24 +544,18 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu dayz_myCursorTarget = objNull; - //{player removeAction _x} forEach s_player_madsci;s_player_madsci = []; {player removeAction _x} forEach s_player_parts;s_player_parts = []; - //{player removeAction _x} forEach s_player_bank;s_player_bank = []; {player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = []; player removeAction s_player_checkGear; s_player_checkGear = -1; - //s_player_madsci_crtl = -1; s_player_parts_crtl = -1; // lock unlock vehicles s_player_lockUnlock_crtl = -1; - // Bank Vault - s_player_bankvault_crtl = -1; - //Others player removeAction s_player_forceSave; s_player_forceSave = -1; @@ -570,6 +604,11 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu s_player_packvault = -1; player removeAction s_player_lockvault; s_player_lockvault = -1; + + player removeAction s_player_information; + s_player_information = -1; + player removeAction s_player_fillgen; + s_player_fillgen = -1; }; diff --git a/dayz_code/config.cpp b/dayz_code/config.cpp index eb61d357d..44a4807c9 100644 --- a/dayz_code/config.cpp +++ b/dayz_code/config.cpp @@ -40,7 +40,7 @@ class CfgMods hidePicture = 0; hideName = 0; action = "http://www.dayzepoch.com"; - version = "1.0.0.4"; + version = "1.0.0.5"; hiveVersion = 0.96; //0.93 }; }; @@ -379,6 +379,27 @@ class CfgSurvival { sex = "male"; playerModel = "Soldier_Bodyguard_AA12_PMC_DZ"; }; + + class Skin_FR_OHara_DZ: Default + { + sex = "male"; + playerModel = "FR_OHara_DZ"; + }; + class Skin_FR_Rodriguez_DZ: Default + { + sex = "male"; + playerModel = "FR_Rodriguez_DZ"; + }; + class Skin_CZ_Soldier_Sniper_EP1_DZ: Default + { + sex = "male"; + playerModel = "CZ_Soldier_Sniper_EP1_DZ"; + }; + class Skin_Graves_Light_DZ: Default + { + sex = "male"; + playerModel = "Graves_Light_DZ"; + }; class Skin_Drake_Light_DZ: Default { sex = "male"; @@ -439,6 +460,7 @@ class CfgBuildingLoot { { "ItemCompass","generic" }, { "ItemMap","weapon" }, { "Makarov","weapon" }, + { "MakarovSD","weapon" }, { "Colt1911","weapon" }, { "ItemFlashlight","generic" }, { "ItemKnife","generic" }, @@ -474,6 +496,7 @@ class CfgBuildingLoot { 0.05, 0.03, 0.13, + 0.03, 0.05, 0.03, 0.08, @@ -817,7 +840,8 @@ class HeliCrash_No50s: Default { { "","medical" }, { "","generic" }, { "","military" }, - //{"Body","object"}, + { "Sa61_EP1","weapon"}, + { "UZI_SD_EP1","weapon"}, { "ItemEtool","weapon" }, {"ItemSandbag","magazine"}, {"Sa58P_EP1","weapon"}, @@ -859,7 +883,8 @@ class HeliCrash_No50s: Default { 0.10, 1.00, 2.50, - //0.20, + 0.05, // Sa61_EP1 + 0.02, //UZI_SD_EP1 0.05, 0.02, 0.03, @@ -879,7 +904,7 @@ class HeliCrash_No50s: Default { { "M16A2GL","weapon" }, { "M249_DZ","weapon" }, { "M9SD","weapon" }, - //{"M136","weapon"}, + { "Pecheneg_DZ","weapon"}, { "AK_74","weapon" }, { "M4A1_Aim","weapon" }, { "AKS_74_kobra","weapon" }, @@ -936,7 +961,7 @@ class HeliCrash_No50s: Default { 0.05, 0.01, 0.02, - //0.01, //m136 + 0.01, //PKP 0.10, 0.02, 0.10, @@ -1653,7 +1678,7 @@ class HeliCrash_No50s: Default { { "ItemWatch","generic" }, { "ItemCompass","generic" }, { "ItemMap","weapon" }, - { "Makarov","weapon" }, + { "MakarovSD","weapon" }, { "Colt1911","weapon" }, { "ItemFlashlight","generic" }, { "ItemKnife","generic" }, @@ -1682,6 +1707,7 @@ class HeliCrash_No50s: Default { { "ItemCompass","generic" }, { "ItemMap","weapon" }, { "Makarov","weapon" }, + { "MakarovSD","weapon" }, { "Colt1911","weapon" }, { "ItemKnife","generic" }, @@ -1699,12 +1725,15 @@ class HeliCrash_No50s: Default { { "WeaponHolder_ItemHatchet","object" }, { "MR43","weapon" }, {"WeaponHolder_ItemMachete", "object"} + { "SCAR_H_LNG_Sniper_SD","weapon" }, + }; itemChance[] = { 0.06, 0.08, 0.05, 0.06, + 0.03, 0.08, 0.05, @@ -1721,7 +1750,8 @@ class HeliCrash_No50s: Default { 0.11, 0.17, 0.06, - 0.03 + 0.03, + 0.01 }; }; class Land_House_C_1_EP1: Residential diff --git a/dayz_code/init/compiles.sqf b/dayz_code/init/compiles.sqf index 9344d46dc..9313b5093 100644 --- a/dayz_code/init/compiles.sqf +++ b/dayz_code/init/compiles.sqf @@ -75,6 +75,10 @@ if (!isDedicated) then { player_reloadMag = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_reloadMags.sqf"; player_loadCrate = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_loadCrate.sqf"; player_craftItem = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem.sqf"; + player_craftItem1 = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem1.sqf"; + player_craftItem2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem2.sqf"; + player_craftItem3 = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem3.sqf"; + player_craftItem4 = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem4.sqf"; player_tentPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\tent_pitch.sqf"; player_vaultPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\vault_pitch.sqf"; player_drink = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_drink.sqf"; diff --git a/dayz_code/init/variables.sqf b/dayz_code/init/variables.sqf index c8ceb3567..19b931fad 100644 --- a/dayz_code/init/variables.sqf +++ b/dayz_code/init/variables.sqf @@ -14,45 +14,8 @@ Camo1_DZ = "Camo1_DZ"; Soldier1_DZ = "Soldier1_DZ"; Rocket_DZ = "Rocket_DZ"; -// more models -Rocker2_DZ = "Rocker2_DZ"; -Priest_DZ = "Priest_DZ"; -Functionary1_EP1_DZ = "Functionary1_EP1_DZ"; -GUE_Commander_DZ = "GUE_Commander_DZ"; -Ins_Soldier_GL_DZ = "Ins_Soldier_GL_DZ"; -Haris_Press_EP1_DZ = "Haris_Press_EP1_DZ"; -Pilot_EP1_DZ = "Pilot_EP1_DZ"; -RU_Policeman_DZ = "RU_Policeman_DZ"; -Soldier_TL_PMC_DZ = "Soldier_TL_PMC_DZ"; -Soldier_Sniper_PMC_DZ = "Soldier_Sniper_PMC_DZ"; -Soldier_Bodyguard_AA12_PMC_DZ = "Soldier_Bodyguard_AA12_PMC_DZ"; -Drake_Light_DZ = "Drake_Light_DZ"; -CZ_Special_Forces_GL_DES_EP1_DZ = "CZ_Special_Forces_GL_DES_EP1_DZ"; -TK_INS_Soldier_EP1_DZ = "TK_INS_Soldier_EP1_DZ"; -TK_INS_Warlord_EP1_DZ = "TK_INS_Warlord_EP1_DZ"; -// new females -SurvivorWpink_DZ = "SurvivorWpink_DZ"; -SurvivorWcombat_DZ = "SurvivorWcombat_DZ"; -SurvivorWdesert_DZ = "SurvivorWdesert_DZ"; -SurvivorWurban_DZ = "SurvivorWurban_DZ"; - -AllPlayers = ["Survivor2_DZ","SurvivorWcombat_DZ","SurvivorWdesert_DZ","SurvivorWurban_DZ","SurvivorWpink_DZ","SurvivorW3_DZ","SurvivorW2_DZ","Bandit1_DZ","Bandit2_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ"]; -AllPlayersVehicles = ["Survivor2_DZ","SurvivorWcombat_DZ","SurvivorWdesert_DZ","SurvivorWurban_DZ","SurvivorWpink_DZ","SurvivorW3_DZ","SurvivorW2_DZ","Bandit1_DZ","Bandit2_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","AllVehicles"]; - -PZombie_VB = "PZombie_VB"; - -pz_policeman = "pz_policeman"; -pz_suit1 = "pz_suit1"; -pz_suit2 = "pz_suit2"; -pz_worker1 = "pz_worker1"; -pz_worker2 = "pz_worker2"; -pz_worker3 = "pz_worker3"; -pz_teacher = "pz_teacher"; -pz_hunter = "pz_hunter"; -pz_villager1 = "pz_villager1"; -pz_villager2 = "pz_villager2"; -pz_villager3 = "pz_villager3"; -pz_priest = "pz_priest"; +AllPlayers = ["Survivor2_DZ","SurvivorWcombat_DZ","SurvivorWdesert_DZ","SurvivorWurban_DZ","SurvivorWpink_DZ","SurvivorW3_DZ","SurvivorW2_DZ","Bandit1_DZ","Bandit2_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","FR_OHara_DZ","FR_Rodriguez_DZ","CZ_Soldier_Sniper_EP1_DZ","Graves_Light_DZ"]; +AllPlayersVehicles = ["AllVehicles"]+AllPlayers; //Cooking meatraw = [ @@ -76,7 +39,7 @@ meatcooked = [ //Eating no_output_food = ["FoodMRE", "FoodPistachio", "FoodNutmix","FoodBioMeat"]+meatcooked+meatraw; - +// Food with increased chance for infection. badfood = ["FoodBioMeat","FoodCanUnlabeled"]; food_with_output=[ @@ -259,6 +222,7 @@ dayz_resetSelfActions = { s_player_followdog = -1; s_player_repair_crtl = -1; s_player_information = -1; + s_player_fillgen = -1; }; call dayz_resetSelfActions; @@ -420,7 +384,7 @@ if(isNil "dayz_oldrefuel") then { dayz_updateObjects = ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage","M240Nest_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"]; dayz_disallowedVault = ["TentStorage", "BuiltItems"]; dayz_reveal = ["AllVehicles","WeaponHolder","TentStorage","VaultStorage","VaultStorageLocked","BuiltItems"]; -dayz_allowedObjects = ["TentStorage","TentStorageDomed", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ"]; +dayz_allowedObjects = ["TentStorage","TentStorageDomed", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ"]; dayz_spawnPos = getPosATL player; diff --git a/dayz_code/rscTitles.hpp b/dayz_code/rscTitles.hpp index 4cb03621f..1aff52d58 100644 --- a/dayz_code/rscTitles.hpp +++ b/dayz_code/rscTitles.hpp @@ -137,7 +137,7 @@ class RscDisplayMain : RscStandardDisplay class DAYZ_Version : CA_Version { idc = -1; - text = "DayZ Epoch 1.0.0.4 dev (1.7.6.1)"; + text = "DayZ Epoch 1.0.0.5 dev (1.7.6.1)"; y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)"; }; delete CA_TitleMainMenu; diff --git a/dayz_equip/config.cpp b/dayz_equip/config.cpp index 765d9f304..2f70259aa 100644 --- a/dayz_equip/config.cpp +++ b/dayz_equip/config.cpp @@ -1030,7 +1030,7 @@ class CfgMagazines neednearby[] = {}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"ItemTentDomed",1}}; - input[] = {{"ItemCanvas",2},{"ItemPole",2}}; + input[] = {{"ItemCanvas",3},{"ItemPole",2}}; }; class Crafting2 { @@ -1254,6 +1254,30 @@ class CfgMagazines displayName = "Bodyguard"; descriptionShort = "Bodyguard"; }; + class Skin_FR_OHara_DZ: SkinBase + { + scope = 2; + displayName = "Jungle Camo"; + descriptionShort = "Jungle Camo"; + }; + class Skin_FR_Rodriguez_DZ: SkinBase + { + scope = 2; + displayName = "Gunner Outfit"; + descriptionShort = "Gunner Outfit"; + }; + class Skin_CZ_Soldier_Sniper_EP1_DZ: SkinBase + { + scope = 2; + displayName = "Desert Guille"; + descriptionShort = "Desert Guille"; + }; + class Skin_Graves_Light_DZ: SkinBase + { + scope = 2; + displayName = "Urban Camo"; + descriptionShort = "Urban Camo"; + }; class Skin_Soldier_Sniper_PMC_DZ: SkinBase { scope = 2; @@ -1469,11 +1493,11 @@ class CfgMagazines scope = 2; count = 1; type = 256; - displayName = "Wood Lumber"; + displayName = "Lumber"; // TODO make custom model and icon model = "\dayz_equip\models\woodPile.p3d"; picture = "\dayz_equip\textures\equip_woodPile_ca.paa"; - descriptionShort = "Wood Lumber"; + descriptionShort = "Lumber"; class ItemActions { class Build { text = "Build Wood Gate"; @@ -2371,6 +2395,16 @@ class CfgMagazines model = "\dayz_equip\models\generator_gear.p3d"; picture = "\dayz_equip\textures\equip_generator_ca.paa"; descriptionShort = "$STR_EQUIP_DESC_31"; + class ItemActions + { + class Build + { + text = "$STR_ACTIONS_BUILD"; + script = "spawn player_build;"; + require[] = {"ItemToolbox"}; + create = "Generator_DZ"; + }; + }; }; // Custom player vault class ItemVault: CA_Magazine @@ -2564,8 +2598,25 @@ class CfgVehicles armor = 400; displayName = "Hedgehog (Steel)"; vehicleClass = "Fortifications"; - constructioncount = 10; + constructioncount = 5; + removeoutput[] = {{"ItemTankTrap",1}}; }; + class Generator_DZ: BuiltItems + { + scope = 2; + destrType = "DestructNo"; + cost = 100; + offset[] = {0,1.5,0}; + model = "\dayz_equip\models\generator.p3d"; + icon = "\ca\data\data\Unknown_object.paa"; + mapSize = 2; + armor = 400; + displayName = "Generator"; + vehicleClass = "Fortifications"; + constructioncount = 5; + removeoutput[] = {{"ItemGenerator",1}}; + }; + class Fort_RazorWire : BuiltItems { @@ -2595,7 +2646,8 @@ class CfgVehicles armor = 400; displayName = "Bag Fence"; vehicleClass = "Fortifications"; - constructioncount = 10; + constructioncount = 5; + removeoutput[] = {{"ItemSandbag",1}}; }; class Land_HBarrier1_DZ : BuiltItems { @@ -2603,7 +2655,7 @@ class CfgVehicles animated = 0; vehicleClass = "Fortifications"; typicalCargo[] = {}; - offset[] = {0,1.5,0.5}; + offset[] = {0,2,0}; irTarget = 0; accuracy = 0.3; transportAmmo = 0; @@ -2620,7 +2672,8 @@ class CfgVehicles mapSize = 2; displayName = "H-barrier cube"; GhostPreview = "Land_HBarrier1Preview"; - constructioncount = 20; + constructioncount = 10; + removeoutput[] = {{"ItemSandbagLarge",1}}; }; // PLAYER BUILDINGS @@ -2646,8 +2699,9 @@ class CfgVehicles transportMaxMagazines = 25; transportMaxWeapons = 4; transportMaxBackpacks = 1; - constructioncount = 20; - + constructioncount = 10; + removeoutput[] = {{"m240_nest_kit",1}}; + }; class Land_covering_hut_EP1; class CanvasHut_DZ: Land_covering_hut_EP1 @@ -2672,6 +2726,7 @@ class CfgVehicles offset[] = {0,2.5,1}; displayName = "Rusty Gate"; vehicleClass = "Fortifications"; + removeoutput[] = {{"rusty_gate_kit",1}}; }; class Land_KBud; class OutHouse_DZ: Land_KBud @@ -2683,7 +2738,7 @@ class CfgVehicles transportMaxMagazines = 4; transportMaxWeapons = 1; transportMaxBackpacks = 1; - constructioncount = 10; + constructioncount = 5; class transportmagazines { class _xx_ItemTrashToiletpaper @@ -2703,14 +2758,14 @@ class CfgVehicles transportMaxMagazines = 400; transportMaxWeapons = 40; transportMaxBackpacks = 20; - constructioncount = 20; + constructioncount = 10; }; class Fence_corrugated_plate; class Fence_corrugated_DZ: Fence_corrugated_plate { scope = 2; offset[] = {0,2.5,1}; - removeoutput[] = {{"ItemPole",2},{"PartGeneric",4},{"PartWoodLumber",2}}; + removeoutput[] = {{"ItemCorrugated",1}}; displayName = "Corrugated Fence"; vehicleClass = "Fortifications"; @@ -2728,7 +2783,7 @@ class CfgVehicles transportMaxMagazines = 100; transportMaxWeapons = 10; transportMaxBackpacks = 5; - constructioncount = 20; + constructioncount = 10; }; class Land_Shed_wooden; class Wooden_shed_DZ: Land_Shed_wooden @@ -2864,7 +2919,8 @@ class CfgVehicles { scope = 2; displayName = "Machete"; - model="\z\addons\dayz_communityassets\models\machete.p3d"; + // test model="\z\addons\dayz_communityassets\models\machete.p3d"; + model = "\dayz_equip\models\hatchet.p3d"; class eventHandlers { init = "[(_this select 0),'cfgWeapons','ItemMachete'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';"; diff --git a/dayz_server/compile/server_playerLogin.sqf b/dayz_server/compile/server_playerLogin.sqf index 810595409..899682fb0 100644 --- a/dayz_server/compile/server_playerLogin.sqf +++ b/dayz_server/compile/server_playerLogin.sqf @@ -99,7 +99,13 @@ if (!_isNew) then { }; //Record initial inventory - _config = (configFile >> "CfgSurvival" >> "Inventory" >> "Default"); + + if(isclass(missionConfigFile >> "CfgSurvival_override")) then { + _config = (missionConfigFile >> "CfgSurvival_override" >> "Inventory" >> "Default"); + } else { + _config = (configFile >> "CfgSurvival" >> "Inventory" >> "Default"); + }; + _mags = getArray (_config >> "magazines"); _wpns = getArray (_config >> "weapons"); _bcpk = getText (_config >> "backpack"); diff --git a/dayz_server/compile/server_playerSetup.sqf b/dayz_server/compile/server_playerSetup.sqf index c251aa915..02666239f 100644 --- a/dayz_server/compile/server_playerSetup.sqf +++ b/dayz_server/compile/server_playerSetup.sqf @@ -88,7 +88,7 @@ if (count _worldspace > 0) then { // Came from another server force random spawn if (_lastinstance != dayZ_instance) then { _randomSpot = true; - } + }; //_playerObj setPosATL _position; } else { diff --git a/dayz_server/compile/server_playerSync.sqf b/dayz_server/compile/server_playerSync.sqf index 3758bf54a..a662bb452 100644 --- a/dayz_server/compile/server_playerSync.sqf +++ b/dayz_server/compile/server_playerSync.sqf @@ -164,14 +164,14 @@ if (_characterID != "0") then { _currentWpn = ""; } else { if ( typeName(_currentWpn) == "STRING" ) then { - _muzzles = getArray(configFile >> "cfgWeapons" >> _currentWpn >> "muzzles"); - if (count _muzzles > 1) then { - _currentWpn = currentMuzzle _character; - }; + _muzzles = getArray(configFile >> "cfgWeapons" >> _currentWpn >> "muzzles"); + if (count _muzzles > 1) then { + _currentWpn = currentMuzzle _character; + }; } else { //diag_log ("DW_DEBUG: _currentWpn: " + str(_currentWpn)); - _currentWpn = ""; - }; + _currentWpn = ""; + }; }; _temp = round(_character getVariable ["temperature",100]); _currentState = [_currentWpn,_currentAnim,_temp]; diff --git a/dayz_server/compile/server_publishVehicle2.sqf b/dayz_server/compile/server_publishVehicle2.sqf index c34f5547a..afee87c48 100644 --- a/dayz_server/compile/server_publishVehicle2.sqf +++ b/dayz_server/compile/server_publishVehicle2.sqf @@ -15,6 +15,15 @@ _uid = _worldspace call dayz_objectUID3; // TODO: check if uid already exists and if so increment by 1 and check again as soon as we find nothing continue. +// parseNumber to get just numbers no letters +/* +_isA2free = parseNumber _characterID; +if(_isA2free != _characterID) then { + _characterID = _isA2free; +}; +*/ + + //Send request _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _characterID, _worldspace, [], [], 1,_uid]; diag_log ("HIVE: WRITE: "+ str(_key)); diff --git a/dayz_server/system/server_monitor.sqf b/dayz_server/system/server_monitor.sqf index d079fe773..6c59ce932 100644 --- a/dayz_server/system/server_monitor.sqf +++ b/dayz_server/system/server_monitor.sqf @@ -174,11 +174,13 @@ serverVehicleCounter = []; [_object,_selection,_dam] call object_setFixServer; } forEach _hitpoints; - _object setvelocity [0,0,1]; _object setFuel _fuel; - _object call fnc_vehicleEventHandler; if (!((typeOf _object) in dayz_allowedObjects)) then { + + _object setvelocity [0,0,1]; + _object call fnc_vehicleEventHandler; + if(_ownerID != "0") then { _object setvehiclelock "locked"; }; diff --git a/dayz_weapons/config.cpp b/dayz_weapons/config.cpp index 8e6adaee8..615f33b98 100644 --- a/dayz_weapons/config.cpp +++ b/dayz_weapons/config.cpp @@ -502,6 +502,11 @@ class cfgWeapons { type = "1"; }; + class Pecheneg; + class Pecheneg_DZ: Pecheneg + { + type = "1"; + }; }; class cfgMagazines {