mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-14 12:12:56 +03:00
sync with DayZ 1.7.4 CE
This commit is contained in:
@@ -15,11 +15,6 @@ _total = _damage;
|
||||
//diag_log ("DAMAGE VEH: " + typeof(_unit) + " / " + str(_hit) + " / " + str(_damage) + " / " + str(getDammage _unit));
|
||||
|
||||
if (local _unit) then {
|
||||
if (_ammo == "zombie") then {
|
||||
//_unit setDamage (_damage / 2);
|
||||
_total = [_unit,_hit,_damage] call object_setFixServer;
|
||||
} else {
|
||||
_total = [_unit,_hit,_damage] call object_setHitServer;
|
||||
};
|
||||
};
|
||||
_total
|
||||
@@ -228,7 +228,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
s_player_repairActions set [count s_player_repairActions,_handle];
|
||||
} else {
|
||||
_color = "color='#70bf44'"; //green
|
||||
_string = format["<t %2>Remove%1</t>",_cmpt,_color]; //Remove - Part
|
||||
_string = format["<t %2>Take%1</t>",_cmpt,_color]; //Take - Part
|
||||
_handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\repair.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
|
||||
s_player_repairActions set [count s_player_repairActions,_handle];
|
||||
};
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
private["_list","_Pos","_randrefpoint","_PosList","_PosSelect","_Pos","_list","_animalssupported","_type","_root","_favouritezones"];
|
||||
|
||||
private["_list","_Pos","_randrefpoint","_PosList","_PosSelect","_Pos","_list","_animalssupported","_type","_root","_favouritezones","_GroupMarker","_agent","_id","_tame"];
|
||||
_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","Fin", "Pastor"];
|
||||
_animalssupported = ["hen","Cow","Sheep","WildBoar","WildBoar","WildBoar","Goat","Rabbit","Rabbit","DZ_Fin","DZ_Pastor"];
|
||||
//_animalssupported = ["DZ_Fin","DZ_Pastor"];
|
||||
_type = (_animalssupported select floor(random(count _animalssupported)));
|
||||
if (_type == "Cow") then {
|
||||
_animalssupported = ["Cow01","Cow02","Cow03","Cow04"];
|
||||
@@ -32,9 +34,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 {
|
||||
if ((_type == "DZ_Fin") || (_type == "DZ_Pastor")) then {
|
||||
_tame = _agent addAction ["Tame Dog", "\z\addons\dayz_code\compile\player_tameDog.sqf"];
|
||||
};
|
||||
};
|
||||
sleep 1;
|
||||
};z
|
||||
};
|
||||
@@ -24,6 +24,8 @@ player setVariable ["NORRN_unconscious", false, true];
|
||||
player setVariable ["unconsciousTime", 0, true];
|
||||
player setVariable ["USEC_isCardiac",false,true];
|
||||
player setVariable ["medForceUpdate",true,true];
|
||||
//remove combat timer on death
|
||||
player setVariable ["startcombattimer", 0, true];
|
||||
r_player_unconscious = false;
|
||||
r_player_cardiac = false;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ private ["_objects"];
|
||||
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage"], 10];
|
||||
{
|
||||
dayzUpdateVehicle = [_x,"all"];
|
||||
publicVariable "dayzUpdateVehicle";
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
} foreach _objects;
|
||||
|
||||
private ["_backpackWpnQtys","_backpackWpnTypes","_backpackWpn","_backpackMag","_countr"];
|
||||
|
||||
@@ -83,9 +83,6 @@ call dayz_resetSelfActions;
|
||||
|
||||
eh_player_killed = player addeventhandler ["FiredNear",{_this call player_weaponFiredNear;} ];
|
||||
|
||||
//Combat logging
|
||||
_eh_combat_projectilenear = player addEventHandler ["IncomingFire",{_this call player_projectileNear;} ];
|
||||
//
|
||||
[player] call fnc_usec_damageHandle;
|
||||
player allowDamage true;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ if(_ownerID == dayz_characterID) then {
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariable "dayzDeleteObj";
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
if (isServer) then {
|
||||
dayzDeleteObj call local_deleteObj;
|
||||
};
|
||||
|
||||
@@ -1,30 +1,51 @@
|
||||
private["_unit","_shooter","_distance","_ammo","_position","_isInCombat"];
|
||||
_unit = _this select 0;
|
||||
_shooter = _this select 1;
|
||||
_ammo = _this select 2;
|
||||
_distance = _this select 3;
|
||||
_position = _this select 4;
|
||||
private["_unit","_projectile","_isInCombat"];
|
||||
_unit = _this select 0;
|
||||
_projectile = _this select 6;
|
||||
|
||||
_isInComat = _unit getVariable["startcombattimer",0];
|
||||
_endPos = getPosATL _projectile;
|
||||
diag_log ("0");
|
||||
|
||||
_listNear = _unit nearEntities [["CAManBase","AllVehicles"],25];
|
||||
_isInComat = _unit getVariable["startcombattimer",0];
|
||||
|
||||
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 {
|
||||
_projectilespeed = Speed _projectile;
|
||||
_projectflight = (((_projectilespeed / 60) * 1000));
|
||||
if (_projectflight > 0) then {
|
||||
sleep (12 / (_projectflight));
|
||||
};
|
||||
if (alive _projectile && !(isNull _projectile)) then {_currentNear = (Position _projectile) nearEntities [["CAManBase","AllVehicles"],15];};
|
||||
_listNear = _listNear + _currentNear;
|
||||
_callCount = _callCount + 1;
|
||||
};
|
||||
diag_log ("2");
|
||||
{
|
||||
_nearVehicle = _x;
|
||||
_isInCombat = _nearVehicle getVariable["startcombattimer",0];
|
||||
|
||||
if ((alive _unit) and (isPlayer _unit) and _isInCombat == 0) then {
|
||||
_unit setVariable["startcombattimer", 1, true];
|
||||
diag_log("Now in Combat (Player): " + name _unit);
|
||||
_listNear = _listNear - [_x];
|
||||
|
||||
diag_log ("3");
|
||||
|
||||
if (isPlayer _nearVehicle) then {
|
||||
_isInCombat = _nearVehicle getVariable["startcombattimer",0];
|
||||
if ((alive _nearVehicle) and _isInCombat == 0) then {
|
||||
_nearVehicle setVariable["startcombattimer", 1, true];
|
||||
diag_log("Now in Combat (Player): " + name _unit);
|
||||
};
|
||||
};
|
||||
|
||||
if (_nearVehicle isKindOf "AllVehicles") then {
|
||||
{
|
||||
_isInCombat = _x getVariable["startcombattimer",0];
|
||||
if (isPlayer _x and _isInCombat == 0) then {
|
||||
if (isPlayer _x and _isInCombat == 0 and alive _x) then {
|
||||
_x setVariable["startcombattimer", 1, true];
|
||||
diag_log("Now in Combat (Crew): " + name _x);
|
||||
};
|
||||
} forEach (crew _nearVehicle);
|
||||
};
|
||||
} forEach _listNear;
|
||||
|
||||
} forEach _listNear;
|
||||
|
||||
@@ -61,7 +61,7 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
|
||||
if (count _muzzles > 1) then {
|
||||
_currentWpn = currentMuzzle player;
|
||||
};
|
||||
|
||||
|
||||
//Debug Message
|
||||
diag_log "Attempting to switch model";
|
||||
diag_log str(_weapons);
|
||||
@@ -162,7 +162,7 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
|
||||
//Debug Message
|
||||
diag_log "Swichtable Unit Created. Equipment:";
|
||||
diag_log str(weapons _newUnit);
|
||||
diag_log str(magazines _newUnit);
|
||||
diag_log str(magazines _newUnit);
|
||||
diag_log str(getWeaponCargo unitBackpack _newUnit);
|
||||
diag_log str(getMagazineCargo unitBackpack _newUnit);
|
||||
|
||||
@@ -175,17 +175,10 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
|
||||
removeAllWeapons _oldUnit;
|
||||
{_oldUnit removeMagazine _x;} forEach magazines _oldUnit;
|
||||
|
||||
if (!isNull dayz_originalPlayer) then {
|
||||
dayz_originalPlayer = _oldUnit;
|
||||
_oldUnit addEventHandler ["HandleDamage",{false}];
|
||||
_oldUnit disableAI "ANIM";
|
||||
_oldUnit disableAI "MOVE";
|
||||
} else {
|
||||
deleteVehicle _oldUnit;
|
||||
};
|
||||
deleteVehicle _oldUnit;
|
||||
|
||||
//Move player inside
|
||||
|
||||
|
||||
// player switchCamera = _currentCamera;
|
||||
if(_currentWpn != "") then {_newUnit selectWeapon _currentWpn;};
|
||||
[objNull, player, rSwitchMove,_currentAnim] call RE;
|
||||
|
||||
@@ -4,12 +4,20 @@ _caller = _this select 1;
|
||||
_id = _this select 2;
|
||||
_params = _this select 3;
|
||||
_pos = position _target;
|
||||
_hasRawMeat = "FoodSteakRaw" in magazines player;
|
||||
_hasdog = player getVariable ["dogid", "false"];
|
||||
|
||||
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;
|
||||
if ((_hasRawMeat) && (_hasdog == "false")) then {
|
||||
player removeMagazine "FoodSteakRaw";
|
||||
deleteVehicle (_this select 0);
|
||||
_dog = (group player) createUnit [typeOf _target, _pos, [], 0, "FORM"];
|
||||
player setvariable ["dogid", _fsmid];
|
||||
_dog disableAI "FSM";
|
||||
_fsmid = [_dog, typeOf _target] execFSM "\z\addons\dayz_code\system\dog_agent.fsm";
|
||||
_fsmid setFSMVariable ["_handle", _fsmid];
|
||||
_target removeAction _id;
|
||||
} else {
|
||||
cutText ["You must have RawMeat", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
//handle publicVariables here later.
|
||||
|
||||
@@ -21,12 +21,10 @@ private["_unit","_magazine","_used","_quantity","_magsNet","_magsWhole","_key","
|
||||
|
||||
// Both the firer and those nearby (<=15m) go into "combat" to prevent ALT-F4
|
||||
_firer setVariable["startcombattimer", 1, true];
|
||||
_listNear = _firer nearEntities [["CAManBase","AllVehicles"],15];
|
||||
{
|
||||
if (_isPlayer) then {
|
||||
|
||||
if (_distance <= 15) then {
|
||||
_unit setVariable["startcombattimer", 1, true];
|
||||
};
|
||||
} forEach _listNear;
|
||||
|
||||
if (_inVehicle) exitWith{};
|
||||
if (_firer == player) exitWith{};
|
||||
|
||||
Reference in New Issue
Block a user