mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-08 09:12:52 +03:00
1.7.4 CE sync
This commit is contained in:
@@ -12,8 +12,7 @@ if (isServer) then {
|
||||
_key = format["CHILD:304:%1:",_id];
|
||||
_key call server_hiveWrite;
|
||||
diag_log format["DELETE: Deleted by ID: %1",_id];
|
||||
};
|
||||
if (parseNumber _uid > 0) then {
|
||||
} else {
|
||||
//Send request
|
||||
_key = format["CHILD:310:%1:",_uid];
|
||||
_key call server_hiveWrite;
|
||||
|
||||
@@ -3,7 +3,7 @@ _list = getposATL player nearEntities [["CAAnimalBase"],dayz_animalDistance];
|
||||
|
||||
if (count _list < dayz_maxAnimals) then {
|
||||
//Find where animal likes
|
||||
_animalssupported = ["hen","Cow","Sheep","WildBoar","WildBoar","WildBoar","Goat","Rabbit","Rabbit"];
|
||||
_animalssupported = ["hen","Cow","Sheep","WildBoar","WildBoar","WildBoar","Goat","Rabbit","Rabbit","Fin", "Pastor"];
|
||||
_type = (_animalssupported select floor(random(count _animalssupported)));
|
||||
if (_type == "Cow") then {
|
||||
_animalssupported = ["Cow01","Cow02","Cow03","Cow04"];
|
||||
@@ -32,6 +32,9 @@ if (count _list < dayz_maxAnimals) then {
|
||||
_agent = createAgent [_type, _Pos, [], 0, "FORM"];
|
||||
_agent setpos _Pos;
|
||||
_id = [_pos,_agent] execFSM "\z\addons\dayz_code\system\animal_agent.fsm";
|
||||
if (_type == "Fin" || _type == "Pastor") then {
|
||||
_tame = _agent addAction ["Tame Dog", "\z\addons\dayz_code\compile\player_tameDog.sqf"];
|
||||
};
|
||||
};
|
||||
sleep 1;
|
||||
};z
|
||||
@@ -54,7 +54,7 @@ if (count _medical > 0) then {
|
||||
// player setVariable ["hit_legs",(_fractures select 0),true];
|
||||
// player setVariable ["hit_hands",(_fractures select 1),true];
|
||||
[player,"legs", (_fractures select 0)] call object_setHit;
|
||||
[player,"hands", (_fractures select 0)] call object_setHit;
|
||||
[player,"hands", (_fractures select 1)] call object_setHit;
|
||||
} else {
|
||||
//Reset Fractures
|
||||
player setVariable ["hit_legs",0,true];
|
||||
|
||||
15
dayz_code/compile/player_tameDog.sqf
Normal file
15
dayz_code/compile/player_tameDog.sqf
Normal file
@@ -0,0 +1,15 @@
|
||||
private["_target", "_caller", "_id", "_params", "_pos"];
|
||||
_target = _this select 0;
|
||||
_caller = _this select 1;
|
||||
_id = _this select 2;
|
||||
_params = _this select 3;
|
||||
_pos = position _target;
|
||||
|
||||
deleteVehicle (_this select 0);
|
||||
_dog = (group player) createUnit [format["DZ_%1", typeOf _target], _pos, [], 0, "FORM"];
|
||||
_dog disableAI "FSM";
|
||||
_fsmid = [_dog, (count units group _caller)] execFSM "\z\addons\dayz_code\system\dog_agent.fsm";
|
||||
_fsmid setFSMVariable ["_handle", _fsmid];
|
||||
_target removeAction _id;
|
||||
|
||||
//handle publicVariables here later.
|
||||
@@ -29,7 +29,7 @@ if (_dam < 1 ) then {
|
||||
dayzUpdateVehicle call server_updateObject;
|
||||
};
|
||||
} else {
|
||||
publicVariable "dayzUpdateVehicle";
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3,12 +3,6 @@ private["_unit","_selection","_killer"];
|
||||
_unit = _this select 0;
|
||||
_killer = _this select 1;
|
||||
|
||||
// Prevent spazzing out vehicles from spamming server/MySQL
|
||||
_waskilled = _unit getVariable ['waskilled', 0];
|
||||
if (_waskilled) exitWith{};
|
||||
|
||||
_unit setVariable ['waskilled', 1, true];
|
||||
|
||||
_hitPoints = _unit call vehicle_getHitpoints;
|
||||
{
|
||||
_selection = getText (configFile >> "CfgVehicles" >> (typeof _unit) >> "HitPoints" >> _x >> "name");
|
||||
|
||||
Reference in New Issue
Block a user