diff --git a/MPMissions/DayZ_Epoch_11.Chernarus/dynamic_vehicle.sqf b/MPMissions/DayZ_Epoch_11.Chernarus/dynamic_vehicle.sqf index 3c5eda2dd..a5bff6d32 100644 --- a/MPMissions/DayZ_Epoch_11.Chernarus/dynamic_vehicle.sqf +++ b/MPMissions/DayZ_Epoch_11.Chernarus/dynamic_vehicle.sqf @@ -45,7 +45,7 @@ AllowedVehiclesList = [ ["UH1H_DZ",2], ["Mi17_Civilian_DZ",3], ["Mi17_DZ",1], - ["CH_47F_EP1",1], + ["CH_47F_EP1_DZ",1], ["LandRover_CZ_EP1",2], ["HMMWV_Ambulance",2], ["HMMWV_DES_EP1",1], diff --git a/MPMissions/DayZ_Epoch_15.namalsk/init.sqf b/MPMissions/DayZ_Epoch_15.namalsk/init.sqf index 923ccfd85..0e808cefb 100644 --- a/MPMissions/DayZ_Epoch_15.namalsk/init.sqf +++ b/MPMissions/DayZ_Epoch_15.namalsk/init.sqf @@ -25,7 +25,7 @@ MaxDynamicDebris = 300; // Default = 100 dayz_MapArea = 8000; // Default = 10000 dayz_maxLocalZombies = 80; // Default = 40 -dayz_maxGlobalZombies = 60; // Default = 30 +dayz_maxGlobalZombiesInit = 60; // Default = 40 dayz_maxZeds = 1000; // Default = 500 // new stuff diff --git a/dayz_code/CfgWeapons.hpp b/dayz_code/CfgWeapons.hpp index d416e8b07..d43f657ee 100644 --- a/dayz_code/CfgWeapons.hpp +++ b/dayz_code/CfgWeapons.hpp @@ -149,6 +149,23 @@ class CfgWeapons { }; }; }; + class ItemFishingPole: ItemCore + { + scope=2; + displayName="Fishing Pole"; + // TODO MODEL AND ICON + model="\dayz_equip\models\crowbar.p3d"; + picture="\dayz_weapons\textures\equip_crowbar_CA.paa"; + descriptionShort="Fishing Pole and with lure."; + class ItemActions + { + class Use + { + text="Cast Fishing Pole"; + script="spawn player_goFishing;"; + }; + }; + }; class MeleeMachete: MeleeHatchet { scope=2; diff --git a/dayz_code/actions/fill_nearestVehicle.sqf b/dayz_code/actions/fill_nearestVehicle.sqf new file mode 100644 index 000000000..0f7abd676 --- /dev/null +++ b/dayz_code/actions/fill_nearestVehicle.sqf @@ -0,0 +1,104 @@ +private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_location1","_location2","_abort","_canName","_canSizeEmpty","_canTypeEmpty","_canName","_canSize","_configCan","_configVeh","_capacity","_nameText","_availableCansEmpty","_availableCans"]; + +if(TradeInprogress) exitWith { cutText ["Refuel already in progress." , "PLAIN DOWN"] }; +TradeInprogress = true; + +// Get all nearby vehicles within 10m +_findNearestVehicles = nearestObjects [player, ["AllVehicles"], 10]; +_findNearestVehicle = []; +{ + if (alive _x and !(_x isKindOf "Man")) then { + _findNearestVehicle set [(count _findNearestVehicle),_x]; + }; +} foreach _findNearestVehicles; + +_IsNearVehicle = count (_findNearestVehicle); + +if(_IsNearVehicle >= 1) then { + + // select the nearest one + _vehicle = _findNearestVehicle select 0; + + // Static vehicle fuel information + _configVeh = configFile >> "cfgVehicles" >> TypeOf(_vehicle); + _capacity = getNumber(_configVeh >> "fuelCapacity"); + _nameText = getText(_configVeh >> "displayName"); + + + _isOk = true; + // perform fuel up + while {_isOk} do { + + // qty to add per loop + _canSize = 20; + + cutText [format["Filling up %1, move to cancel.",_nameText], "PLAIN DOWN"]; + + // alert zombies + [player,20,true,(getPosATL player)] spawn player_alertZombies; + + _finished = false; + + // force animation + player playActionNow "Medic"; + + r_interrupt = false; + _animState = animationState player; + r_doLoop = true; + _started = false; + + 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"; + _abort = true; + }; + + if (_finished) then { + + // Get vehicle fuel levels again + _curFuel = ((fuel _vehicle) * _capacity); + _newFuel = (_curFuel + 20); + + if (_newFuel > _capacity) then {_newFuel = _capacity; _abort = true; }; + + // calculate minimum needed fuel + _newFuel = (_newFuel / _capacity); + + dayzSetFuel = [_vehicle,_newFuel]; + if (local _vehicle) then { + dayzSetFuel spawn local_setFuel; + }; + publicVariable "dayzSetFuel"; + + // Play sound + [player,"refuel",0,false] call dayz_zombieSpeak; + + cutText [format["%1 filled to %2 percent capacity.",_nameText,round(_newFuel*100)], "PLAIN DOWN"]; + }; + + if(_abort) exitWith {}; + sleep 1; + }; + +} else { + cutText ["No Vehicles Nearby.", "PLAIN DOWN"]; +}; +TradeInprogress = false; \ No newline at end of file diff --git a/dayz_code/actions/fill_startGenerator.sqf b/dayz_code/actions/fill_startGenerator.sqf index f163616b6..e6740dcb2 100644 --- a/dayz_code/actions/fill_startGenerator.sqf +++ b/dayz_code/actions/fill_startGenerator.sqf @@ -4,7 +4,7 @@ if(TradeInprogress) exitWith { cutText ["Refuel already in progress." , "PLAIN D TradeInprogress = true; player removeAction s_player_fillgen; - +s_player_fillgen = 1; // Use target from addaction _vehicle = _this select 3; diff --git a/dayz_code/actions/lock_veh.sqf b/dayz_code/actions/lock_veh.sqf index 55f0489f6..5be367b56 100644 --- a/dayz_code/actions/lock_veh.sqf +++ b/dayz_code/actions/lock_veh.sqf @@ -5,5 +5,8 @@ _vehicle = _this select 3; s_player_lockUnlock_crtl = -1; _vehicle setVehicleInit "this lock true; this lockCargo true;"; - processInitCommands; + +//_vehicle lock true; +//dayzLockVehicle = [_vehicle,true]; +//publicVariable "dayzLockVehicle"; diff --git a/dayz_code/actions/object_pickup.sqf b/dayz_code/actions/object_pickup.sqf index eac139568..ac9ea1859 100644 --- a/dayz_code/actions/object_pickup.sqf +++ b/dayz_code/actions/object_pickup.sqf @@ -17,7 +17,7 @@ _text = getText (configFile >> _type >> _classname >> "displayName"); _claimedBy = _holder getVariable["claimed","0"]; // Check if any players are nearby if not allow player to claim item. -_playerNear = {isPlayer _x} count (player nearEntities ["Man", 6]) > 1; +_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]) > 1; // Only allow if not already claimed. if (_claimedBy == "0" or !_playerNear) then { @@ -57,7 +57,7 @@ if(_classname isKindOf "Bag_Base_EP1") then { }; // test to see if item still exists just before adding and removing -if(_holder == objNull) exitWith {}; +if(_holder == objNull) exitWith { TradeInprogress = false; }; _obj = nearestObjects [(getPosATL player), [(typeOf _holder)], 5]; _qty = count _obj; diff --git a/dayz_code/actions/player_build.sqf b/dayz_code/actions/player_build.sqf index 7b313c7d7..5f1ba9e16 100644 --- a/dayz_code/actions/player_build.sqf +++ b/dayz_code/actions/player_build.sqf @@ -252,7 +252,8 @@ if (_hasrequireditem) then { //["dayzPublishObj",[dayz_characterID,_tmpbuilt,[_dir,_location],_classname]] call callRpcProcedure; dayzPublishObj = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname]; - publicVariableServer "dayzPublishObj"; + publicVariableServer "dayzPublishObj"; + } else { deleteVehicle _tmpbuilt; cutText ["Canceled building." , "PLAIN DOWN"]; diff --git a/dayz_code/actions/player_chopWood.sqf b/dayz_code/actions/player_chopWood.sqf index 5ca79218a..68b2c66f0 100644 --- a/dayz_code/actions/player_chopWood.sqf +++ b/dayz_code/actions/player_chopWood.sqf @@ -1,4 +1,4 @@ -private["_item","_location","_isOk","_dir","_classname"]; +private ["_item","_isOk","_i","_objName","_objInfo","_lenInfo","_started","_finished","_sfx","_dis","_animState","_isMedic","_proceed","_counter","_objType","_limit","_itemOut","_countOut","_tree","_distance2d","_distance3d","_trees","_findNearestTree"]; if(TradeInprogress) exitWith { cutText ["Harvest wood already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; @@ -9,95 +9,131 @@ _trees = ["t_picea3f.p3d","t_picea2s.p3d","t_picea1s.p3d","t_fagus2w.p3d","t_fag _item = _this; call gear_ui_init; -player playActionNow "Medic"; -[player,20,false,(getPosATL player)] spawn player_alertZombies; - -r_interrupt = false; -_animState = animationState player; -r_doLoop = true; -_started = false; -_finished = false; - -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 { - - _nearByTrees = 0; - - _findNearestTree = []; - { - if("" == typeOf _x) then { +_findNearestTree = []; +{ + if("" == typeOf _x) then { - if (alive _x) then { + if (alive _x) then { - _objInfo = toArray(str(_x)); - _lenInfo = count _objInfo - 1; - _objName = []; - _i = 0; - // 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)); + _objInfo = toArray(str(_x)); + _lenInfo = count _objInfo - 1; + _objName = []; + _i = 0; + // 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)); - // Exit since we found a tree - if (_objName in _trees) exitWith { - _findNearestTree set [(count _findNearestTree),_x]; + // Exit since we found a tree + if (_objName in _trees) exitWith { + _findNearestTree set [(count _findNearestTree),_x]; + }; + }; + }; + +} foreach nearestObjects [getPos player, [], 20]; + +diag_log format["DEBUG TREES: %1", _findNearestTree]; + +if (count(_findNearestTree) >= 1) then { + + _tree = _findNearestTree select 0; + + // get 2d distance + _distance2d = [player, _tree] call BIS_fnc_distance2D; + _distance3d = player distance _tree; + + if(_distance2d <= 5) then { + + _countOut = ceil(_distance3d-_distance2d); + + diag_log format["DEBUG TREE DISTANCE: %1 - %2 = %3", _distance3d,_distance2d,(_distance3d-_distance2d)]; + + // Start chop tree loop + _counter = 0; + _isOk = true; + _proceed = false; + while {_isOk} do { + + player playActionNow "Medic"; + [player,20,true,(getPosATL player)] spawn player_alertZombies; + + r_interrupt = false; + _animState = animationState player; + r_doLoop = true; + _started = false; + _finished = false; + + 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; + [player,"chopwood",0,false] call dayz_zombieSpeak; + }; + if (r_interrupt) then { + r_doLoop = false; + }; + + sleep 0.1; + + }; + + if(!_finished) exitWith { + _isOk = false; + _proceed = false; + }; + + if(_finished) then { + _counter = _counter + 1; + }; + + cutText ["Chopping down tree, walk away at anytime to cancel.", "PLAIN DOWN"]; + + if(_counter == _countOut) exitWith { + _isOk = false; + _proceed = true; }; }; - } foreach nearestObjects [getPos player, [], 5]; + if (_proceed) then { - diag_log format["DEBUG TREES: %1", _findNearestTree]; - - if (count(_findNearestTree) >= 1) then { - - _result = [player,"PartWoodPile"] call BIS_fnc_invAdd; - [player,"chopwood",0,false] call dayz_zombieSpeak; - if (_result) then { - cutText [localize "str_player_25", "PLAIN DOWN"]; - _tree = _findNearestTree select 0; + _itemOut = "PartWoodPile"; + for "_x" from 1 to _countOut do { + player addMagazine _itemOut; + }; + + // chop down tree if("" == typeOf _tree) then { _tree setDamage 1; }; - diag_log format["DEBUG TREE DAMAGE: %1", _tree]; + + cutText [format["%1 piles of wood has been successfully added to your inventory.", _countOut], "PLAIN DOWN"]; + } else { - cutText [localize "str_player_24", "PLAIN DOWN"]; + r_interrupt = false; + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + cutText ["Canceled Harvesting Wood.", "PLAIN DOWN"]; }; } else { cutText [localize "str_player_23", "PLAIN DOWN"]; }; - } else { - r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; - cutText ["Canceled Harvest Wood.", "PLAIN DOWN"]; + cutText [localize "str_player_23", "PLAIN DOWN"]; }; TradeInprogress = false; \ No newline at end of file diff --git a/dayz_code/actions/player_goFishing.sqf b/dayz_code/actions/player_goFishing.sqf new file mode 100644 index 000000000..9441fc264 --- /dev/null +++ b/dayz_code/actions/player_goFishing.sqf @@ -0,0 +1,56 @@ +private ["_item","_isOk","_i","_objName","_objInfo","_lenInfo","_started","_finished","_sfx","_dis","_animState","_isMedic","_proceed","_counter","_objType","_limit","_itemOut","_countOut","_tree","_distance2d","_distance3d","_trees","_findNearestTree"]; + +if(TradeInprogress) exitWith { cutText ["Fishing already in progress." , "PLAIN DOWN"]; }; +TradeInprogress = true; + +_item = _this; +call gear_ui_init; + +// find position in front of player +_position = player modeltoworld [0,5,0]; + +if(!(surfaceIsWater _position)) exitWith { TradeInprogress = false; cutText ["Must be near a shore or on a boat to fish." , "PLAIN DOWN"]; }; + +player playActionNow "Medic"; +[player,20,true,(getPosATL player)] spawn player_alertZombies; + +r_interrupt = false; +_animState = animationState player; +r_doLoop = true; +_started = false; +_finished = false; + +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; + [player,"fillwater",0,false] call dayz_zombieSpeak; + }; + if (r_interrupt) then { + r_doLoop = false; + }; + sleep 0.1; +}; + +if (_finished) then { + + _itemOut = "FoodCanSardines"; // TODO replace with random raw fishes + _countOut = round(random 4); + + for "_x" from 1 to _countOut do { + player addMagazine _itemOut; + }; + cutText [format["You caught %1 fish.", _countOut], "PLAIN DOWN"]; + +} else { + r_interrupt = false; + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + cutText ["Canceled Fishing.", "PLAIN DOWN"]; +}; +TradeInprogress = false; \ No newline at end of file diff --git a/dayz_code/actions/remove.sqf b/dayz_code/actions/remove.sqf index 19aa174fb..5ec603a06 100644 --- a/dayz_code/actions/remove.sqf +++ b/dayz_code/actions/remove.sqf @@ -117,13 +117,21 @@ if (_proceed) then { if(!isNull(_obj)) then { cutText [format["De-constructing %1.",_objType], "PLAIN DOWN"]; + // TODO add hideobject to have it sink into ground then delete + dayzHideObject = _obj; + hideObject _obj; // local player + publicVariable "dayzHideObject"; // remote player + sleep 5; + + //["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure; dayzDeleteObj = [_objectID,_objectUID]; publicVariableServer "dayzDeleteObj"; - + _isWreck = (typeOf _obj) in ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"]; deleteVehicle _obj; + _selectedRemoveOutput = []; if(_isWreck) then { // Find one random part to give back diff --git a/dayz_code/actions/stopGenerator.sqf b/dayz_code/actions/stopGenerator.sqf index 2509f9695..6a2661360 100644 --- a/dayz_code/actions/stopGenerator.sqf +++ b/dayz_code/actions/stopGenerator.sqf @@ -4,7 +4,7 @@ if(TradeInprogress) exitWith { cutText ["Stop already in progress." , "PLAIN DOW TradeInprogress = true; player removeAction s_player_fillgen; - +s_player_fillgen = 1; // Use target from addaction _vehicle = _this select 3; diff --git a/dayz_code/actions/unlock_veh.sqf b/dayz_code/actions/unlock_veh.sqf index 3f342a20c..40452f968 100644 --- a/dayz_code/actions/unlock_veh.sqf +++ b/dayz_code/actions/unlock_veh.sqf @@ -5,7 +5,9 @@ _vehicle = _this select 3; s_player_lockUnlock_crtl = -1; _vehicle setVehicleInit "this lock false; this lockCargo false;"; - processInitCommands; - +// Wiki states that lock is globally brodcast but the variable has to be local +//_vehicle lock false; +//dayzLockVehicle = [_vehicle,false]; +//publicVariable "dayzLockVehicle"; diff --git a/dayz_code/actions/vison_zombie.sqf b/dayz_code/actions/vison_zombie.sqf deleted file mode 100644 index 52d3d1802..000000000 --- a/dayz_code/actions/vison_zombie.sqf +++ /dev/null @@ -1,4 +0,0 @@ -private["_hasKnife","_qty","_item","_text","_string","_type","_loop","_meat","_timer"]; -_item = _this select 3; - -player playMove "GestureSwing" \ No newline at end of file diff --git a/dayz_code/cfgLoot.hpp b/dayz_code/cfgLoot.hpp index 327521ffa..a9cceacd9 100644 --- a/dayz_code/cfgLoot.hpp +++ b/dayz_code/cfgLoot.hpp @@ -5,19 +5,21 @@ class CfgLoot { "TrashJackDaniels", "ItemSodaEmpty", "ItemTrashToiletpaper", - "ItemTrashRazor" + "ItemTrashRazor", + "ItemLightBulb" }, { 1, 0.1, 0.5, 0.4, - 0.2 + 0.2, + 0.05 } }; civilian[] = { { - "TrashTinCan", + "FoodCanUnlabeled", "TrashJackDaniels", "ItemSodaEmpty", "ItemSodaCoke", @@ -91,7 +93,7 @@ class CfgLoot { }; generic[] = { { - "TrashTinCan", + "FoodCanUnlabeled", "ItemSodaEmpty", "ItemSodaCoke", "ItemSodaPepsi", @@ -187,7 +189,7 @@ class CfgLoot { }; military[] = { { - "TrashTinCan", + "FoodCanUnlabeled", "ItemSodaEmpty", "ItemSodaCoke", "ItemSodaPepsi", @@ -317,7 +319,7 @@ class CfgLoot { worker[] = { { - "TrashTinCan", + "FoodCanUnlabeled", "TrashJackDaniels", "ItemSodaEmpty", "ItemSodaCoke", diff --git a/dayz_code/cfgVehicles.hpp b/dayz_code/cfgVehicles.hpp index b5e4f72c2..91d9bc402 100644 --- a/dayz_code/cfgVehicles.hpp +++ b/dayz_code/cfgVehicles.hpp @@ -989,7 +989,7 @@ class Citizen1; // External class reference mapsize = 2; model = "\ca\weapons_e\AmmoBoxes\backpack_us_assault_Coyote.p3d"; transportMaxWeapons = 1; - transportMaxMagazines = 8; + transportMaxMagazines = 10; }; class DZ_Assault_Pack_EP1: Bag_Base_EP1 @@ -1025,7 +1025,7 @@ class Citizen1; // External class reference mapsize = 2; model = "\ca\weapons_e\AmmoBoxes\backpack_tk_alice.p3d"; transportMaxWeapons = 2; - transportMaxMagazines = 16; + transportMaxMagazines = 20; }; class DZ_TK_Assault_Pack_EP1 : Bag_Base_BAF @@ -1037,7 +1037,7 @@ class Citizen1; // External class reference icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa"; model = "\ca\weapons_e\AmmoBoxes\backpack_civil_assault.p3d"; transportMaxWeapons = 2; - transportMaxMagazines = 16; + transportMaxMagazines = 22; }; class DZ_British_ACU : Bag_Base_BAF @@ -1049,7 +1049,7 @@ class Citizen1; // External class reference picture = "\ca\weapons_baf\data\UI\backpack_BAF_CA.paa"; icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa"; transportMaxWeapons = 3; - transportMaxMagazines = 18; + transportMaxMagazines = 30; }; class DZ_CivilBackpack_EP1: Bag_Base_EP1 @@ -1061,7 +1061,7 @@ class Citizen1; // External class reference mapsize = 2; model = "\ca\weapons_e\AmmoBoxes\backpack_acr.p3d"; transportMaxWeapons = 4; - transportMaxMagazines = 24; + transportMaxMagazines = 40; }; class DZ_Backpack_EP1: Bag_Base_EP1 @@ -1072,8 +1072,8 @@ class Citizen1; // External class reference icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa"; mapsize = 2; model = "\ca\weapons_e\AmmoBoxes\backpack_us.p3d"; - transportMaxWeapons = 6; - transportMaxMagazines = 30; + transportMaxWeapons = 5; + transportMaxMagazines = 50; }; class DZ_LargeGunBag_EP1: Bag_Base_EP1 @@ -1084,8 +1084,8 @@ class Citizen1; // External class reference picture = "\ca\weapons_e\data\icons\staticX_CA.paa"; icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa"; mapsize = 2; - transportMaxWeapons = 10; - transportMaxMagazines = 45; + transportMaxWeapons = 6; + transportMaxMagazines = 60; }; class DZ_GunBag_EP1: Bag_Base_EP1 { @@ -1095,8 +1095,8 @@ class Citizen1; // External class reference picture = "\ca\weapons_e\data\icons\staticY_CA.paa"; icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa"; mapsize = 2; - transportMaxWeapons = 6; - transportMaxMagazines = 8; + transportMaxWeapons = 3; + transportMaxMagazines = 35; }; class DZ_CompactPack_EP1: Bag_Base_EP1 { @@ -1106,8 +1106,8 @@ class Citizen1; // External class reference icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa"; mapsize = 2; model = "\ca\weapons_e\AmmoBoxes\backpack_rpg.p3d"; - transportMaxWeapons = 1; - transportMaxMagazines = 18; + transportMaxWeapons = 2; + transportMaxMagazines = 25; }; class DZ_TerminalPack_EP1: Bag_Base_EP1 { @@ -1118,7 +1118,7 @@ class Citizen1; // External class reference mapSize = 2; model = "\ca\weapons_e\AmmoBoxes\backpack_us_AUV"; transportMaxWeapons = 1; - transportMaxMagazines = 12; + transportMaxMagazines = 15; }; //An2_TK_EP1 diff --git a/dayz_code/compile/fn_selfActions.sqf b/dayz_code/compile/fn_selfActions.sqf index 61cdddfd4..c285a4cd5 100644 --- a/dayz_code/compile/fn_selfActions.sqf +++ b/dayz_code/compile/fn_selfActions.sqf @@ -50,7 +50,7 @@ if (_canPickLight and !dayz_hasLight and !_isPZombie) then { s_player_grabflare = -1; s_player_removeflare = -1; }; - +hint str(typeOf cursorTarget); if(DZEdebug) then { hint str(typeOf cursorTarget); @@ -71,39 +71,7 @@ if(_isPZombie) then { }; if (s_player_pzombiesvision < 0) then { - 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 @@ -149,7 +117,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","M240Nest_DZ"]; + _isRemovable = typeOf cursorTarget in ["Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ"]; _isDisallowRepair = typeOf cursorTarget in ["M240Nest_DZ"]; _isTent = cursorTarget isKindOf "TentStorage"; @@ -168,7 +136,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu } forEach _rawmeat; if (_hasFuelE and dayz_oldrefuel) then { - _isFuel = (cursorTarget isKindOf "Land_Ind_TankSmall") or (cursorTarget isKindOf "Land_fuel_tank_big") or (cursorTarget isKindOf "Land_fuel_tank_stairs") or (cursorTarget isKindOf "Land_fuel_tank_stairs_ep1") or (cursorTarget isKindOf "Land_wagon_tanker") or (cursorTarget isKindOf "Land_fuelstation") or (cursorTarget isKindOf "Land_fuelstation_army"); + _isFuel = (cursorTarget isKindOf "Land_Ind_TankSmall") or (cursorTarget isKindOf "Land_fuel_tank_big") or (cursorTarget isKindOf "Land_fuel_tank_stairs") or (cursorTarget isKindOf "Land_fuel_tank_stairs_ep1") or (cursorTarget isKindOf "Land_wagon_tanker") or (cursorTarget isKindOf "Land_fuelstation") or (cursorTarget isKindOf "Land_fuelstation_army") or (cursorTarget isKindOf "land_fuelstation_w"); }; // diag_log ("OWNERID = " + _ownerID + " CHARID = " + dayz_characterID + " " + str(_ownerID == dayz_characterID)); @@ -345,6 +313,32 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu player removeAction s_player_information; s_player_information = -1; }; + + //Fuel Pump + if((typeOf cursorTarget) in dayz_fuelpumparray and _canDo) then { + if ((s_player_fuelauto < 0) and (player distance cursorTarget < 3)) then { + + // check if Generator_DZ is running within 30 meters + _findNearestGens = nearestObjects [player, ["Generator_DZ"], 30]; + _findNearestGen = []; + { + if (alive _x and (_x getVariable ["GeneratorRunning", false])) then { + _findNearestGen set [(count _findNearestGen),_x]; + }; + } foreach _findNearestGens; + _IsNearRunningGen = count (_findNearestGen); + + // show that pump needs power if no generator nearby. + if(_IsNearRunningGen > 0) then { + s_player_fuelauto = player addAction ["Fill Vehicle", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",[], 0, false, true, "",""]; + } else { + s_player_fuelauto = player addAction ["Needs Power", "",[], 0, false, true, "",""]; + }; + }; + } else { + player removeAction s_player_fuelauto; + s_player_fuelauto = -1; + }; //Start Generator if(cursorTarget isKindOf "Generator_DZ" and _canDo) then { diff --git a/dayz_code/compile/local_lockUnlock.sqf b/dayz_code/compile/local_lockUnlock.sqf new file mode 100644 index 000000000..0f773f500 --- /dev/null +++ b/dayz_code/compile/local_lockUnlock.sqf @@ -0,0 +1,7 @@ +private ["_vehicle","_status"]; +_vehicle = _this select 0; +_status = _this select 1; + +//if (local _vehicle) then { +_vehicle lock _status; +//}; \ No newline at end of file diff --git a/dayz_code/compile/player_checkStealth.sqf b/dayz_code/compile/player_checkStealth.sqf index 1f80b6ba4..eadb8e155 100644 --- a/dayz_code/compile/player_checkStealth.sqf +++ b/dayz_code/compile/player_checkStealth.sqf @@ -37,7 +37,9 @@ if (_anim4 == "aswm") then { // Stops swimming in ground [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; - + // This sleep was much needed + sleep 5; + dayz_isSwimming = false; }; diff --git a/dayz_code/compile/player_dumpBackpack.sqf b/dayz_code/compile/player_dumpBackpack.sqf new file mode 100644 index 000000000..fea2d28a1 --- /dev/null +++ b/dayz_code/compile/player_dumpBackpack.sqf @@ -0,0 +1,13 @@ +private ["_weapons","_magazines","_weaponscnt","_magazinescnt","_backpack"]; +_backpack = nearestObject [player, "Bag_Base_EP1"]; +if (!(isNull _backpack) and local _backpack) then { + _weapons = getWeaponCargo _backpack; + _magazines = getMagazineCargo _backpack; + _weaponscnt = count (_weapons select 0); + _magazinescnt = count (_magazines select 0); + if((_magazinescnt > 0) or (_weaponscnt > 0)) then { + // hide backpack from everyone else + dayzHideObject = _backpack; + publicVariable "dayzHideObject"; + }; +}; \ No newline at end of file diff --git a/dayz_code/compile/player_spawnCheck.sqf b/dayz_code/compile/player_spawnCheck.sqf index d0ba0a4c1..81dea4d14 100644 --- a/dayz_code/compile/player_spawnCheck.sqf +++ b/dayz_code/compile/player_spawnCheck.sqf @@ -45,10 +45,12 @@ switch (_nearbytype) do { }; */ -_players = _position nearEntities ["AllPlayers",_radius+200]; -dayz_maxGlobalZombies = 40; +_players = _position nearEntities ["CAManBase",_radius+200]; +dayz_maxGlobalZombies = dayz_maxGlobalZombiesInit; { - dayz_maxGlobalZombies = dayz_maxGlobalZombies + 10; + if(isPlayer _x) then { + dayz_maxGlobalZombies = dayz_maxGlobalZombies + dayz_maxGlobalZombiesIncrease; + }; } foreach _players; _spawnZombies = _position nearEntities ["zZombie_Base",_radius+100]; diff --git a/dayz_code/config.cpp b/dayz_code/config.cpp index c3968d9be..0b9554ffa 100644 --- a/dayz_code/config.cpp +++ b/dayz_code/config.cpp @@ -20,7 +20,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = 0.1; - requiredAddons[] = {"dayz_equip","dayz_weapons","dayz_sfx","CAMisc3","CABuildingParts","CABuildingParts_Signs","CAStructuresHouse","CAStructuresLand_Ind_Stack_Big","CAStructures_Misc_Powerlines","CAStructures","CABuildings","CABuildings2","Ind_MalyKomin","CAStructures_A_CraneCon","CAStructures_Mil","CAStructures_Nav","CAStructures_Rail","A_Crane_02","A_TVTower","CAStructures_Railway","CAStructuresHouse","CAStructuresHouse_HouseBT"}; + requiredAddons[] = {"dayz_equip","dayz_weapons","dayz_sfx","CAMisc3","CABuildingParts","CABuildingParts_Signs","CAStructuresHouse","CAStructuresLand_Ind_Stack_Big","CAStructures_Misc_Powerlines","CAStructures","CABuildings","CABuildings2","Ind_MalyKomin","CAStructures_A_CraneCon","CAStructures_Mil","CAStructures_Nav","CAStructures_Rail","A_Crane_02","A_TVTower","CAStructures_Railway","CAStructuresHouse","CAStructuresHouse_HouseBT","asc_eu_lights"}; }; class DZ_DebriefingRemoved { @@ -40,7 +40,7 @@ class CfgMods hidePicture = 0; hideName = 0; action = "http://www.dayzepoch.com"; - version = "1.0.0.6"; + version = "1.0.0.7"; hiveVersion = 0.96; //0.93 }; }; @@ -633,8 +633,8 @@ class CfgBuildingLoot { {"DZ_ALICE_Pack_EP1","object"}, // 16 {"DZ_TK_Assault_Pack_EP1","object"}, // 16 {"DZ_British_ACU","object"}, // 18 - {"DZ_CompactPack_EP1","object"}, // 18-1 - {"DZ_TerminalPack_EP1","object"}, // 12-1 + {"DZ_CompactPack_EP1","object"}, // + {"DZ_TerminalPack_EP1","object"}, // { "Winchester1866","weapon" }, { "WeaponHolder_ItemTent","object" }, diff --git a/dayz_code/init/compiles.sqf b/dayz_code/init/compiles.sqf index 9313b5093..aa999f7eb 100644 --- a/dayz_code/init/compiles.sqf +++ b/dayz_code/init/compiles.sqf @@ -20,6 +20,7 @@ if (!isDedicated) then { player_weaponFiredNear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_weaponFiredNear.sqf"; player_animalCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_animalCheck.sqf"; player_spawnCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnCheck.sqf"; + player_dumpBackpack = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_dumpBackpack.sqf"; player_spawnLootCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnlootCheck.sqf"; player_spawnZedCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnzedCheck.sqf"; building_spawnLoot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnLoot.sqf"; @@ -87,6 +88,7 @@ if (!isDedicated) then { player_fillWater = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\water_fill.sqf"; player_makeFire = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_makefire.sqf"; player_chopWood = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_chopWood.sqf"; + player_goFishing = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_goFishing.sqf"; player_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_build.sqf"; player_wearClothes = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_wearClothes.sqf"; player_dropWeapon = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_dropWeapon.sqf"; @@ -434,6 +436,7 @@ if (!isDedicated) then { dayz_zombieSpeak = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_speak.sqf"; //Used to generate random speech for a unit vehicle_getHitpoints = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_getHitpoints.sqf"; local_gutObject = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_gutObject.sqf"; //Generated on the server (or local to unit) when gutting an object + local_lockUnlock = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_lockUnlock.sqf"; //When vehicle is local to unit perform locking vehicle local_gutObjectZ = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_gutObjectZ.sqf"; //Generated on the server (or local to unit) when gutting an object local_zombieDamage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandlerZ.sqf"; //Generated by the client who created a zombie to track damage local_setFuel = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_setFuel.sqf"; //Generated when someone refuels a vehicle diff --git a/dayz_code/init/publicEH.sqf b/dayz_code/init/publicEH.sqf index a9188ec43..9994aebc8 100644 --- a/dayz_code/init/publicEH.sqf +++ b/dayz_code/init/publicEH.sqf @@ -12,6 +12,8 @@ "dayzHit" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageHandler}; "dayzHitV" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageVehicle}; "dayzHideBody" addPublicVariableEventHandler {hideBody (_this select 1)}; +"dayzHideObject" addPublicVariableEventHandler {hideObject (_this select 1)}; +"dayzLockVehicle" addPublicVariableEventHandler {(_this select 1) spawn local_lockUnlock}; "dayzGutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject}; "dayzGutBodyZ" addPublicVariableEventHandler {(_this select 1) spawn local_gutObjectZ}; "dayzDelLocal" addPublicVariableEventHandler {(_this select 1) call object_delLocal}; diff --git a/dayz_code/init/variables.sqf b/dayz_code/init/variables.sqf index b69249cde..c98c62003 100644 --- a/dayz_code/init/variables.sqf +++ b/dayz_code/init/variables.sqf @@ -15,7 +15,7 @@ Soldier1_DZ = "Soldier1_DZ"; Rocket_DZ = "Rocket_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","FR_OHara_DZ","FR_Rodriguez_DZ","CZ_Soldier_Sniper_EP1_DZ","Graves_Light_DZ"]; -AllPlayersVehicles = ["AllVehicles"]+AllPlayers; +// AllPlayersVehicles = ["AllVehicles"]+AllPlayers; //Cooking meatraw = [ @@ -222,6 +222,7 @@ dayz_resetSelfActions = { s_player_followdog = -1; s_player_repair_crtl = -1; s_player_information = -1; + s_player_fuelauto = -1; s_player_fillgen = -1; }; call dayz_resetSelfActions; @@ -361,8 +362,11 @@ dayz_zSpawnDistance = 1000; if(isNil "dayz_maxLocalZombies") then { dayz_maxLocalZombies = 40; }; -if(isNil "dayz_maxGlobalZombies") then { - dayz_maxGlobalZombies = 30; +if(isNil "dayz_maxGlobalZombiesInit") then { + dayz_maxGlobalZombiesInit = 40; +}; +if(isNil "dayz_maxGlobalZombiesIncrease") then { + dayz_maxGlobalZombiesIncrease = 10; }; if(isNil "dayz_maxZeds") then { dayz_maxZeds = 500; @@ -384,7 +388,9 @@ 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","TentStorageDomed2", "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","StickFence_DZ"]; +dayz_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "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","StickFence_DZ","LightPole_DZ","FuelPump_DZ"]; + +dayz_fuelpumparray = ["FuelPump_DZ","Land_A_FuelStation_Feed","Land_Ind_FuelStation_Feed_EP1","Land_FuelStation_Feed_PMC","FuelStation","Land_ibr_FuelStation_Feed","Land_fuelstation_army","Land_fuelstation","land_fuelstation_w"]; dayz_spawnPos = getPosATL player; diff --git a/dayz_code/rscTitles.hpp b/dayz_code/rscTitles.hpp index 08dccfc1f..d4107ef13 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.6 dev (1.7.6.1)"; + text = "DayZ Epoch 1.0.0.7 dev (1.7.6.1)"; y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)"; }; delete CA_TitleMainMenu; diff --git a/dayz_code/stringtable.xml b/dayz_code/stringtable.xml index 06ee84d94..9a8d23a14 100644 --- a/dayz_code/stringtable.xml +++ b/dayz_code/stringtable.xml @@ -537,9 +537,9 @@ Pro vytvoření ohniště je nutné mít v inventáři dřevo. - You must be in a forest and close to a tree to harvest wood. - You must be in a forest and close to a tree to harvest wood. - Sie müssen in einem Wald in der Nähe eines Baums sein, um Holz zu sammeln. + You must be close to a tree to harvest wood. + You must be close to a tree to harvest wood. + Sie müssen Nähe eines Baums sein, um Holz zu sammeln. Вы должны находится в лесу и подойти к дереву, чтобы нарубить дров. Debes estar en el bosque y cerca de un árbol para recoger leña. Je moet in een bos en in de buurt van een boom zijn om hout te hakken. diff --git a/dayz_code/system/player_monitor.fsm b/dayz_code/system/player_monitor.fsm index e7f3be9b7..c52ed0362 100644 --- a/dayz_code/system/player_monitor.fsm +++ b/dayz_code/system/player_monitor.fsm @@ -34,9 +34,9 @@ item29[] = {"Load_In",2,250,-75.000000,850.000000,25.000000,900.000000,0.000000, item30[] = {"Bad_Version",4,218,50.000000,650.000000,150.000000,700.000000,0.000000,"Bad" \n "Version"}; item31[] = {"ERROR__Bad_Versi",2,250,175.000000,650.000000,275.000000,700.000000,0.000000,"ERROR:" \n "Bad Version"}; item32[] = {"Display_Ready",4,218,-175.000000,900.000000,-75.000000,950.000000,0.000000,"Display" \n "Ready"}; -item33[] = {"Preload_Display",2,4346,-75.000000,950.000000,25.000000,1000.000000,0.000000,"Preload" \n "Display"}; +item33[] = {"Preload_Display",2,250,-75.000000,950.000000,25.000000,1000.000000,0.000000,"Preload" \n "Display"}; item34[] = {"Preload_Done",4,218,-175.000000,1000.000000,-75.000000,1050.000000,0.000000,"Preload" \n "Done"}; -item35[] = {"Initialize",2,250,-75.000000,1050.000000,25.000000,1100.000000,0.000000,"Initialize"}; +item35[] = {"Initialize",2,4346,-75.000000,1050.000000,25.000000,1100.000000,0.000000,"Initialize"}; item36[] = {"Finish",1,250,-75.000000,1150.000000,25.000000,1200.000000,0.000000,"Finish"}; item37[] = {"True",8,218,25.000000,1100.000000,125.000000,1150.000000,0.000000,"True"}; item38[] = {"Too_Long",4,218,300.000000,150.000000,400.000000,200.000000,0.000000,"Too" \n "Long"}; @@ -119,8 +119,8 @@ link59[] = {51,52}; link60[] = {52,29}; link61[] = {53,54}; link62[] = {54,20}; -globals[] = {25.000000,1,0,0,0,640,480,1,85,6316128,1,-390.091248,277.974548,1239.554443,681.356201,754,630,1}; -window[] = {2,-1,-1,-1,-1,786,26,997,26,3,772}; +globals[] = {25.000000,1,0,0,0,640,480,1,85,6316128,1,-390.091248,277.974548,1208.543457,428.837982,567,630,1}; +window[] = {2,-1,-1,-1,-1,760,22,993,0,3,585}; *//*%FSM*/ class FSM { @@ -1130,6 +1130,13 @@ class FSM " sleep 60;" \n " };" \n "};" \n + "" \n + "dayz_backpackcheck = [] spawn {" \n + " while {true} do {" \n + " call player_dumpBackpack;" \n + " sleep 1;" \n + " };" \n + "};" \n "//Removed for now" \n "//[] execVM ""\z\addons\dayz_code\system\antihack.sqf"";" \n "" \n diff --git a/dayz_equip/config.cpp b/dayz_equip/config.cpp index f317a6a31..95a57ea04 100644 --- a/dayz_equip/config.cpp +++ b/dayz_equip/config.cpp @@ -1329,6 +1329,17 @@ class CfgMagazines }; }; }; + class ItemLightBulb: CA_Magazine + { + scope = 2; + count = 1; + type = 256; + displayName = "Light Bulb"; + // TODO model + texture + model = "\dayz_equip\models\fad.p3d"; + picture = "\dayz_equip\textures\equip_fad_ca.paa"; + descriptionShort = "Light Bulb"; + }; class PartFueltank: CA_Magazine { scope = 2; @@ -2236,6 +2247,46 @@ class CfgMagazines }; }; }; + class fuel_pump_kit: CA_Magazine + { + scope = 2; + count = 1; + type = 256; + displayName = "Fuel Pump"; + descriptionShort = "Fuel Pump"; + model = "\dayz_equip\models\supply_crate.p3d"; + picture = "\dayz_equip\textures\equip_wooden_crate_ca.paa"; + class ItemActions + { + class Build + { + text = "$STR_ACTIONS_BUILD"; + script = "spawn player_build;"; + require[] = {"ItemEtool","ItemToolbox"}; + create = "FuelPump_DZ"; + }; + }; + }; + class light_pole_kit: CA_Magazine + { + scope = 2; + count = 1; + type = 256; + displayName = "Light Pole"; + descriptionShort = "Light Pole"; + model = "\dayz_equip\models\supply_crate.p3d"; + picture = "\dayz_equip\textures\equip_wooden_crate_ca.paa"; + class ItemActions + { + class Build + { + text = "$STR_ACTIONS_BUILD"; + script = "spawn player_build;"; + require[] = {"ItemEtool","ItemToolbox"}; + create = "LightPole_DZ"; + }; + }; + }; class stick_fence_kit: CA_Magazine { scope = 2; @@ -2660,7 +2711,7 @@ class CfgVehicles displayName = "Fuel Pump"; vehicleClass = "Fortifications"; constructioncount = 5; - // removeoutput[] = {{"ItemFuelPump",1}}; + removeoutput[] = {{"ItemFuelPump",1}}; }; class Fort_RazorWire : BuiltItems { @@ -2736,6 +2787,8 @@ class CfgVehicles class USMC_WarfareBMGNest_M240; class M240Nest_DZ: USMC_WarfareBMGNest_M240 { + destrType = "DestructBuilding"; + armor = 450; scope = 2; offset[] = {0,3.5,0}; displayName = "M240 Nest"; @@ -2750,6 +2803,7 @@ class CfgVehicles class Land_covering_hut_EP1; class CanvasHut_DZ: Land_covering_hut_EP1 { + armor = 200; scope = 2; offset[] = {0,2.5,1}; displayName = "Canvas Hut"; @@ -2762,10 +2816,12 @@ class CfgVehicles offset[] = {0,1.5,0.5}; displayName = "Wood Bench"; vehicleClass = "Fortifications"; + removeoutput[] = {{"park_bench_kit",1}}; }; class Land_Wall_Gate_Ind1_L; class MetalGate_DZ: Land_Wall_Gate_Ind1_L { + armor = 400; scope = 2; offset[] = {0,2.5,1}; displayName = "Rusty Gate"; @@ -2775,6 +2831,7 @@ class CfgVehicles class Land_KBud; class OutHouse_DZ: Land_KBud { + armor = 200; scope = 2; offset[] = {0,2.5,1}; displayName = "Outhouse"; @@ -2795,6 +2852,7 @@ class CfgVehicles class Land_Shed_M01; class StorageShed_DZ: Land_Shed_M01 { + armor = 400; scope = 2; offset[] = {0,2.5,1}; displayName = "Storage Shed"; @@ -2807,6 +2865,7 @@ class CfgVehicles class Fence_corrugated_plate; class Fence_corrugated_DZ: Fence_corrugated_plate { + armor = 300; scope = 2; offset[] = {0,2.5,1}; removeoutput[] = {{"ItemCorrugated",1}}; @@ -2818,10 +2877,9 @@ class CfgVehicles class WoodShack_DZ: Land_kulna { scope = 2; - //destrType = "DestructBuilding"; - //cost = 100; + destrType = "DestructBuilding"; offset[] = {0,2.5,1.3}; - //armor = 200; + armor = 200; displayName = "Wooden Shack"; vehicleClass = "Fortifications"; transportMaxMagazines = 100; @@ -2833,10 +2891,10 @@ class CfgVehicles class Wooden_shed_DZ: Land_Shed_wooden { scope = 2; - //destrType = "DestructBuilding"; + destrType = "DestructBuilding"; //cost = 100; offset[] = {0,2.5,1}; - //armor = 100; + armor = 400; displayName = "Wooden Shed"; vehicleClass = "Fortifications"; transportMaxMagazines = 200; @@ -2847,12 +2905,22 @@ class CfgVehicles class Wall_FenW2_6_EP1; class StickFence_DZ: Wall_FenW2_6_EP1 { + destrType = "DestructTree"; + armor = 200; scope = 2; offset[] = {0,2.5,0}; displayName = "Stick Fence"; vehicleClass = "Fortifications"; }; - + class ASC_EU_LHVOld; + class LightPole_DZ: ASC_EU_LHVOld + { + armor = 200; + scope = 2; + offset[] = {0,2.5,0}; + displayName = "Light Pole"; + vehicleClass = "Fortifications"; + }; class WoodGate_DZ: BuiltItems { scope = 2; @@ -2987,7 +3055,7 @@ class CfgVehicles model = "\dayz_equip\models\crowbar.p3d"; class eventHandlers { - init = "[(_this select 0),'cfgWeapons','MeleeCrowbar'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';"; + init = "[(_this select 0),'cfgWeapons','ItemCrowbar'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';"; }; }; class WeaponHolder_huntingrifle: WeaponHolderBase diff --git a/dayz_server/compile/server_publishObject.sqf b/dayz_server/compile/server_publishObject.sqf index ffcd62d80..7cba86c24 100644 --- a/dayz_server/compile/server_publishObject.sqf +++ b/dayz_server/compile/server_publishObject.sqf @@ -22,7 +22,7 @@ _object setVariable ["lastUpdate",time]; _object setVariable ["ObjectUID", _uid,true]; // _object setVariable ["characterID",_charID,true]; -_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}]; +_object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}]; // Test disabling simulation server side on buildables only. _object enableSimulation false; diff --git a/dayz_server/init/server_functions.sqf b/dayz_server/init/server_functions.sqf index ef8af8a11..6c8d7029b 100644 --- a/dayz_server/init/server_functions.sqf +++ b/dayz_server/init/server_functions.sqf @@ -49,6 +49,22 @@ vehicle_handleServerKilled = { _unit removeAllEventHandlers "GetOut"; }; +object_handleServerKilled = { + private["_unit","_objectID","_objectUID"]; + _unit = _this select 0; + + _objectID = _unit getVariable ["ObjectID","0"]; + _objectUID = _unit getVariable ["ObjectUID","0"]; + + [_objectID,_objectUID] call server_deleteObj; + + _unit removeAllMPEventHandlers "MPKilled"; + _unit removeAllEventHandlers "Killed"; + _unit removeAllEventHandlers "HandleDamage"; + _unit removeAllEventHandlers "GetIn"; + _unit removeAllEventHandlers "GetOut"; +}; + check_publishobject = { private["_allowed","_object","_playername","_allowedObjects"]; diff --git a/dayz_server/system/server_monitor.sqf b/dayz_server/system/server_monitor.sqf index 6c59ce932..643b446c4 100644 --- a/dayz_server/system/server_monitor.sqf +++ b/dayz_server/system/server_monitor.sqf @@ -99,7 +99,7 @@ serverVehicleCounter = []; clearMagazineCargoGlobal _object; if ((typeOf _object) in dayz_allowedObjects) then { - _object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}]; + _object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}]; // Test disabling simulation server side on buildables only. _object enableSimulation false; };