mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Update private tags
From
e69f8d5306
Moved dog files to the \dog\ folder and pzombie files to the \pzombie\
folder. Also removed some legacy files that are no longer used.
The actions\ and compile\ folders are fully up to date now
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
achievementClientMsg = {
|
||||
private ["_achievement","_player","_AchievementText","_text","_display"];
|
||||
private ["_achievement","_player","_AchievementText","_text","_display","_achievementID","_serverEvent"];
|
||||
|
||||
/* Only call this from the server
|
||||
achievementClientPV = [_achievementID];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
achievementServer = {
|
||||
private ["_playerOwnerID","_player","_achievementID","_achievements"];
|
||||
private ["_playerOwnerID","_player","_achievementID","_achievements"];
|
||||
|
||||
_achievementID = (_this select 0) select 0;
|
||||
_player = (_this select 0) select 1;
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
_object_type = typeOf cursorTarget;
|
||||
_fuellevels = fuel cursorTarget;
|
||||
_dmglevels = damage cursorTarget;
|
||||
|
||||
//remove action menu
|
||||
player removeAction s_player_debugCheck;
|
||||
s_player_debugCheck = -1;
|
||||
|
||||
hintSilent format ["Object: %1, Fuel: %2, Damage: %3", _object_type, _fuellevels, _dmglevels];
|
||||
diag_log format ["Object: %1, Fuel: %2, Damage: %3", _object_type, _fuellevels, _dmglevels];
|
||||
@@ -1,4 +1,5 @@
|
||||
private["_bombData","_vehicle","_owner","_bombar"];
|
||||
private ["_bombData","_vehicle","_owner","_bombar","_bombCar","_bomb"];
|
||||
|
||||
_bombData = _this select 0;
|
||||
|
||||
_vehicle = _bombData select 0;
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
private["_location","_isOk","_dir","_classname"];
|
||||
_location = player modeltoworld [0,1,0];
|
||||
_location set [2,0];
|
||||
_isOk = count (_location isFlatEmpty [0.5,0,0,4,0,false,player]) > 0;
|
||||
|
||||
if (_isOk) then {
|
||||
_dir = getDir player;
|
||||
_classname = "Land_Fire";
|
||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
||||
player playActionNow "Medic";
|
||||
uiSleep 6;
|
||||
dayz_hasFire = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
dayz_hasFire setDir _dir;
|
||||
player reveal dayz_hasFire;
|
||||
cutText [localize "str_fireplace_01", "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [localize "str_fireplace_02", "PLAIN DOWN"];
|
||||
};
|
||||
@@ -1,4 +1,5 @@
|
||||
private["_flare"];
|
||||
private ["_flare"];
|
||||
|
||||
_flare = _this select 3;
|
||||
player removeAction s_player_dropflare;
|
||||
detach _flare;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
private ["_flare","_text"];
|
||||
private["_flare","_text"];
|
||||
|
||||
_flare = _this select 3;
|
||||
player playActionNow "PutDown";
|
||||
uiSleep 2;
|
||||
@@ -14,7 +15,7 @@ dayz_hasLight = true;
|
||||
_text = getText (configFile >> "CfgAmmo" >> (typeOf _flare) >> "displayName");
|
||||
s_player_dropflare = player addAction [format[localize "str_actions_medical_16",_text], "\z\addons\dayz_code\actions\flare_drop.sqf",_flare, 1, false, true, "", ""];
|
||||
|
||||
while {(alive _flare) && dayz_hasLight} do {
|
||||
while {(alive _flare) and dayz_hasLight} do {
|
||||
uiSleep 0.1;
|
||||
};
|
||||
if (dayz_hasLight) then {
|
||||
|
||||
@@ -1,91 +1,65 @@
|
||||
private ["_qty","_started","_finished","_animState","_isMedic","_abort","_fillCounter","_dis","_sfx","_displayName","_fuelCans"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_34","PLAIN DOWN"];};
|
||||
DZE_ActionInProgress = true;
|
||||
private ["_qty","_dis","_sfx","_started","_finished","_animState","_isRefuel","_fuelcans","_qty20","_qty5","_qty40"];
|
||||
|
||||
player removeAction s_player_fillfuel;
|
||||
s_player_fillfuel = 1;
|
||||
//s_player_fillfuel = -1;
|
||||
|
||||
_fillCounter = 0;
|
||||
_abort = false;
|
||||
_fuelcans = ["ItemFuelcanEmpty","ItemJerrycanEmpty","ItemFuelBarrelEmpty"];
|
||||
|
||||
_fuelCans = [];
|
||||
_qty = 0;
|
||||
_qty = {_x in _fuelcans} count magazines player;
|
||||
|
||||
{
|
||||
if(_x == "ItemJerrycanEmpty" || _x == "ItemFuelBarrelEmpty") then {
|
||||
_fuelCans set [(count _fuelCans),_x];
|
||||
};
|
||||
} count magazines player;
|
||||
_qty20 = {_x == "ItemJerrycanEmpty"} count magazines player;
|
||||
_qty5 = {_x == "ItemFuelcanEmpty"} count magazines player;
|
||||
_qty40 = {_x == "ItemFuelBarrelEmpty"} count magazines player;
|
||||
|
||||
_qty = count _fuelCans;
|
||||
|
||||
{
|
||||
_displayName = getText (configFile >> "cfgMagazines" >> _x >> "displayName");
|
||||
|
||||
_fillCounter = _fillCounter + 1;
|
||||
|
||||
cutText [format[(localize "str_siphon_preparing"),_displayName], "PLAIN DOWN"];
|
||||
|
||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
||||
// force animation
|
||||
if (("ItemJerrycanEmpty" in magazines player) or ("ItemFuelcanEmpty" in magazines player) or ("ItemFuelBarrelEmpty" in magazines player)) then {
|
||||
player playActionNow "Medic";
|
||||
// Play sound && alert zombies
|
||||
|
||||
_dis=10;
|
||||
_dis=5;
|
||||
_sfx = "refuel";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
||||
|
||||
// Added Nutrition-Factor for work
|
||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
||||
|
||||
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 {
|
||||
_isRefuel = ["medic",_animState] call fnc_inString;
|
||||
if (_isRefuel) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started && !_isMedic) then {
|
||||
if (_started and !_isRefuel) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
uiSleep 0.1;
|
||||
};
|
||||
|
||||
r_doLoop = false;
|
||||
|
||||
if (!_finished) exitWith {
|
||||
r_interrupt = false;
|
||||
if (vehicle player == player) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
cutText [localize "str_siphon_canceled","PLAIN DOWN"];
|
||||
_abort = true;
|
||||
};
|
||||
|
||||
if (_finished) then {
|
||||
if(([player,_x] call BIS_fnc_invRemove) == 1) then {
|
||||
if (_x == "ItemFuelBarrelEmpty") then {
|
||||
player addMagazine "ItemFuelBarrel";
|
||||
} else {
|
||||
player addMagazine "ItemJerrycan";
|
||||
};
|
||||
cutText [format[(localize "str_epoch_player_134"),_displayName], "PLAIN DOWN"];
|
||||
} else {
|
||||
_abort = true;
|
||||
for "_x" from 1 to _qty20 do {
|
||||
player removeMagazine "ItemJerrycanEmpty";
|
||||
player addMagazine "ItemJerrycan";
|
||||
};
|
||||
for "_x" from 1 to _qty5 do {
|
||||
player removeMagazine "ItemFuelcanEmpty";
|
||||
player addMagazine "ItemFuelcan";
|
||||
};
|
||||
for "_x" from 1 to _qty40 do {
|
||||
player removeMagazine "ItemFuelBarrelEmpty";
|
||||
player addMagazine "ItemFuelBarrel";
|
||||
};
|
||||
};
|
||||
|
||||
uiSleep 1;
|
||||
if(_abort) exitWith {};
|
||||
|
||||
} count _fuelCans;
|
||||
|
||||
s_player_fillfuel = -1;
|
||||
cutText [format [localize "str_player_09",_qty], "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [localize "str_player_10", "PLAIN DOWN"];
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
@@ -1,4 +1,4 @@
|
||||
//Code developed by Axe Cop - Massiv improvments && performance tunes by Skaronator
|
||||
//Code developed by Axe Cop - Massiv improvments and performance tunes by Skaronator
|
||||
private ["_missing","_missingQty","_proceed","_itemIn","_countIn","_qty","_num_removed","_uniqueID","_removed","_removed_total","_tobe_removed_total","_obj","_objectID","_objectUID","_classname","_location","_dir","_objectCharacterID","_object","_temp_removed_array","_textMissing","_target","_objectClasses","_range","_objects","_requirements","_count","_cost","_itemText","_option"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {cutText [localize "STR_EPOCH_ACTIONS_2","PLAIN DOWN"];};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
private ["_status","_array","_object","_items","_classname","_text","_build","_inside","_location","_nearObjects","_dis","_sfx", "_variables"];
|
||||
private ["_status","_array","_object","_items","_classname","_text","_build","_inside","_location","_nearObjects","_dis","_sfx","_variables","_ghost","_keepOnSlope","_direction","_passcode"];
|
||||
|
||||
_array = _this select 3;
|
||||
|
||||
_ghost = _array select 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
private ["_cursorTarget","_onLadder","_isWater","_alreadyRemoving","_characterID","_objectID","_objectUID","_ownerArray","_dir",
|
||||
"_realObjectStillThere","_upgrade","_entry","_parent","_requiredParts","_requiredTools","_model","_toolsOK","_displayname",
|
||||
"_whpos","_i","_wh","_object"];
|
||||
"_realObjectStillThere","_upgrade","_entry","_parent","_requiredParts","_requiredTools","_model","_toolsOK","_displayname",
|
||||
"_whpos","_i","_wh","_object","_msg","_vector","_dis","__FILE__","_puid","_variables"];
|
||||
|
||||
|
||||
_cursorTarget = _this select 3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_object","_proceed","_pos","_rndattemps","_limit","_dismantleToo","_pos","_ownerID","_objectID","_objectUID","_playerID","_claimedBy","_tools"];
|
||||
private ["_object","_proceed","_rndattemps","_limit","_dismantleToo","_ownerID","_objectID","_objectUID","_playerID","_claimedBy","_tools","_exit","_end","_onLadder","_isWater","_isOk","_counter","_text","_dis","_sfx","_animState","_started","_finished","_isMedic","_holder"];
|
||||
|
||||
_object = _this;
|
||||
_proceed = false;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#define MAINTENANCE_NUTRITION_VALUES [20,40,15,0]
|
||||
|
||||
|
||||
private ["_isMedic","_cursorTarget"];
|
||||
private ["_isMedic","_cursorTarget","_item","_classname","_displayname","_requiredTools","_requiredParts","_onLadder","_isWater","_upgradeParts","_startMaintenance","_dis","_sfx","_started","_finished","_animState","_isRefuel"];
|
||||
|
||||
_cursorTarget = _this select 3;
|
||||
|
||||
|
||||
@@ -9,39 +9,10 @@
|
||||
};
|
||||
|
||||
*/
|
||||
private
|
||||
[
|
||||
"_objclass",
|
||||
"_cursorTarget",
|
||||
"_item",
|
||||
"_classname",
|
||||
"_requiredTools",
|
||||
"_requiredParts",
|
||||
"_upgrade",
|
||||
"_upgradeConfig",
|
||||
"_upgradeDisplayname",
|
||||
"_onLadder",
|
||||
"_isWater",
|
||||
"_upgradeParts",
|
||||
"_startUpgrade",
|
||||
"_missingPartsConfig",
|
||||
"_textMissingParts",
|
||||
"_dis",
|
||||
"_sfx",
|
||||
"_ownerID",
|
||||
"_objectID",
|
||||
"_objectUID",
|
||||
"_alreadyupgrading",
|
||||
"_pos",
|
||||
"_dir",
|
||||
"_weapons",
|
||||
"_magazines",
|
||||
"_backpacks",
|
||||
"_object",
|
||||
"_objWpnTypes",
|
||||
"_objWpnQty",
|
||||
"_countr"
|
||||
];
|
||||
private ["_objclass","_cursorTarget","_item","_classname","_requiredTools","_requiredParts","_upgrade","_upgradeConfig",
|
||||
"_upgradeDisplayname","_onLadder","_isWater","_upgradeParts","_startUpgrade","_missingPartsConfig","_textMissingParts","_dis",
|
||||
"_sfx","_ownerID","_objectID","_objectUID","_alreadyupgrading","_dir","_weapons","_magazines","_backpacks",
|
||||
"_object","_objWpnTypes","_objWpnQty","_countr","_itemName","_msg","_vector"];
|
||||
|
||||
_cursorTarget = _this select 0;
|
||||
|
||||
|
||||
@@ -9,39 +9,10 @@
|
||||
};
|
||||
|
||||
*/
|
||||
private
|
||||
[
|
||||
"_objclass",
|
||||
"_cursorTarget",
|
||||
"_item",
|
||||
"_classname",
|
||||
"_requiredTools",
|
||||
"_requiredParts",
|
||||
"_upgrade",
|
||||
"_upgradeConfig",
|
||||
"_upgradeDisplayname",
|
||||
"_onLadder",
|
||||
"_isWater",
|
||||
"_upgradeParts",
|
||||
"_startUpgrade",
|
||||
"_missingPartsConfig",
|
||||
"_textMissingParts",
|
||||
"_dis",
|
||||
"_sfx",
|
||||
"_ownerID",
|
||||
"_objectID",
|
||||
"_objectUID",
|
||||
"_alreadyupgrading",
|
||||
"_pos",
|
||||
"_dir",
|
||||
"_weapons",
|
||||
"_magazines",
|
||||
"_backpacks",
|
||||
"_object",
|
||||
"_objWpnTypes",
|
||||
"_objWpnQty",
|
||||
"_countr"
|
||||
];
|
||||
private ["_objclass","_cursorTarget","_item","_classname","_requiredTools","_requiredParts","_upgrade","_upgradeConfig",
|
||||
"_upgradeDisplayname","_onLadder","_isWater","_upgradeParts","_startUpgrade","_missingPartsConfig","_textMissingParts","_dis",
|
||||
"_sfx","_ownerID","_objectID","_objectUID","_alreadyupgrading","_dir","_weapons","_magazines","_backpacks","_object",
|
||||
"_objWpnTypes","_objWpnQty","_countr","_itemName","_msg","_vector"];
|
||||
|
||||
_objclass = _this;
|
||||
_cursorTarget = _this select 3;
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
debugged by facoptere@gmail.com
|
||||
*/
|
||||
|
||||
private ["_cursorTarget","_type","_class","_requiredTools","_requiredParts","_upgradeType","_producedParts","_randomCreate",
|
||||
"_upgradeClass","_msg","_onLadder","_isWater","_ok","_missing","_upgradeParts","_dis","_characterID","_objectID","_objectUID",
|
||||
"_ownerArray","_ownerPasscode","_dir","_vector","_object","_puid","_clanArray","_wh","_variables"];
|
||||
|
||||
//systemchat str _this;
|
||||
if (!isnil "faco_object_upgradeBuilding") exitWith { _this call faco_object_upgradeBuilding };
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
private ["_unit","_unconcious","_inVeh","_alive"];
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
_unit = _this select 3;
|
||||
_unconcious = _unit getVariable ["NORRN_unconscious", false];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
private ["_array","_object","_type"];
|
||||
|
||||
_array = _this select 3;
|
||||
_object = _array select 0;
|
||||
_type = TypeOf(_object);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Please request permission to use/alter from Alby.
|
||||
*/
|
||||
|
||||
private["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace"];
|
||||
private ["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace","_overwrite","_orignalClass","_index","_entry","_avail","_selection","_item","_amount","_itemName","_freeSlots","_slotType","_i","_j"];
|
||||
disableSerialization;
|
||||
["close"] call fn_updateCraftUI;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ if (dayZ_OnBack != "") exitWith {closeDialog 0; cutText [format [localize "str_p
|
||||
|
||||
call gear_ui_init;
|
||||
|
||||
if (_item in ["ItemHatchet","ItemHatchet_DZE","ItemCrowbar","ItemMachete","ItemFishingPole","ItemSledge"]) then {
|
||||
if (_item in ["ItemHatchet","ItemCrowbar","ItemMachete","ItemFishingPole","ItemHatchet_DZE","ItemSledge"]) then {
|
||||
//free primary slot for new melee (remember item to add after)
|
||||
switch (_item) do {
|
||||
case "ItemHatchet": {player removeWeapon "ItemHatchet"; dayz_onBack = "MeleeHatchet";};
|
||||
|
||||
@@ -11,15 +11,7 @@
|
||||
|
||||
#include "\z\addons\dayz_code\util\Player.hpp"
|
||||
|
||||
private
|
||||
[
|
||||
"_attachment",
|
||||
"_weapon",
|
||||
"_config",
|
||||
"_newWeapon",
|
||||
"_weaponInUse",
|
||||
"_muzzle"
|
||||
];
|
||||
private ["_attachment","_weapon","_config","_newWeapon","_weaponInUse","_muzzle"];
|
||||
|
||||
//check if player is on a ladder and if so, exit
|
||||
if (Player_IsOnLadder()) exitWith
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
private["_theBomb","_vehicle","_curFuel","_newFuel","_timeLeft","_hasToolbox","_hasCarBomb","_dis","_sfx","_alreadyBombed","_hasCrowbar"];
|
||||
private ["_theBomb","_vehicle","_curFuel","_newFuel","_timeLeft","_hasToolbox","_hasCarBomb","_dis","_sfx","_alreadyBombed","_hasCrowbar"];
|
||||
|
||||
_vehicle = _this select 3;
|
||||
_hasToolbox = "ItemToolbox" in items player;
|
||||
_hasCrowbar = "ItemCrowbar" in items player;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
private ["_target", "_pos", "_gps", "_vars", "_hasToolbox", "_hasCrowbar", "_limit", "_proceed", "_counter", "_dis", "_sfx", "_roll", "_animState", "_started", "_finished", "_animState", "_isMedic","_isGate"];
|
||||
|
||||
private ["_brokein","_isOk","_hasSledgeHammer","_gps","_vars","_hasToolbox","_hasCrowbar","_limit","_proceed","_counter",
|
||||
"_dis","_sfx","_roll","_animState","_started","_finished","_isMedic","_isGate"];
|
||||
_target = _this select 3;
|
||||
_pos = getPos _target;
|
||||
_isGate = (typeOf cursorTarget) in ["WoodenGate_2","WoodenGate_3","WoodenGate_4"];
|
||||
@@ -148,6 +148,6 @@ if (_proceed and _brokein) then {
|
||||
titleText ["Break in attempt successful.", "PLAIN DOWN", 0.3];
|
||||
|
||||
//Open Gate.
|
||||
_target animate ["DoorR", 0];
|
||||
_target animate ["DoorL", 0];
|
||||
_target animate ["DoorR", 1];
|
||||
_target animate ["DoorL", 1];
|
||||
};
|
||||
@@ -1,6 +1,11 @@
|
||||
// (c) facoptere@gmail.com, licensed to DayZMod for the community
|
||||
private ["_classType","_item","_action","_missingTools","_missingItem","_emergingLevel","_isClass","_classname","_requiredTools","_requiredParts ","_ghost","_placement","_text","_onLadder","_isWater","_object","_string","_actionBuildHidden","_getBeams","_o","_offset","_rot","_r","_p","_bn","_bb","_h","_bx","_by","_minElevation","_maxElevation","_insideCheck","_building","_unit","_bbb","_ubb","_check","_min","_max","_myX","_myY","_checkBuildingCollision","_objColliding","_inside","_checkOnRoad","_roadCollide","_checkBeam2Magnet","_a","_beams","_best","_b","_d","_checkNotBuried","_elevation","_position","_delta","_overElevation","_maxplanting","_safeDistance","_dir","_angleRef","_tmp","_actionCancel","_sfx","_actionBuild"];
|
||||
|
||||
private ["_classType","_item","_action","_missingTools","_missingItem","_emergingLevel","_isClass","_classname","_requiredTools",
|
||||
"_requiredParts","_ghost","_placement","_text","_onLadder","_isWater","_object","_string","_actionBuildHidden","_getBeams",
|
||||
"_o","_offset","_rot","_r","_p","_bn","_bb","_h","_bx","_by","_minElevation","_maxElevation","_insideCheck","_building",
|
||||
"_unit","_bbb","_ubb","_check","_min","_max","_myX","_myY","_checkBuildingCollision","_objColliding","_inside","_checkOnRoad",
|
||||
"_roadCollide","_checkBeam2Magnet","_a","_beams","_best","_b","_d","_checkNotBuried","_elevation","_position","_delta","_overElevation",
|
||||
"_maxplanting","_safeDistance","_dir","_angleRef","_tmp","_actionCancel","_sfx","_actionBuild","_byPassChecks","_keepOnSlope","_msg",
|
||||
"_ok","_missing","_upgradeParts","_ownerID","_posReference"];
|
||||
/*
|
||||
Needs a full rewrite to keep up with the demand of everything we plan to add.
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Please request permission to use/alter from Alby.
|
||||
*/
|
||||
|
||||
private ["_items","_counts","_config","_isRecipe","_item","_index","_amount","_count","_entry","_input","_array"];
|
||||
private ["_items","_counts","_config","_isRecipe","_item","_index","_amount","_count","_entry","_input","_array","_overwrite","_i","_inputIndex","_inputItems"];
|
||||
disableSerialization;
|
||||
|
||||
_array = _this select 0;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Please request permission to use/alter from Alby.
|
||||
*/
|
||||
|
||||
private ["_items","_counts","_config","_isRecipe","_item","_index","_amount","_count","_entry","_input","_array"];
|
||||
private ["_items","_counts","_config","_isRecipe","_item","_index","_amount","_count","_entry","_input","_array","_overwrite","_i","_inputIndex","_inputItems"];
|
||||
disableSerialization;
|
||||
|
||||
_array = _this select 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
private["_item","_result","_dis","_sfx","_num", "_breaking"];
|
||||
private ["_item","_result","_dis","_sfx","_num","_breaking","_countOut","_woodCutting","_trees","_findNearestTree","_objInfo","_lenInfo","_objName","_i","_k","_counter","_isOk","_proceed","_animState","_started","_finished","_isMedic","_itemOut"];
|
||||
|
||||
//if (!isnil "faco_player_chopWood") exitWith { _this call faco_player_chopWood };
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
private ["_create","_config","_create_magsize","_type","_name","_magCount","_slotstart","_slotend","_dialog","_qty_total_ammo","_control","_mag","_qtynew_create_mags_full","_qtynew_create_ammo_rest","_magFull","_magFullSingular","_magAmmunition"];
|
||||
|
||||
private ["_create","_config","_create_magsize","_type","_magCount","_slotstart","_slotend","_dialog","_qty_total_ammo","_control","_mag","_qtynew_create_mags_full","_qtynew_create_ammo_rest","_magFull","_magFullSingular","_magAmmunition","_i"];
|
||||
disableSerialization;
|
||||
call gear_ui_init;
|
||||
closeDialog 0;
|
||||
|
||||
@@ -11,15 +11,7 @@
|
||||
#define PILE_SEARCH_RADIUS 2
|
||||
#define PILE_PLAYER_OFFSET [0,1,0]
|
||||
|
||||
private
|
||||
[
|
||||
"_cfg",
|
||||
"_nutrition",
|
||||
"_bloodRegen",
|
||||
"_infectionChance",
|
||||
"_sound",
|
||||
"_output"
|
||||
];
|
||||
private ["_cfg","_nutrition","_bloodRegen","_infectionChance","_sound","_output","_hungerCount","_thirstCount","_soundDistance"];
|
||||
|
||||
_cfg = (ConfigFile >> "CfgMagazines" >> _this);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
failChance = 1;
|
||||
*/
|
||||
//diag_log("crafting system");
|
||||
private["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace"];
|
||||
private ["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace","_classname","_isClass","_onLadder","_hasTools","_avail","_selection","_item","_amount","_itemName","_freeSlots","_slotType","_i","_j","_dis","_sfx"];
|
||||
|
||||
//diag_log(str(isnil "r_player_crafting"));
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Please request permission to use/alter from Alby.
|
||||
*/
|
||||
|
||||
private["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace"];
|
||||
private ["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace","_overwrite","_nearByPile","_index","_entry","_nearByTable","_weaps","_mags","_objMagTypes","_objMagQty","_i","_obj","_return","_inArray","_avail","_selection","_item","_amount","_itemName","_freeSlots","_slotType","_j"];
|
||||
disableSerialization;
|
||||
["close"] call fn_updateCraftUI;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_qty_arrows","_qty_quivers","_qty_quiverarrows"];
|
||||
private ["_qty_arrows","_qty_quivers","_qty_quiverarrows"];
|
||||
call gear_ui_init;
|
||||
|
||||
_qty_arrows = {_x == "WoodenArrow"} count magazines player;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_cantype","_emptycan","_intensity","_objectID", "_objectUID"];
|
||||
private ["_cantype","_emptycan","_intensity","_objectID","_objectUID","_obj","_fuelArray","_matchArray","_alreadyDestorying","_randomJerryCan","_fireIntensity","_randomBoxMatches","_qtyRemaining","_dis","_sfx"];
|
||||
|
||||
//Tent Object
|
||||
_obj = _this select 3;
|
||||
|
||||
@@ -8,15 +8,7 @@
|
||||
Foxy
|
||||
*/
|
||||
|
||||
private
|
||||
[
|
||||
"_cfg",
|
||||
"_nutrition",
|
||||
"_bloodRegen",
|
||||
"_infectionChance",
|
||||
"_sound",
|
||||
"_output"
|
||||
];
|
||||
private ["_cfg","_nutrition","_bloodRegen","_infectionChance","_sound","_output"];
|
||||
|
||||
_cfg = (ConfigFile >> "CfgMagazines" >> _this);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_qty_arrows","_qty_quivers","_control","_qty_quiverarrows","_qty_quiverfreeslots","_qty_arrows2add"];
|
||||
private ["_qty_arrows","_qty_quivers","_control","_qty_quiverarrows","_qty_quiverfreeslots","_qty_arrows2add"];
|
||||
|
||||
disableSerialization;
|
||||
call gear_ui_init;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//fixHatchet old file
|
||||
private ["_tool","_tape","_fixedItem"];
|
||||
private ["_tool","_tape","_fixedItem","_config","_dName","_handle"];
|
||||
|
||||
_tool = _this;
|
||||
_config = configFile >> "CfgWeapons" >> _tool;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
private ["_plant", "_originalCount"];
|
||||
private ["_plant","_originalCount","_xx_leaf","_mags","_weps","_item","_magcounts","_forEachIndex","_wepcounts","_dis","_sfx"];
|
||||
|
||||
_plant = _this;
|
||||
|
||||
if (_plant getVariable["Gathering",false]) exitWith {};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
private ["_item","_result","_dis","_sfx","_num","_breaking","_counter","_rocks","_findNearestRock","_objInfo","_lenInfo","_objName","_i","_k","_countOut","_isOk","_proceed","_animState","_started","_finished","_isMedic","_itemOut","_wpPos","_nearByPile"];
|
||||
|
||||
private ["_item","_result","_dis","_sfx","_num","_breaking","_counter","_rocks","_findNearestRock","_objInfo","_lenInfo",
|
||||
"_objName","_i","_k","_countOut","_isOk","_proceed","_animState","_started","_finished","_isMedic","_itemOut","_wpPos","_nearByPile"];
|
||||
|
||||
_item = _this;
|
||||
call gear_ui_init;
|
||||
@@ -38,7 +38,7 @@ if (!isNull _findNearestRock) then {
|
||||
_countOut = 2 + floor(random 3);
|
||||
|
||||
//Remove melee magazines (BIS_fnc_invAdd fix) (add new melee ammo to array if needed)
|
||||
{player removeMagazines _x} forEach ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Fishing_Swing"];
|
||||
{player removeMagazines _x} forEach ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Fishing_Swing","Sledge_Swing"];
|
||||
|
||||
// Start stone mining loop
|
||||
_counter = 0;
|
||||
@@ -121,7 +121,7 @@ if (!isNull _findNearestRock) then {
|
||||
};
|
||||
_isOk = false;
|
||||
_proceed = true;
|
||||
uisleep 1;
|
||||
uiSleep 1;
|
||||
};
|
||||
cutText [format[localize "str_mining_progress", _counter,(_countOut - _counter)], "PLAIN DOWN"];
|
||||
};
|
||||
@@ -143,6 +143,8 @@ if (!isNull _findNearestRock) then {
|
||||
case "MeleeCrowbar": {player addMagazine 'Crowbar_Swing';};
|
||||
case "MeleeMachete": {player addMagazine 'Machete_Swing';};
|
||||
case "MeleeFishingPole": {player addMagazine 'Fishing_Swing';};
|
||||
case "MeleeHatchet_DZE": {player addMagazine 'Hatchet_Swing';};
|
||||
case "MeleeSledge": {player addMagazine 'Sledge_Swing';};
|
||||
};
|
||||
} else {
|
||||
cutText [localize "str_mining_no_rocks", "PLAIN DOWN"];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_target","_type","_fn_Lock","_fn_UnLock","_fn_Open","_fn_Closed"];
|
||||
private ["_type","_fn_Lock","_fn_UnLock","_fn_Open","_fn_Closed","_fn_Set","_fn_Lockold","_fn_UnLockold","_fn_BuildLock","_fn_BuildUnLock"];
|
||||
|
||||
_target = ((_this select 3) select 0);
|
||||
_type = ((_this select 3) select 1);
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
private ["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart","_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags","_qty_free_slots","_control","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags","_qtynew_consume_mags_full","_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest"];
|
||||
private ["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart",
|
||||
"_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags",
|
||||
"_qty_free_slots","_control","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags",
|
||||
"_qtynew_consume_mags_full","_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest","_mags","_i"];
|
||||
|
||||
disableSerialization;
|
||||
call gear_ui_init;
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
private ["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart","_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags","_qty_free_slots","_control","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags","_qtynew_consume_mags_full","_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest"];
|
||||
private ["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart",
|
||||
"_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags","_qty_free_slots",
|
||||
"_control","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags","_qtynew_consume_mags_full",
|
||||
"_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest","_mags","_i"];
|
||||
|
||||
disableSerialization;
|
||||
call gear_ui_init;
|
||||
|
||||
|
||||
@@ -12,15 +12,7 @@
|
||||
|
||||
#include "\z\addons\dayz_code\util\Player.hpp"
|
||||
|
||||
private
|
||||
[
|
||||
"_attachment",
|
||||
"_weapon",
|
||||
"_newWeapon",
|
||||
"_weaponInUse",
|
||||
"_newWeaponConfig",
|
||||
"_muzzle"
|
||||
];
|
||||
private ["_attachment","_weapon","_newWeapon","_weaponInUse","_newWeaponConfig","_muzzle"];
|
||||
|
||||
//check if player is on a ladder and if so, exit
|
||||
if (Player_IsOnLadder()) exitWith
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_item","_use","_repair","_waterUsed"];
|
||||
private ["_item","_use","_repair","_waterUsed","_displayName","_msg"];
|
||||
|
||||
//['ItemKnifeBlunt','ItemKnife']
|
||||
_item = _this select 0; //Item to be sharpened
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_qty_quivers","_control","_qty_quiverarrows","_empty","_emptymagslotcount"];
|
||||
private ["_qty_quivers","_control","_qty_quiverarrows","_empty","_emptymagslotcount"];
|
||||
|
||||
disableSerialization;
|
||||
call gear_ui_init;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_skin","_rnd","_rounded","_itemtocreate","_i"];
|
||||
private ["_skin","_rnd","_rounded","_itemtocreate","_i","_config","_infoText","_result","_nearByPile","_pile","__FILE__"];
|
||||
|
||||
_skin = _this;
|
||||
_config = configFile >> "CfgMagazines" >> _skin;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_item","_onLadder","_hasmeditem","_config","_text","_id"];
|
||||
private ["_item","_onLadder","_hasmeditem","_config","_text","_removeWeapon","_addWeapon","_hasitem","_display"];
|
||||
|
||||
//Old System
|
||||
|
||||
|
||||
@@ -1,37 +1,35 @@
|
||||
/*
|
||||
_item spawn player_wearClothes;
|
||||
Added Female skin changes - DayZ Epoch - vbawol
|
||||
*/
|
||||
private ["_item","_onLadder","_hasclothesitem","_config","_text","_myModel","_itemNew","_currentSex","_newSex","_model","_playerNear"];
|
||||
|
||||
if (_this in DZE_RestrictSkins) exitWith { cutText [format[(localize "str_epoch_player_315"),_this], "PLAIN DOWN"] };
|
||||
|
||||
if (_this in DZE_RestrictSkins) exitWith { cutText [format[localize "str_epoch_player_315",_this], "PLAIN DOWN"] };
|
||||
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_83","PLAIN DOWN"]};
|
||||
DZE_ActionInProgress = true;
|
||||
/*
|
||||
_item call player_wearClothes;
|
||||
Added Female skin changes - DayZ Epoch - vbawol
|
||||
*/
|
||||
private ["_item","_onLadder","_hasclothesitem","_config","_text","_isFemale","_myModel","_humanity","_isBandit","_isHero",
|
||||
"_itemNew","_model","_skinToArray","_finalArray","_skinToModel"];
|
||||
|
||||
_item = _this;
|
||||
call gear_ui_init;
|
||||
r_action_count = 0; //reset for strange glitch
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_21","PLAIN DOWN"]};
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith {cutText [localize "str_player_21", "PLAIN DOWN"]; DZE_ActionInProgress = false;};
|
||||
|
||||
_hasclothesitem = _this in magazines player;
|
||||
_config = configFile >> "CfgMagazines";
|
||||
_text = getText (_config >> _item >> "displayName");
|
||||
|
||||
if (!_hasclothesitem) exitWith { DZE_ActionInProgress = false; cutText [format[(localize "str_player_31"),_text,"wear"] , "PLAIN DOWN"]};
|
||||
|
||||
if (vehicle player != player) exitWith {DZE_ActionInProgress = false; cutText [localize "str_epoch_player_85","PLAIN DOWN"]};
|
||||
if (!_hasclothesitem) exitWith {cutText [format [localize "str_player_31",_text,localize "str_player_31_wear"] , "PLAIN DOWN"]; DZE_ActionInProgress = false;};
|
||||
|
||||
if (vehicle player != player) exitWith {cutText [localize "str_player_fail_wear1", "PLAIN DOWN"]; DZE_ActionInProgress = false;};
|
||||
//if (!isNull (unitBackpack player)) exitWith {DZE_ActionInProgress = false; cutText [localize "STR_EPOCH_ACTIONS_9","PLAIN DOWN"]};
|
||||
|
||||
if ("CSGAS" in (magazines player)) exitWith {DZE_ActionInProgress = false; cutText [localize "STR_EPOCH_ACTIONS_10","PLAIN DOWN"]};
|
||||
|
||||
_myModel = (typeOf player);
|
||||
_humanity = player getVariable ["humanity",0];
|
||||
_isBandit = _humanity < -2000;
|
||||
_isHero = _humanity > 5000;
|
||||
_itemNew = "Skin_" + _myModel;
|
||||
|
||||
//diag_log ("Debug Clothes: model In: " + str(_itemNew) + " Out: " + str(_item));
|
||||
|
||||
if ( (isClass(_config >> _itemNew)) ) then {
|
||||
if ( (isClass(_config >> _item)) ) then {
|
||||
// Current sex of player skin
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
//********************************************************************************************************************/
|
||||
|
||||
|
||||
private ["_h_human_disp","_top_value","_bot_value","_card_details","_h","_blank","_bandit_pic","_bandit_pic","_b_human_disp","_b_spades_top_suit","_b_spades_bot_suit","_b_clubs_top_suit","_b_clubs_bot_suit","_survivor_pic","_survivor_pic","_s_human_disp","_s_top_joker_b","_s_bot_joker_b","_s_top_joker_r","_s_bot_joker_r","_hero_pic","_hero_pic","_h_hearts_top_suit","_h_hearts_bot_suit","_h_diamonds_top_suit","_h_diamonds_bot_suit"];
|
||||
_h = (_this select 0) / 37037.037037;
|
||||
private ["_h_human_disp","_top_value","_bot_value","_card_details","_h","_blank","_bandit_pic","_b_human_disp","_b_spades_top_suit","_b_spades_bot_suit","_b_clubs_top_suit","_b_clubs_bot_suit","_survivor_pic","_s_human_disp","_s_top_joker_b","_s_bot_joker_b","_s_top_joker_r","_s_bot_joker_r","_hero_pic","_h_hearts_top_suit","_h_hearts_bot_suit","_h_diamonds_top_suit","_h_diamonds_bot_suit","_pl_pic","_humanity_readout","_top_joker","_bot_joker","_top_suit","_bot_suit"];_h = (_this select 0) / 37037.037037;
|
||||
|
||||
// we need to return these
|
||||
/*
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
private ["_ys","_ms","_ds","_b","_2","_6","_7","_8","_9","_10","_str_left_text","_1","_3","_4","_5","_blood_in_pack","_blood_in_inv","_mag_arr","_backpack","_11","_mags_for_weap","_mssv_cnt","_weapon","_config"];
|
||||
|
||||
private ["_ys","_ms","_ds","_b","_2","_6","_7","_8","_9","_10","_str_left_text","_1","_3","_4","_5","_blood_in_pack","_blood_in_inv","_mag_arr","_backpack","_11","_mags_for_weap","_mssv_cnt","_weapon","_config","_survivors","_moon","_spawnselection","_disabledTemperature"];
|
||||
_survivors = playersNumber west;
|
||||
|
||||
_str_left_text = "
|
||||
@@ -251,9 +250,9 @@ _disabledTemperature = switch (dayz_temperature_override) do {
|
||||
|
||||
// left page
|
||||
((uiNamespace getVariable "horde_myDisplay") displayCtrl 1800) ctrlSetStructuredText parseText format ["
|
||||
<t size='2' font='Zeppelin33' color = '#000000' align='center'>Survival Type: %14</t><br/>
|
||||
<br/>
|
||||
<t size='2' font='Zeppelin33' color = '#000000' align='left'>Health: </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%1</t><br/>
|
||||
<br/>
|
||||
<t size='2' font='Zeppelin33' color = '#000000' align='left'>Hunger: </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%2%</t><br/>
|
||||
<t size='2' font='Zeppelin33' color = '#000000' align='left'>Thirst: </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%3%</t><br/>
|
||||
<br/>
|
||||
@@ -287,7 +286,8 @@ _disabledTemperature = switch (dayz_temperature_override) do {
|
||||
(round diag_fps),
|
||||
(round diag_fpsmin),
|
||||
(_moon),
|
||||
(_disabledTemperature)
|
||||
(_disabledTemperature),
|
||||
(dayz_presets)
|
||||
];
|
||||
|
||||
// right page - blank until humanity is checked
|
||||
|
||||
@@ -7,7 +7,7 @@ disableSerialization;
|
||||
player removeAction s_player_butcher;
|
||||
s_player_butcher = 1;
|
||||
|
||||
if(!(alive _item)) then {
|
||||
if !(alive _item) then {
|
||||
|
||||
_rnd = (round(random 4)) + 1;
|
||||
_move = "ZombieFeed" + str(_rnd);
|
||||
@@ -68,7 +68,7 @@ if(!(alive _item)) then {
|
||||
|
||||
[player,"eat",0,false] call dayz_zombieSpeak;
|
||||
|
||||
// todo: dump loot on ground && then remove
|
||||
// todo: dump loot on ground and then remove
|
||||
|
||||
//Ensure Control is visible
|
||||
_display = uiNamespace getVariable 'DAYZ_GUI_display';
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_88","PLAIN DOWN"];};
|
||||
DZE_ActionInProgress = true;
|
||||
/*
|
||||
delete object from db with extra waiting by [VB]AWOL
|
||||
parameters: _obj
|
||||
*/
|
||||
private ["_activatingPlayer","_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_88","PLAIN DOWN"];};
|
||||
DZE_ActionInProgress = true;
|
||||
|
||||
player removeAction s_player_deleteBuild;
|
||||
s_player_deleteBuild = 1;
|
||||
|
||||
_obj = _this select 3;
|
||||
|
||||
_activatingPlayer = player;
|
||||
|
||||
_objOwnerID = _obj getVariable["CharacterID","0"];
|
||||
_isOwnerOfObj = (_objOwnerID == dayz_characterID);
|
||||
|
||||
@@ -248,3 +245,5 @@ if (_proceed) then {
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
s_player_deleteBuild = -1;
|
||||
|
||||
_obj
|
||||
@@ -1,4 +1,3 @@
|
||||
private [];
|
||||
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
|
||||
s_player_repair_crtl = -1;
|
||||
dayz_myCursorTarget = objNull;
|
||||
104
SQF/dayz_code/actions/tent_pitch.sqf
Normal file
104
SQF/dayz_code/actions/tent_pitch.sqf
Normal file
@@ -0,0 +1,104 @@
|
||||
private ["_item","_config","_text","_booleans","_worldspace","_dir","_location","_dis","_sfx","_tent","_classname","_object","_boundingBox","_maxPoint","_actionBuild","_actionCancel"];
|
||||
/*
|
||||
private ["_item", "_config", "_text", "_booleans", "_worldspace", "_dir", "_location", "_dis", "_sfx", "_tent"];
|
||||
|
||||
call gear_ui_init;
|
||||
|
||||
_item = _this;
|
||||
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
_text = getText (_config >> "displayName");
|
||||
_classname = getText (_config >> "tentmodel");
|
||||
|
||||
//diag_log ("Classname: "+str(_classname));
|
||||
//diag_log ("Item: "+str(_item));
|
||||
|
||||
if (r_action_count != 1) exitWith { cutText [localize "str_player_actionslimit", "PLAIN DOWN"]; };
|
||||
|
||||
// item is missing or tools are missing
|
||||
if ((!(_item IN magazines player))) exitWith {
|
||||
r_action_count = 0;
|
||||
cutText [format [localize "str_player_31",_text,localize "str_player_31_pitch"] , "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
_booleans = []; //testonLadder, testSea, testPond, testBuilding, testSlope, testDistance
|
||||
|
||||
//remove tentbag
|
||||
player removeMagazine _item;
|
||||
//_dir = _worldspace select 0;
|
||||
//_location = _worldspace select 1;
|
||||
|
||||
//wait a bit
|
||||
//player playActionNow "Medic";
|
||||
sleep 1;
|
||||
// tent location may not be in front of player
|
||||
//player setDir _dir;
|
||||
//player setPosATL (getPosATL player);
|
||||
|
||||
_dis=20;
|
||||
_sfx = "tentunpack";
|
||||
|
||||
//sleep 5;
|
||||
|
||||
cutText [localize "str_player_build_rotate", "PLAIN DOWN"];
|
||||
_location = getMarkerpos "respawn_west";
|
||||
_object = createVehicle [_classname, _location, [], 0, "NONE"];
|
||||
|
||||
// Attach item
|
||||
_boundingBox = boundingBox _object;
|
||||
_maxPoint = ((_boundingBox select 1) select 0) max ((_boundingBox select 1) select 1);
|
||||
_object setPosATL [getPosATL _object select 0, getPosATL _object select 1, 0.01];
|
||||
_object attachTo [player, [0, _maxPoint + 1, 0.3]];
|
||||
|
||||
//Vars
|
||||
player setVariable ["constructionObject", _object];
|
||||
_object setVariable ["characterID",dayz_characterID,true];
|
||||
|
||||
//Actions
|
||||
_actionBuild = player addAction [localize "str_player_build_complete", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _item, _classname, _text, true, _booleans, _dis, _sfx], 1, true];
|
||||
_actionCancel = player addAction [localize "str_player_build_cancel", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _item, _classname, _text, false, _booleans, _dis, _sfx], 1, true];
|
||||
|
||||
sleep 0.01;
|
||||
|
||||
while {!isNull (player getVariable "constructionObject")} do {
|
||||
if (vehicle player != player) then {
|
||||
player action ["eject", vehicle player];
|
||||
};
|
||||
|
||||
if (speed player > 10 or speed player <= -8) then {
|
||||
cutText [localize "str_player_build_movingfast", "PLAIN DOWN"];
|
||||
player playMove "amovpercmstpssurwnondnon";
|
||||
};
|
||||
|
||||
sleep 0.2;
|
||||
|
||||
if (!alive player) then {
|
||||
[[],[],[],[_object, _item, _classname, _text, false, _booleans, _dis, _sfx]] call object_build;
|
||||
};
|
||||
};
|
||||
|
||||
player removeAction _actionBuild;
|
||||
player removeAction _actionCancel;
|
||||
*/
|
||||
/*
|
||||
sleep 5;
|
||||
|
||||
_tent = createVehicle ["TentStorage", getMarkerpos "respawn_west", [], 0, "CAN_COLLIDE"];
|
||||
_tent setDir _dir;
|
||||
_tent setPos _location; // follow terrain slope (works above sea level)
|
||||
player reveal _tent;
|
||||
_location = getPosATL _tent;
|
||||
|
||||
_tent setVariable ["characterID",dayz_characterID,true];
|
||||
PVDZ_obj_Publish = [dayz_characterID,_tent,[_dir,_location],_classname];
|
||||
publicVariableServer "PVDZ_obj_Publish";
|
||||
|
||||
cutText [localize "str_success_tent_pitch", "PLAIN DOWN"];
|
||||
sleep 1;
|
||||
r_action_count = 0;
|
||||
|
||||
} else {
|
||||
r_action_count = 0;
|
||||
cutText [localize "str_fail_tent_pitch", "PLAIN DOWN"];
|
||||
};
|
||||
*/
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
private ["_array","_location","_dir","_classname","_weapon"];
|
||||
_array = _this select 3;
|
||||
_location = player modeltoworld [0,1,0];
|
||||
_dir = getDir player;
|
||||
_classname = _array select 0;
|
||||
removeBackpack player;
|
||||
player playActionNow "Medic";
|
||||
uiSleep 8;
|
||||
player removeAction r_player_action_bag;
|
||||
r_action_bag = false;
|
||||
_weapon = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
_weapon setDir _dir;
|
||||
//_weapon setpos _location;
|
||||
player reveal _weapon;
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Created exclusively for ArmA2:OA - DayZMod && DayZ Epoch. Script by icomrade.
|
||||
permission is required to use, alter &&/|| distribute from the author || project leader.
|
||||
Created exclusively for ArmA2:OA - DayZMod and DayZ Epoch. Script by icomrade.
|
||||
permission is required to use, alter and/or distribute from the author or project leader.
|
||||
*/
|
||||
private ["_array","_count","_action","_driver","_vehicle","_vehicleType","_emptySeat","_emptyGun"];
|
||||
_array = _this select 3;
|
||||
|
||||
@@ -1,70 +1,92 @@
|
||||
private ["_text","_qty","_canFill","_isWell","_objectsWell","_pondPos","_isPond","_objectsPond","_dis","_sfx","_playerPos","_onLadder","_hasbottleitem","_config"];
|
||||
#include "\z\addons\dayz_code\util\player.hpp"
|
||||
|
||||
private ["_water","_filled","_canFill","_infected","_well"];
|
||||
|
||||
call gear_ui_init;
|
||||
closeDialog 0;
|
||||
|
||||
_playerPos = getPosATL player;
|
||||
_canFill = count nearestObjects [_playerPos, ["Land_pumpa","Land_water_tank","Land_Misc_Well_L_EP1","Land_Misc_Well_C_EP1","Land_Barrel_water"], 4] > 0;
|
||||
_isPond = false;
|
||||
_isWell = false;
|
||||
_pondPos = [];
|
||||
_objectsWell = [];
|
||||
if Player_IsOnLadder() exitWith { (localize "str_player_21") call dayz_rollingMessages; };
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith {cutText [localize "str_player_21","PLAIN DOWN"]};
|
||||
_water = call
|
||||
{
|
||||
private ["_canFill", "_infected"];
|
||||
|
||||
_hasbottleitem = _this in magazines player;
|
||||
_canFill = count nearestObjects [player, ["Land_pumpa","Land_water_tank","Land_Barrel_water"], 4] > 0;
|
||||
|
||||
_config = configFile >> "CfgMagazines" >> _this;
|
||||
_text = getText (_config >> "displayName");
|
||||
if (_canFill) exitWith { "safe" };
|
||||
|
||||
if (!_hasbottleitem) exitWith {cutText [format[(localize "str_player_31"),_text,"fill"] , "PLAIN DOWN"]};
|
||||
|
||||
if (!dayz_isSwimming) then {
|
||||
player playActionNow "PutDown";
|
||||
};
|
||||
|
||||
if (!_canFill) then {
|
||||
_objectsWell = nearestObjects [_playerPos, [], 4];
|
||||
//Check for wells
|
||||
{
|
||||
//Check for Well
|
||||
_isWell = ["_well",str(_x),false] call fnc_inString;
|
||||
if (_isWell) then {_canFill = true};
|
||||
} count _objectsWell;
|
||||
};
|
||||
if (["_well", str _x, false] call fnc_inString) exitWith
|
||||
{
|
||||
_canFill = true;
|
||||
};
|
||||
}
|
||||
foreach nearestObjects [player, [], 4];
|
||||
|
||||
if (!_canFill) then {
|
||||
_objectsPond = nearestObjects [_playerPos, [], 50];
|
||||
if (_canFill) exitWith { "safe" };
|
||||
|
||||
_infected = false;
|
||||
|
||||
//Check for ponds and corpses
|
||||
{
|
||||
//Check for pond
|
||||
_isPond = ["pond",str(_x),false] call fnc_inString;
|
||||
if (_isPond) then {
|
||||
_pondPos = (_x worldToModel _playerPos) select 2;
|
||||
if (_pondPos < 0) then {
|
||||
if (!_canFill) then
|
||||
{
|
||||
if (["pond", str _x, false] call fnc_inString && {((getPosASL player) select 2) < ((GetPosASL _x) select 2)}) then
|
||||
{
|
||||
_canFill = true;
|
||||
};
|
||||
};
|
||||
} count _objectsPond;
|
||||
};
|
||||
|
||||
if (_canFill) then {
|
||||
_qty = {_x == "ItemWaterbottleUnfilled"} count magazines player;
|
||||
|
||||
if ("ItemWaterbottleUnfilled" in magazines player) then {
|
||||
for "_x" from 1 to _qty do {
|
||||
if(([player,"ItemWaterbottleUnfilled"] call BIS_fnc_invRemove) == 1) then {
|
||||
player addMagazine "ItemWaterbottle";
|
||||
if (!_infected) then
|
||||
{
|
||||
if (["dead", str _x, false] call fnc_inString || {["massgrave", str _x, false] call fnc_inString}) then
|
||||
{
|
||||
_infected = true;
|
||||
};
|
||||
};
|
||||
|
||||
_dis=5;
|
||||
_sfx = "fillwater";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
||||
if (_canFill && {_infected}) exitWith {};
|
||||
}
|
||||
foreach nearestObjects [player, [], 50];
|
||||
|
||||
cutText [format[(localize "str_player_01"),_qty], "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [localize "str_player_02","PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText [localize "str_player_20","PLAIN DOWN"];
|
||||
if (!_canFill) exitWith { nil };
|
||||
|
||||
if (_infected) exitWith { "infected" };
|
||||
|
||||
""
|
||||
};
|
||||
|
||||
if (isNil "_water") exitWith
|
||||
{
|
||||
(localize "str_player_20") call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
_water = "containerwater" + _water;
|
||||
_filled = 0;
|
||||
|
||||
{
|
||||
if (isText (configFile >> "CfgMagazines" >> _x >> _water)) then
|
||||
{
|
||||
if (_filled < 1) then
|
||||
{
|
||||
if (!dayz_isSwimming) then
|
||||
{
|
||||
player playActionNow "PutDown";
|
||||
};
|
||||
|
||||
[player, "fillwater", 0, false, 5] call dayz_zombieSpeak;
|
||||
[player, 5, true, getPosATL player] call player_alertZombies;
|
||||
};
|
||||
|
||||
_filled = _filled + 1;
|
||||
|
||||
player removeMagazine _x;
|
||||
player addMagazine getText (configFile >> "CfgMagazines" >> _x >> _water);
|
||||
};
|
||||
}
|
||||
foreach magazines player;
|
||||
|
||||
if (_filled > 0)
|
||||
then { (format [localize "str_player_01", _filled]) call dayz_rollingMessages; }
|
||||
else { (localize "str_player_02") call dayz_rollingMessages; };
|
||||
@@ -1,7 +0,0 @@
|
||||
private ["_items","_b"];
|
||||
_items = _this;
|
||||
_b = _items call player_checkItems;
|
||||
if (_b) then {
|
||||
_b = _items call player_removeItems;
|
||||
};
|
||||
_b
|
||||
@@ -1,5 +1,5 @@
|
||||
scriptName "Functions\misc\fn_damageActions.sqf";
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {};
|
||||
#include "\z\addons\dayz_code\util\array.hpp";
|
||||
|
||||
/***********************************************************
|
||||
@@ -7,8 +7,8 @@ scriptName "Functions\misc\fn_damageActions.sqf";
|
||||
- Function
|
||||
- [] call fnc_usec_damageActions;
|
||||
************************************************************/
|
||||
if (DZE_ActionInProgress) exitWith {};
|
||||
private ["_action","_weaponName","_turret","_weapons","_assignedRole","_driver","_action1","_action2","_vehicle","_unit","_vehType","_vehClose","_hasVehicle","_unconscious","_lowBlood","_injured","_inPain","_legsBroke","_armsBroke","_charID","_friendlies","_playerMagazines","_hasBandage","_hasEpi","_hasMorphine","_hasPainkillers","_unconscious_crew","_patients","_crew","_menClose","_hasPatient","_inVehicle","_isClose","_transfuse"];
|
||||
|
||||
private ["_menClose","_hasPatient","_vehicle","_inVehicle","_isClose","_assignedRole","_driver","_action","_turret","_weapons","_weaponName","_crew","_unconscious_crew","_patients","_vehType","_unit","_antibiotics","_bloodBags","_unconscious","_lowBlood","_injured","_hasSepsis","_inPain","_legsBroke","_armsBroke","_infected","_hasBandage","_hasSepsisBandage","_hasEpi","_hasMorphine","_hasSplint","_hasPainkillers","_hasEmptyBag","_hasTester","_hasAntibiotics","_hasBloodBag","_vehClose","_hasVehicle","_action1","_action2","_action3","_y","_playerMagazines"];
|
||||
|
||||
_menClose = cursorTarget;
|
||||
_hasPatient = alive _menClose;
|
||||
@@ -135,7 +135,7 @@ if (isPlayer cursorTarget) then {
|
||||
|
||||
if (_hasPatient) then {
|
||||
//Allow player to drag
|
||||
if (_unconscious) then {
|
||||
if(_unconscious) then {
|
||||
r_action = true;
|
||||
_action1 = _unit addAction [localize "STR_UI_GEAR", "\z\addons\dayz_code\actions\openGear.sqf",_unit, 0, true, true];
|
||||
_action2 = _unit addAction [localize "str_actions_medical_01", "\z\addons\dayz_code\medical\drag.sqf",_unit, 0, true, true];
|
||||
@@ -161,43 +161,43 @@ if (isPlayer cursorTarget) then {
|
||||
r_player_actions set [count r_player_actions,_action];
|
||||
};
|
||||
//Allow player to bandage
|
||||
if (_injured && _hasBandage) then {
|
||||
if(_injured && _hasBandage) then {
|
||||
r_action = true;
|
||||
_action = _unit addAction [localize "str_actions_medical_04", "\z\addons\dayz_code\medical\bandage.sqf",[_unit,"ItemBandage"], 0, true, true, "", "'ItemBandage' in magazines player"];
|
||||
r_player_actions set [count r_player_actions,_action];
|
||||
};
|
||||
//Sepsis
|
||||
if (_hasSepsis && _hasSepsisBandage) then {
|
||||
if(_hasSepsis && _hasSepsisBandage) then {
|
||||
r_action = true;
|
||||
_action = _unit addAction [localize "str_actions_medical_04", "\z\addons\dayz_code\medical\bandage.sqf",[_unit,"ItemSepsisBandage"], 0, true, true, "", "'ItemBandage' in magazines player"];
|
||||
r_player_actions set [count r_player_actions,_action];
|
||||
};
|
||||
//Allow player to give Epinephrine
|
||||
if (_unconscious && _hasEpi) then {
|
||||
if(_unconscious && _hasEpi) then {
|
||||
r_action = true;
|
||||
_action = _unit addAction [localize "str_actions_medical_05", "\z\addons\dayz_code\medical\epinephrine.sqf",[_unit], 0, true, true];
|
||||
r_player_actions set [count r_player_actions,_action];
|
||||
};
|
||||
//Allow player to give Morphine
|
||||
if ((_legsBroke or _armsBroke) && _hasMorphine) then {
|
||||
if((_legsBroke or _armsBroke) && _hasMorphine) then {
|
||||
r_action = true;
|
||||
_action = _unit addAction [localize "str_actions_medical_06", "\z\addons\dayz_code\medical\brokeBones.sqf",[_unit,"ItemMorphine"], 0, true, true, "", "'ItemMorphine' in magazines player"];
|
||||
r_player_actions set [count r_player_actions,_action];
|
||||
};
|
||||
//Allow player to give equip_woodensplint
|
||||
if ((_legsBroke or _armsBroke) && _hasSplint) then {
|
||||
if((_legsBroke or _armsBroke) && _hasSplint) then {
|
||||
r_action = true;
|
||||
_action = _unit addAction [localize "str_actions_medical_06_splint", "\z\addons\dayz_code\medical\brokeBones.sqf",[_unit,"equip_woodensplint"], 0, true, true, "", "'equip_woodensplint' in magazines player"];
|
||||
r_player_actions set [count r_player_actions,_action];
|
||||
};
|
||||
//Allow player to give Painkillers
|
||||
if (_inPain && _hasPainkillers) then {
|
||||
if(_inPain && _hasPainkillers) then {
|
||||
r_action = true;
|
||||
_action = _unit addAction [localize "str_actions_medical_07", "\z\addons\dayz_code\medical\painkiller.sqf",[_unit], 0, true, true, "", "'ItemPainkiller' in magazines player"];
|
||||
r_player_actions set [count r_player_actions,_action];
|
||||
};
|
||||
//Allow player to transfuse blood
|
||||
if (_lowBlood && _hasBloodBag) then {
|
||||
if(_lowBlood && _hasBloodBag) then {
|
||||
_transfuse = if (DZE_UseBloodTypes) then {"\z\addons\dayz_code\medical\transfusion.sqf"} else {"\z\addons\dayz_code\medical\transfusion_NoBloodTypes.sqf"};
|
||||
r_action = true;
|
||||
_action = _unit addAction [localize "str_actions_medical_08",_transfuse,[_unit], 0, true, true];
|
||||
|
||||
@@ -3,28 +3,36 @@ private ["_item","_pos","_nearByPile","_holder"];
|
||||
//Radius to search for holder
|
||||
#define PILE_SEARCH_RADIUS 2
|
||||
//Location to offset the holder
|
||||
#define PILE_PLAYER_OFFSET [0,0,0]
|
||||
#define PILE_OFFSET [0,0,0]
|
||||
|
||||
_item = _this;
|
||||
_holder = objNull;
|
||||
|
||||
//Lets get the location of the player in the world
|
||||
_pos = player modeltoWorld PILE_PLAYER_OFFSET;
|
||||
_pos = player modeltoWorld PILE_OFFSET;
|
||||
|
||||
//Check if a holder is close by the player.
|
||||
_nearByPile= nearestObjects [_pos, ["WeaponHolder","WeaponHolderBase"],PILE_SEARCH_RADIUS];
|
||||
|
||||
if (count _nearByPile == 0) then {
|
||||
//No weapon holders found in the radius, spawn a new one
|
||||
_holder = createVehicle ["WeaponHolder", _pos, [], 0, "CAN_COLLIDE"];
|
||||
} else {
|
||||
//Found a near by weapon holder lets select it.
|
||||
_holder = _nearByPile select 0;
|
||||
|
||||
//check to make sure the player can see the selected weapon holder.
|
||||
_objects = lineIntersectsWith [(_holder modeltoWorld PILE_OFFSET), _pos, player, _holder, true];
|
||||
|
||||
//Can you see the current selected weapon holder
|
||||
if ((count _objects) > 0) then {
|
||||
//Unable to see the current selected weapon holder within the radius lets create a new one.
|
||||
_holder = createVehicle ["WeaponHolder", _pos, [], 0, "CAN_COLLIDE"];
|
||||
};
|
||||
};
|
||||
|
||||
//Add the item to the newly created holder or to the new holder.
|
||||
//Add the item to the holder or to the newly created holder.
|
||||
_holder addMagazineCargoGlobal [_item,1];
|
||||
|
||||
//Make sure the holder spawns behind the physical location of the player
|
||||
_holder setPosATL (player modeltoWorld PILE_PLAYER_OFFSET);
|
||||
|
||||
//Revel the item
|
||||
player reveal _holder;
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
/*
|
||||
Returns true if <position> lies within the sector defined by <center position>,
|
||||
<center angle of sector> && <sector width>. Use this function to determine if
|
||||
<center angle of sector> and <sector width>. Use this function to determine if
|
||||
a position lies within a certain angle from another position (ie the <center position>).
|
||||
Example:
|
||||
[position player,getdir player,30,position enemy_tank] call BIS_fnc_inAngleSector
|
||||
@@ -15,19 +15,17 @@
|
||||
// Revision History:
|
||||
// 09/01/08 0.1 - First cut VBS2
|
||||
//------------------
|
||||
|
||||
|
||||
private["_dir1","_dir2","_dir3","_small","_large","_x","_y","_r"];
|
||||
private["_r","_dir1"];
|
||||
|
||||
_r = false;
|
||||
|
||||
_small = (_this select 1) - ((_this select 2) / 2);
|
||||
_large = (_this select 1) + ((_this select 2) / 2);
|
||||
|
||||
_x = ((_this select 3) select 0) - ((_this select 0) select 0);
|
||||
_y = ((_this select 3) select 1) - ((_this select 0) select 1);
|
||||
_xpos = ((_this select 3) select 0) - ((_this select 0) select 0);
|
||||
_ypos = ((_this select 3) select 1) - ((_this select 0) select 1);
|
||||
|
||||
_dir1 = _x atan2 _y;
|
||||
_dir1 = _xpos atan2 _ypos;
|
||||
|
||||
if (_dir1 < 0) then {_dir1 = _dir1 + 360};
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ if (DZE_NameTags > 0) then {
|
||||
|
||||
if (_isPZombie) then {
|
||||
if (s_player_callzombies < 0) then {
|
||||
s_player_callzombies = player addAction [localize "STR_EPOCH_ACTIONS_RAISEHORDE", "\z\addons\dayz_code\actions\call_zombies.sqf",player, 5, true, false];
|
||||
s_player_callzombies = player addAction [localize "STR_EPOCH_ACTIONS_RAISEHORDE", "\z\addons\dayz_code\actions\pzombie\call_zombies.sqf",player, 5, true, false];
|
||||
};
|
||||
if (DZE_PZATTACK) then {
|
||||
call pz_attack;
|
||||
@@ -949,7 +949,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
//Dog
|
||||
if (_isDog && {_hasRawMeat} && {_isAlive} && {_ownerID == "0"} && {player getVariable ["dogID",0] == 0}) then {
|
||||
if (s_player_tamedog < 0) then {
|
||||
s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\tame_dog.sqf", _cursorTarget, 1, false, true];
|
||||
s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\dog\tame_dog.sqf", _cursorTarget, 1, false, true];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_tamedog;
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
Reference:
|
||||
http://forums.bistudio.com/showthread.php?107476-How-do-I-detect-sundown-sunrise
|
||||
*/
|
||||
private ["_lat","_day","_hour","_daytime"];
|
||||
private["_daytime"];
|
||||
|
||||
_lat = -1 * getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude");
|
||||
_day = 360 * (dateToNumber date);
|
||||
_hour = acos ((24 * sin(_lat) * cos(_day)) / ((12 * cos(_day) - 78) * cos(_lat)));
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
private ["_markerstr","_class","_name","_type","_position","_radiusA","_radiusB","_maptype","_config"];
|
||||
|
||||
if ("ItemMap_Debug" in items player) then {
|
||||
// _world = toUpper(worldName);
|
||||
|
||||
_maptype = ["NameCityCapital","NameCity","NameVillage","NameLocal"];
|
||||
_config = configFile >> "CfgWorlds" >> worldName >> "Names";
|
||||
|
||||
for "_i" from 0 to (count _config -1) do {
|
||||
|
||||
_class = _config select _i; //Returns a conif
|
||||
_name = getText (_class >> "name");
|
||||
_type = getText (_class >> "type");
|
||||
_position = getArray (_class >> "position");
|
||||
_radiusA = getNumber (_class >> "radiusA");
|
||||
_radiusB = getNumber (_class >> "radiusB");
|
||||
|
||||
if (_type in _maptype) then {
|
||||
|
||||
//diag_log(format["Config Type, Name: %1 / Type: %2 / Position: %3, Passed",_name,_type,_position]);
|
||||
|
||||
// _rnd = random 1;
|
||||
@@ -1,19 +1,14 @@
|
||||
//[unit, selectionName, damage, source, projectile]
|
||||
//will only run when local to the created object
|
||||
//record any key hits to the required selection
|
||||
private ["_zed","_killer","_kills","_array","_type","_humanity"];
|
||||
private["_killer"];
|
||||
|
||||
_array = _this select 0;
|
||||
_zed = _array select 0;
|
||||
_killer = _array select 1;
|
||||
_type = _this select 1;
|
||||
_array = _this select 0;
|
||||
_zed = _array select 0;
|
||||
_killer = _array select 1;
|
||||
_type = _this select 1;
|
||||
|
||||
if (local _zed) then {
|
||||
_kills = _killer getVariable[_type,0];
|
||||
_killer setVariable[_type,(_kills + 1),true];
|
||||
|
||||
//increase players humanity when zed killed
|
||||
_humanity = _killer getVariable["humanity",0];
|
||||
_humanity = _humanity + 5;
|
||||
_killer setVariable["humanity",_humanity,true];
|
||||
};
|
||||
@@ -1,21 +1,22 @@
|
||||
private ["_currentObjects","_currentTypes","_currentQty","_previousTypes","_previousQty","_serial","_itemVal","_itemQty","_oldSerial","_oldQty","_change","_checkObjects"];
|
||||
//_newObjects = [_previous,weapons player] call player_weaponCheck;
|
||||
_currentObjects = _this select 0;
|
||||
_checkObjects = _this select 1;
|
||||
private["_change","_currentTypes","_currentQty","_previousTypes","_previousQty","_serial"];
|
||||
|
||||
_currentObjects = _this select 0;
|
||||
_checkObjects = _this select 1;
|
||||
|
||||
_change = false;
|
||||
|
||||
if (count _currentObjects > 1) then {
|
||||
_currentTypes = _currentObjects select 0;
|
||||
_currentQty = _currentObjects select 1;
|
||||
_currentTypes = _currentObjects select 0;
|
||||
_currentQty = _currentObjects select 1;
|
||||
} else {
|
||||
_currentTypes = [];
|
||||
_currentQty = [];
|
||||
};
|
||||
|
||||
if (count _checkObjects > 1) then {
|
||||
_previousTypes = _checkObjects select 0;
|
||||
_previousQty = _checkObjects select 1;
|
||||
_previousTypes = _checkObjects select 0;
|
||||
_previousQty = _checkObjects select 1;
|
||||
} else {
|
||||
_previousTypes = [];
|
||||
_previousQty = [];
|
||||
@@ -28,15 +29,15 @@ _serial = 0;
|
||||
_itemVal = _x;
|
||||
_itemQty = _currentQty select _serial;
|
||||
|
||||
_oldSerial = _previousTypes find _itemVal;
|
||||
_oldSerial = _previousTypes find _itemVal;
|
||||
_oldQty = 0;
|
||||
if (_oldSerial >= 0) then {
|
||||
_oldQty = _previousQty select _oldSerial;
|
||||
_oldQty = _previousQty select _oldSerial;
|
||||
};
|
||||
if (_itemQty != _oldQty) then {_change = true};
|
||||
|
||||
_serial = _serial + 1;
|
||||
} count _currentTypes;
|
||||
} forEach _currentTypes;
|
||||
|
||||
//Review old loadout
|
||||
_serial = 0;
|
||||
@@ -44,14 +45,14 @@ _serial = 0;
|
||||
_itemVal = _x;
|
||||
_itemQty = _previousQty select _serial;
|
||||
|
||||
_oldSerial = _currentTypes find _itemVal;
|
||||
_oldSerial = _currentTypes find _itemVal;
|
||||
_oldQty = 0;
|
||||
if (_oldSerial >= 0) then {
|
||||
_oldQty = _currentQty select _oldSerial;
|
||||
_oldQty = _currentQty select _oldSerial;
|
||||
};
|
||||
if (_itemQty != _oldQty) then {_change = true};
|
||||
|
||||
_serial = _serial + 1;
|
||||
} count _previousTypes;
|
||||
} forEach _previousTypes;
|
||||
|
||||
_change
|
||||
_change;
|
||||
@@ -1,7 +1,8 @@
|
||||
private["_unit","_hp","_selection","_strH","_dam"];
|
||||
_unit = _this select 0;
|
||||
_hp = _this select 1;
|
||||
_unit = _this select 0;
|
||||
_hp = _this select 1;
|
||||
|
||||
_selection = getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "HitPoints" >> _hp >> "name");
|
||||
_strH = "hit_" + (_selection);
|
||||
_dam = _unit getVariable [_strH,0];
|
||||
|
||||
_dam
|
||||
@@ -1,4 +1,3 @@
|
||||
private ["_flare","_lightArea","_lightSpark","_type","_color"];
|
||||
_flare = _this select 0;
|
||||
_type = _this select 1;
|
||||
//_sfx = objNull;
|
||||
@@ -30,7 +29,7 @@ if (!isNull _flare) then {
|
||||
};
|
||||
case 1: {
|
||||
//Spark Light
|
||||
_color = getArray(configFile >> "cfgAmmo" >> (typeOf _flare) >> "lightColor");
|
||||
_color = getArray(configFile >> "cfgAmmo" >> (typeOf _flare) >> "lightColor");
|
||||
_lightSpark = "#lightpoint" createVehicleLocal (getPosATL _flare);
|
||||
_lightSpark setLightColor _color;
|
||||
_lightSpark setLightAmbient _color;
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
private ["_unit","_selection","_strH","_dam","_damage"];
|
||||
_unit = _this select 0;
|
||||
_selection = _this select 1;
|
||||
_damage = _this select 2;
|
||||
// this function name is "object_setHit", but it's used to set character limb damages back during a skin change (player_humanityMorph.sqf)
|
||||
|
||||
private ["_damage"];
|
||||
_unit = _this select 0;
|
||||
_selection = _this select 1;
|
||||
_damage = _this select 2;
|
||||
if (_selection != "") then {
|
||||
_strH = "hit_" + (_selection);
|
||||
_dam = _unit getVariable [_strH,0];
|
||||
_unit setVariable [_strH,(_dam + _damage)];
|
||||
if (_selection in USEC_MinorWounds) then {
|
||||
_unit setHit[_selection,(_dam + _damage)];
|
||||
diag_log(format["%1: %2 setHit %3 %4", __FILE__, _unit, _selection, (_dam + _damage)]);
|
||||
};
|
||||
};
|
||||
_damage;
|
||||
_damage
|
||||
@@ -1,16 +1,16 @@
|
||||
private ["_unit","_selection","_strH","_dam","_total","_damage"];
|
||||
_unit = _this select 0;
|
||||
_selection = _this select 1;
|
||||
_damage = _this select 2;
|
||||
if ((_selection != "")) then {
|
||||
_strH = "hit_" + (_selection);
|
||||
_dam = _unit getVariable [_strH,0];
|
||||
_total = (_dam + _damage);
|
||||
if (_total > 1) then {
|
||||
_total = 1;
|
||||
};
|
||||
_unit setVariable [_strH,_total];
|
||||
} else {
|
||||
_damage = 0;
|
||||
};
|
||||
_damage;
|
||||
// private["_unit","_selection","_strH","_dam","_total"];
|
||||
// _unit = _this select 0;
|
||||
// _selection = _this select 1;
|
||||
// _damage = _this select 2;
|
||||
// if ((_selection != "")) then {
|
||||
// _strH = "hit_" + (_selection);
|
||||
// _dam = _unit getVariable [_strH,0];
|
||||
// _total = (_dam + _damage);
|
||||
// if (_total > 1) then {
|
||||
// _total = 1;
|
||||
// };
|
||||
// _unit setVariable [_strH,_total];
|
||||
// } else {
|
||||
// _damage = 0;
|
||||
// };
|
||||
// _damage
|
||||
@@ -1,10 +1,10 @@
|
||||
private["_object","_updateObj"];
|
||||
//check if can pitch here
|
||||
_object = _this;
|
||||
|
||||
if (_object getVariable ["ObjectID",0] > 0) then {
|
||||
_updateObj = _object getVariable["update",[false,false,false]];
|
||||
_updateObj set [1,true];
|
||||
_object setVariable ["update",_updateObj,true];
|
||||
_object setVariable ["position",(getPosATL _object),true];
|
||||
};
|
||||
// private["_object","_updateObj"];
|
||||
// //check if can pitch here
|
||||
// _object = _this;
|
||||
//
|
||||
// if (_object getVariable ["ObjectID",0] > 0) then {
|
||||
// _updateObj = _object getVariable["update",[false,false,false]];
|
||||
// _updateObj set [1,true];
|
||||
// _object setVariable ["update",_updateObj,true];
|
||||
// _object setVariable ["position",(getPosATL _object),true];
|
||||
// };
|
||||
@@ -1,47 +1,58 @@
|
||||
private ["_animalssupported","_type","_agent","_favouritezones","_randrefpoint","_PosList","_PosSelect","_Pos","_list"];
|
||||
_list = (getposATL player) nearEntities [["CAAnimalBase"],dayz_animalDistance];
|
||||
if ((count _list) < dayz_maxAnimals) then {
|
||||
_animalssupported = ["Chicken","Cow","Sheep","WildBoar","WildBoar","WildBoar","Goat","Rabbit","Rabbit","Dog"];
|
||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||
Switch (_type) do {
|
||||
case "Cow" : {
|
||||
_animalssupported = ["Cow01","Cow02","Cow03","Cow04","Cow01_EP1"];
|
||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||
private ["_type"];
|
||||
_list = getposATL player nearEntities [["CAAnimalBase"],dayz_animalDistance];
|
||||
|
||||
if ((count _list < dayz_maxAnimals) and (dayz_currentGlobalAnimals < dayz_maxGlobalAnimals)) then {
|
||||
//Find where animal likes
|
||||
_amount = (dayz_maxAnimals - (count _list)) min (dayz_maxGlobalAnimals - dayz_currentGlobalAnimals);
|
||||
for "_i" from 0 to _amount do {
|
||||
_animalssupported = ["Chicken","Chicken","Chicken","Cow","Sheep","WildBoar","WildBoar","WildBoar","Goat","Rabbit","Rabbit","Dog"];
|
||||
_type = (_animalssupported select floor(random(count _animalssupported)));
|
||||
switch (_type) do {
|
||||
case "Cow" : {
|
||||
_animalssupported = ["Cow01","Cow02","Cow03","Cow04","Cow01_EP1"];
|
||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||
};
|
||||
case "Goat" : {
|
||||
_animalssupported = ["Goat01_EP1","Goat02_EP1","Goat"];
|
||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||
};
|
||||
case "Sheep" : {
|
||||
_animalssupported = ["Sheep","Sheep02_EP1","Sheep01_EP1"];
|
||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||
};
|
||||
case "Chicken" : {
|
||||
_animalssupported = ["Hen","Cock"];
|
||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||
};
|
||||
case "Dog" : {
|
||||
_animalssupported = ["DZ_Fin","DZ_Pastor"];
|
||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||
};
|
||||
};
|
||||
case "Goat" : {
|
||||
_animalssupported = ["Goat01_EP1","Goat02_EP1","Goat"];
|
||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||
};
|
||||
case "Sheep" : {
|
||||
_animalssupported = ["Sheep","Sheep02_EP1","Sheep01_EP1"];
|
||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||
};
|
||||
case "Chicken" : {
|
||||
_animalssupported = ["Hen","Cock"];
|
||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||
};
|
||||
case "Dog" : {
|
||||
_animalssupported = ["DZ_Fin","DZ_Pastor"];
|
||||
_type = (_animalssupported select (floor(random(count _animalssupported))));
|
||||
_root = configFile >> "CfgVehicles" >> _type;
|
||||
_favouritezones = getText ( _root >> "favouritezones");
|
||||
//_randrefpoint = [position player, 10, dayz_animalDistance, 1, 0, 50, 0] call BIS_fnc_findSafePos;
|
||||
_randrefpoint = getposATL player;
|
||||
_PosList = selectbestplaces [_randrefpoint,dayz_animalDistance,_favouritezones,10,5];
|
||||
_PosSelect = _PosList select (floor random (count _PosList));
|
||||
_Pos = _PosSelect select 0;
|
||||
_list = _Pos nearEntities [["CAAnimalBase","Man"],50];
|
||||
|
||||
|
||||
if (player distance _Pos < dayz_animalDistance and NOT surfaceIsWater _Pos and (count _list <= 1)) then {
|
||||
if (_type == "DZ_Pastor") then {
|
||||
_agent = createAgent [_type, _Pos, [], 0, "NONE"];
|
||||
} else {
|
||||
_agent = createAgent [_type, _Pos, [], 0, "FORM"];
|
||||
};
|
||||
|
||||
//Disable simulation
|
||||
PVDZ_Server_Simulation = [_agent, false];
|
||||
publicVariableServer "PVDZ_Server_Simulation";
|
||||
|
||||
_agent setpos _Pos;
|
||||
_id = [_pos,_agent] execFSM "\z\addons\dayz_code\system\animal_agent.fsm";
|
||||
};
|
||||
uiSleep 1;
|
||||
};
|
||||
_favouritezones = getText (configFile >> "CfgVehicles" >> _type >> "favouritezones");
|
||||
_randrefpoint = getposATL player;
|
||||
_PosList = selectBestPlaces [_randrefpoint,dayz_animalDistance,_favouritezones,10,5];
|
||||
_PosSelect = _PosList select (floor(random(count _PosList)));
|
||||
_Pos = _PosSelect select 0;
|
||||
_list = _Pos nearEntities [["CAAnimalBase","Man"],50];
|
||||
|
||||
|
||||
if (((player distance _Pos) < dayz_animalDistance) && {!(surfaceIsWater _Pos)} && {(count _list) <= 1}) then {
|
||||
if (_type == "DZ_Pastor") then { _agent = createAgent [_type, _Pos, [], 0, "NONE"]; } else { _agent = createAgent [_type, _Pos, [], 0, "FORM"]; };
|
||||
|
||||
//Disable simulation
|
||||
PVDZ_Server_Simulation = [_agent, false];
|
||||
publicVariableServer "PVDZ_Server_Simulation";
|
||||
|
||||
_agent setPos _Pos;
|
||||
_id = [_pos,_agent] execFSM "\z\addons\dayz_code\system\animal_agent.fsm";
|
||||
};
|
||||
uiSleep 1;
|
||||
};
|
||||
@@ -1,30 +1,23 @@
|
||||
private ["_unit","_ammo","_distance","_weapon","_projectile","_vUp","_endPos","_dir","_height","_bolt","_hitArray","_hitObject","_hitSelection","_config","_hitMemoryPt","_variation","_val","_doLoop","_countr","_magazine"];
|
||||
_unit = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
_ammo = _this select 4;
|
||||
_magazine = _this select 5;
|
||||
_projectile = _this select 6;
|
||||
private ["_endPos","_vUp","_doLoop","_hitArray","_countr","_hitObject","_hitSelection","_config","_hitMemoryPt","_variation","_val","_dir","_bolt","_obj","_unit","_ammo","_projectile","_height"];
|
||||
_obj = _this select 0;
|
||||
_unit = _obj select 0;
|
||||
//_weapon = _obj select 1;
|
||||
_ammo = _obj select 4;
|
||||
//_magazine = _obj select 5;
|
||||
_projectile = _obj select 6;
|
||||
|
||||
_projectile = nearestObject [_unit, _ammo];
|
||||
_projectile = nearestObject [_unit,_ammo];
|
||||
_vUp = vectorUp _projectile;
|
||||
_endPos = getPosATL _projectile;
|
||||
_dir = 0;
|
||||
|
||||
if (_magazine == "Quiver") then {
|
||||
_ammo = player ammo "Crossbow_DZ";
|
||||
if (_ammo > 0) then {
|
||||
player removeMagazines "Quiver";
|
||||
player addMagazine ["Quiver", _ammo];
|
||||
};
|
||||
};
|
||||
|
||||
while {alive _projectile} do {
|
||||
_endPos = getPosATL _projectile;
|
||||
_vUp = vectorUp _projectile;
|
||||
uiSleep 0.01;
|
||||
sleep 0.01;
|
||||
};
|
||||
|
||||
_distance = _unit distance _endPos;
|
||||
//_distance = _unit distance _endPos;
|
||||
_height = _endPos select 2;
|
||||
_doLoop = true;
|
||||
_countr = 0;
|
||||
@@ -41,20 +34,20 @@ if (_height < 100) then {
|
||||
if (count _hitArray > 0) then {_doLoop = false};
|
||||
if (_countr > 50) then {_doLoop = false};
|
||||
_countr = _countr + 1;
|
||||
uiSleep 0.1;
|
||||
sleep 0.1;
|
||||
};
|
||||
|
||||
if (count _hitArray > 0) then {
|
||||
_hitObject = _hitArray select 0;
|
||||
_hitSelection = _hitArray select 1;
|
||||
_config = configFile >> "cfgBody" >> _hitSelection;
|
||||
_hitMemoryPt = getText(_config >> "memoryPoint");
|
||||
_variation = getNumber(_config >> "variation");
|
||||
_hitMemoryPt = getText(_config >> "memoryPoint");
|
||||
_variation = getNumber(_config >> "variation");
|
||||
_val = [((random (_variation * 2)) - _variation),((random (_variation * 2)) - _variation),((random (_variation * 2)) - _variation)];
|
||||
_bolt attachTo [_hitObject,_val,_hitMemoryPt];
|
||||
_dir = ([_hitObject,_unit] call BIS_fnc_relativeDirTo) + 180;
|
||||
_bolt setDir (_dir);
|
||||
[_bolt] call FNC_GetSetPos;
|
||||
_bolt setPos (getPosATL _bolt);
|
||||
_unit setVariable["firedHit",[]];
|
||||
_unit setVariable["firedDamage",0,true];
|
||||
};
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
private ["_unit","_projectile","_isInCombat","_currentNear","_projectilespeed","_projectflight","_listNear","_callCount","_nearVehicle"];
|
||||
_unit = _this select 0;
|
||||
_projectile = _this select 6;
|
||||
private ["_currentNear","_listNear","_callCount"];
|
||||
_unit = _this select 0;
|
||||
_projectile = _this select 6;
|
||||
|
||||
//diag_log ("0");
|
||||
diag_log ("0");
|
||||
|
||||
//_isInComat = _unit getVariable["startcombattimer",0];
|
||||
|
||||
//diag_log ("Bullit Speed: " +str(Speed _projectile));
|
||||
//diag_log ("Bullit Velocity: " +str(velocity _projectile));
|
||||
diag_log ("Bullit Speed: " +str(Speed _projectile));
|
||||
diag_log ("Bullit Velocity: " +str(velocity _projectile));
|
||||
|
||||
_listNear = [];
|
||||
_callCount = 0;
|
||||
|
||||
//approx 1020 meters
|
||||
while {(alive _projectile) && !(isNull _projectile) && _callCount < 85;} do {
|
||||
while {(alive _projectile) && !(isNull _projectile) && (_callCount < 85)} do {
|
||||
_projectilespeed = Speed _projectile;
|
||||
_projectflight = (((_projectilespeed / 60) * 1000));
|
||||
if (_projectflight > 0) then {
|
||||
uiSleep (12 / (_projectflight));
|
||||
};
|
||||
if (alive _projectile && !(isNull _projectile)) then {_currentNear = ([_projectile] call FNC_GetPos) nearEntities [["CAManBase","AllVehicles"],15];};
|
||||
if (alive _projectile && !(isNull _projectile)) then {_currentNear = (getPosATL _projectile) nearEntities [["CAManBase","AllVehicles"],15];};
|
||||
_listNear = _listNear + _currentNear;
|
||||
_callCount = _callCount + 1;
|
||||
};
|
||||
//diag_log ("2");
|
||||
diag_log ("2");
|
||||
{
|
||||
_nearVehicle = _x;
|
||||
_listNear = _listNear - [_x];
|
||||
|
||||
//diag_log ("3");
|
||||
diag_log ("3");
|
||||
|
||||
if (isPlayer _nearVehicle) then {
|
||||
_isInCombat = _nearVehicle getVariable["startcombattimer",0];
|
||||
if ((alive _nearVehicle) && _isInCombat == 0) then {
|
||||
if ((alive _nearVehicle) and _isInCombat == 0) then {
|
||||
_nearVehicle setVariable["startcombattimer", 1];
|
||||
//diag_log("Now in Combat (Player): " + name _unit);
|
||||
diag_log("Now in Combat (Player): " + name _unit);
|
||||
};
|
||||
};
|
||||
|
||||
if (_nearVehicle isKindOf "AllVehicles") then {
|
||||
{
|
||||
_isInCombat = _x getVariable["startcombattimer",0];
|
||||
if (isPlayer _x && _isInCombat == 0 && alive _x) then {
|
||||
if (isPlayer _x and _isInCombat == 0 and alive _x) then {
|
||||
_x setVariable["startcombattimer", 1];
|
||||
//diag_log("Now in Combat (Crew): " + name _x);
|
||||
diag_log("Now in Combat (Crew): " + name _x);
|
||||
};
|
||||
} forEach (crew _nearVehicle);
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_currentObjects","_newObjects","_checkObjects","_type","_qtyNow","_qtyBefore","_change"];
|
||||
private ["_newObjects","_change"];
|
||||
//_newObjects = [_previous,weapons player] call player_weaponCheck;
|
||||
_currentObjects = _this select 0;
|
||||
_checkObjects = _this select 1;
|
||||
_currentObjects = _this select 0;
|
||||
_checkObjects = _this select 1;
|
||||
|
||||
_change = false;
|
||||
|
||||
@@ -10,8 +10,8 @@ _newObjects = [];
|
||||
{
|
||||
if (!(_x in _newObjects)) then {
|
||||
_type = _x;
|
||||
_qtyNow = {_x == _type} count _checkObjects;
|
||||
_qtyBefore = {_x == _type} count _currentObjects;
|
||||
_qtyNow = {_x == _type} count _checkObjects;
|
||||
_qtyBefore = {_x == _type} count _currentObjects;
|
||||
if (_qtyNow != _qtyBefore) then {
|
||||
_change = true;
|
||||
};
|
||||
@@ -24,8 +24,8 @@ _newObjects = [];
|
||||
{
|
||||
if (!(_x in _newObjects)) then {
|
||||
_type = _x;
|
||||
_qtyNow = {_x == _type} count _checkObjects;
|
||||
_qtyBefore = {_x == _type} count _currentObjects;
|
||||
_qtyNow = {_x == _type} count _checkObjects;
|
||||
_qtyBefore = {_x == _type} count _currentObjects;
|
||||
if (_qtyNow != _qtyBefore) then {
|
||||
_change = true;
|
||||
};
|
||||
@@ -33,4 +33,4 @@ _newObjects = [];
|
||||
};
|
||||
} forEach _checkObjects;
|
||||
|
||||
_change;
|
||||
_change
|
||||
@@ -16,7 +16,7 @@ if( (!isNull cursorTarget) && (player distance cursorTarget < 5) && (vehicle pla
|
||||
};
|
||||
};
|
||||
|
||||
/*Player doesn't have a cursor target, || its too far away, || they are in a vehicle.
|
||||
/*Player doesn't have a cursor target, or its too far away, or they are in a vehicle.
|
||||
else{
|
||||
if ( (vehicle player != player) && (vehicle player isKindOf "AllVehicles") ) then {
|
||||
//Player is in a vehicle, placeholder for vehicle trunk sounds(if added)
|
||||
|
||||
@@ -1,24 +1,14 @@
|
||||
private["_unit","_hitPoints","_selection","_killer"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_killer = _this select 1;
|
||||
|
||||
_hitPoints = _unit call vehicle_getHitpoints;
|
||||
{
|
||||
_selection = getText (configFile >> "CfgVehicles" >> (typeof _unit) >> "HitPoints" >> _x >> "name");
|
||||
_unit setVariable [_selection, 1, true];
|
||||
} count _hitPoints;
|
||||
//_killer = _this select 1;
|
||||
|
||||
// ask server to set global damage to 1, save to the hive
|
||||
if (isServer) then {
|
||||
[_unit, "killed"] call server_updateObject;
|
||||
} else {
|
||||
if (DZE_Debug_Damage && ((!isPlayer _unit) || ((isPlayer _unit) && (vehicle _unit != _unit) && (_unit != _killer)))) then {
|
||||
PVDZ_veh_Save = [_unit, "killed",_killer];
|
||||
if (local _unit) then {
|
||||
if (isServer) then {
|
||||
[_unit, "killed"] call server_updateObject;
|
||||
} else {
|
||||
PVDZ_veh_Save = [_unit, "killed"];
|
||||
publicVariableServer "PVDZ_veh_Save";
|
||||
};
|
||||
publicVariableServer "PVDZ_veh_Save";
|
||||
};
|
||||
|
||||
// everyone removes their EH for this vehicle
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
private ["_group","_target","_targetMen","_targetDis","_c","_man","_manDis","_targets","_lead","_rnd","_assigned","_fires","_range"];
|
||||
_group = _this;
|
||||
_target = objNull;
|
||||
_lead = leader _group;
|
||||
_targetMen = [];
|
||||
_targetDis = [];
|
||||
_range = 500;
|
||||
|
||||
_assigned = _group getVariable ["targets",[]];
|
||||
{
|
||||
_group reveal [_x,4];
|
||||
} count _assigned;
|
||||
|
||||
//Find targets
|
||||
_targets = _lead nearTargets _range;
|
||||
{
|
||||
private["_obj","_dis"];
|
||||
_obj = _x select 4;
|
||||
_dis = _obj distance _lead;
|
||||
if (_obj isKindOf "Man" && ((speed _obj) < 15)) then {
|
||||
if (!(_obj isKindOf "zZombie_Base") && !(_obj in _targetMen)) then {
|
||||
//process man targets
|
||||
_targetMen set [count _targetMen,_obj];
|
||||
_targetDis set [count _targetDis,_dis];
|
||||
};
|
||||
};
|
||||
} count _targets;
|
||||
|
||||
//Search for fires
|
||||
if (count _targetMen == 0) then {
|
||||
_fires = nearestObjects [_lead,["Land_Fire","SmokeShell","Generator_DZ"],_range];
|
||||
{
|
||||
private["_dis"];
|
||||
_dis = _x distance _lead;
|
||||
if ((_dis < _range) && !(_x in _targetMen)) then {
|
||||
_rnd = random 1;
|
||||
if (_rnd < 0.5) then {
|
||||
if ((inflamed _x) || (_x isKindOf "SmokeShell")) then {
|
||||
_targetMen set [count _targetMen,_x];
|
||||
_targetDis set [count _targetDis,_dis];
|
||||
} else {
|
||||
if (_x isKindOf "Generator_DZ") then {
|
||||
if (alive _x && (_x getVariable ["GeneratorRunning", false])) then {
|
||||
_targetMen set [count _targetMen,_x];
|
||||
_targetDis set [count _targetDis,_dis];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
} count _fires;
|
||||
};
|
||||
|
||||
//Find best target
|
||||
if (count _targetMen > 0) then {
|
||||
_man = _targetMen select 0;
|
||||
_manDis = _targetDis select 0;
|
||||
_c = 0;
|
||||
{
|
||||
private["_dis"];
|
||||
_dis = _targetDis select _c;
|
||||
if (_dis < _manDis) then {
|
||||
_man = _x;
|
||||
_manDis = _dis;
|
||||
};
|
||||
if (_x isKindOf "SmokeShell") then {
|
||||
_man = _x;
|
||||
_manDis = _dis;
|
||||
};
|
||||
_c = _c + 1;
|
||||
} count _targetMen;
|
||||
_target = _man;
|
||||
};
|
||||
|
||||
//Check if too far
|
||||
if (_manDis > _range) then {
|
||||
_target = objNull;
|
||||
};
|
||||
_target;
|
||||
@@ -1,29 +1,18 @@
|
||||
private ["_unit","_originalPos","_pos","_chance","_playerpos"];
|
||||
private["_unit","_originalPos","_pos"];
|
||||
_unit = _this select 0;
|
||||
_originalPos = _this select 1;
|
||||
_pos = getPosATL _unit;
|
||||
_playerpos = ([player] call FNC_GetPos);
|
||||
|
||||
if (count _this > 2) then {
|
||||
_pos = _this select 2;
|
||||
} else {
|
||||
//_unit enableAI "MOVE";
|
||||
//_unit enableAI "ANIM";
|
||||
|
||||
_chance = round(random 12);
|
||||
if ((_chance % 4) == 0) then {
|
||||
//_Offset = [0,0,0];
|
||||
//_playerworldPos = _playerpos modelToWorld _Offset;
|
||||
_pos = [_playerpos,30,120,4,0,5,0] call BIS_fnc_findSafePos;
|
||||
} else {
|
||||
_pos = [_originalPos,10,90,4,0,5,0] call BIS_fnc_findSafePos;
|
||||
};
|
||||
|
||||
if (_unit distance player > 250) then {
|
||||
_pos = [_playerpos,120,200,4,0,5,0] call BIS_fnc_findSafePos;
|
||||
};
|
||||
//_pos = [_originalPos,10,90,4,0,5,0] call BIS_fnc_findSafePos;
|
||||
_pos = [_originalPos,10,(10 - (random (90 * 2))),0] call fn_selectRandomLocation;
|
||||
};
|
||||
|
||||
/*
|
||||
if(isNull group _unit) then {
|
||||
_unit moveTo _pos;
|
||||
} else {
|
||||
@@ -31,3 +20,6 @@ if(isNull group _unit) then {
|
||||
};
|
||||
_unit forceSpeed 2;
|
||||
_unit setVariable ["myDest",_pos];
|
||||
*/
|
||||
|
||||
_pos
|
||||
|
||||
@@ -176,7 +176,6 @@ if (!isDedicated) then {
|
||||
player_unlockVault = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_unlockVault.sqf";
|
||||
player_upgradeVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_upgradeVehicle.sqf";
|
||||
player_vaultPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\vault_pitch.sqf";
|
||||
player_checkAndRemoveItems = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_checkAndRemoveItems.sqf";
|
||||
pz_attack = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\pzombie\pz_attack.sqf";
|
||||
|
||||
dayz_losChance = {
|
||||
|
||||
@@ -519,7 +519,6 @@ s_player_parts = [];
|
||||
if(isNil "DayZ_UseSteamID") then {DayZ_UseSteamID = true;};
|
||||
if(isNil "DZE_SelfTransfuse") then {DZE_SelfTransfuse = false;};
|
||||
if(isNil "DZE_GodModeBase") then {DZE_GodModeBase = false;};
|
||||
if(isNil "DZE_Debug_Damage") then {DZE_Debug_Damage = true;};
|
||||
if(isNil "DZE_TRADER_SPAWNMODE") then {DZE_TRADER_SPAWNMODE = false;};
|
||||
if(isNil "dayz_paraSpawn") then {dayz_paraSpawn = false;};
|
||||
if(isNil "DZE_BuildingLimit") then {DZE_BuildingLimit = 150;};
|
||||
|
||||
@@ -7417,6 +7417,7 @@
|
||||
<Spanish>No puedes cambiar de ropa mientras estás en un vehículo</Spanish>
|
||||
<French>Vous ne pouvez pas vous changer dans un véhicule</French>
|
||||
<Czech>Nelze se převléci, když jste ve vozidle.</Czech>
|
||||
<Dutch>Je kunt je niet omkleden in een voertuig</Dutch>
|
||||
</Key>
|
||||
<Key ID="str_player_fail_wear2">
|
||||
<English>Currently Female Characters cannot change to this skin. This will change in a future update.</English>
|
||||
|
||||
@@ -824,15 +824,6 @@
|
||||
<French>\n\nImpossible de changer de vêtements près d'un autre joueur.</French>
|
||||
<Czech>\n\nNemůžete si změnit oblečení, když je poblíž další hráč.</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_PLAYER_85">
|
||||
<English>\n\nYou may not change clothes while in a vehicle</English>
|
||||
<German>\n\nSie können Ihre Kleidung nicht innerhalb eines Fahrzeuges wechseln</German>
|
||||
<Russian>\n\nВы не можете переодеваться, находясь в транспорте</Russian>
|
||||
<!-- <Spanish></Spanish> -->
|
||||
<Dutch>\n\nJe kunt je niet omkleden in een voertuig</Dutch>
|
||||
<French>\n\nVous ne devriez pas changer de vêtements à bord d'un véhicule</French>
|
||||
<Czech>\n\nNemůžete si změnit oblečení, pokud jste v autě.</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_PLAYER_86">
|
||||
<English>\n\nYou cannot wear a skin of the opposite sex.</English>
|
||||
<German>\n\nSie können nicht die Kleidung vom anderen Geschlecht tragen.</German>
|
||||
@@ -1148,15 +1139,6 @@
|
||||
<French>%1 est rempli(e) à %2 pourcents de sa capacité.</French>
|
||||
<Czech>%1 je naplněno do %2 procent kapacity.</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_PLAYER_134">
|
||||
<English>You have filled %1 with fuel.</English>
|
||||
<German>Sie haben %1 mit Kraftstoff befüllt.</German>
|
||||
<Russian>Вы заполнили %1 топливом.</Russian>
|
||||
<!-- <Spanish></Spanish> -->
|
||||
<Dutch>Je hebt %1 met brandsfof gevuld.</Dutch>
|
||||
<French>Vous avez rempli %1 avec du carburant.</French>
|
||||
<Czech>Naplnili jste %1 palivem.</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_PLAYER_135">
|
||||
<English>\n\nThis building needs a %1 within %2 meters</English>
|
||||
<German>\n\nDieses Gebäude benötitgt ein(e) %1 innerhalb von %2 Metern.</German>
|
||||
|
||||
Reference in New Issue
Block a user