mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
@@ -282,7 +282,7 @@ if (_canBuild select 0) then {
|
||||
if(_location1 distance _location2 > 10) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
_reason = "You've moved to far away from where you started building (within 10 meters)";
|
||||
_reason = "You've moved too far away from where you started building (within 10 meters)";
|
||||
detach _object;
|
||||
deleteVehicle _object;
|
||||
detach _objectHelper;
|
||||
@@ -292,7 +292,7 @@ if (_canBuild select 0) then {
|
||||
if(_location1 distance _objectHelperPos > 10) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
_reason = "Object is placed to far away from where you started building (within 10 meters)";
|
||||
_reason = "Object is placed too far away from where you started building (within 10 meters)";
|
||||
detach _object;
|
||||
deleteVehicle _object;
|
||||
detach _objectHelper;
|
||||
|
||||
@@ -246,7 +246,7 @@ if (_canBuild select 0) then {
|
||||
if(_location1 distance _location2 > 5) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
_reason = "You've moved to far away from where you started building (within 5 meters)";
|
||||
_reason = "You've moved too far away from where you started building (within 5 meters)";
|
||||
detach _object;
|
||||
deleteVehicle _object;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_playArray","_lastRest","_blood","_timesincedrink","_bloodinc","_Moves","_sleepArray","_animState","_started","_finished","_timer","_i","_r","_cureAttempt","_isAsleep","_cureChance","_infectedStatus","_randomamount"];
|
||||
private ["_playArray","_lastRest","_blood","_timesincedrink","_bloodinc","_Moves","_sleepArray","_animState","_started","_finished","_timer","_i","_r","_cureAttempt","_isAsleep","_cureChance","_infectedStatus","_randomamount","_isOwner","_tent"];
|
||||
//_timesincedrink = time - dayz_lastDrink;
|
||||
//_bloodinc =100; Removed for now(untested) due to it not needed yet
|
||||
//http://community.bistudio.com/wiki/ArmA2:_Moves
|
||||
@@ -24,6 +24,8 @@ _r = 0;
|
||||
_blood = 0;
|
||||
_cureAttempt = 0;
|
||||
_lastRest = player getVariable ["lastRest", 0];
|
||||
_tent = _this select 3;
|
||||
_isOwner = (_tent getVariable ["characterID","0"]) == dayz_characterID;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_isAsleep = (animationState player) in _sleepArray;
|
||||
@@ -39,8 +41,8 @@ while {r_doLoop} do {
|
||||
//Update the local value.
|
||||
_lastRest = diag_ticktime;
|
||||
|
||||
//10% chance of cure to infection every 60 seconds of sleeping
|
||||
_cureChance = 0.10 + _cureAttempt;
|
||||
//10% chance of cure to infection every 60 seconds of sleeping if owner, 5% if not owner
|
||||
_cureChance = if (_isOwner) then {0.10 + _cureAttempt} else {0.05 + _cureAttempt};
|
||||
if ([_cureChance] call fn_chance) then {
|
||||
r_player_infected = false;
|
||||
player setVariable["USEC_infected",false,false];
|
||||
|
||||
@@ -459,15 +459,9 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
if (s_player_packtent < 0) then {
|
||||
s_player_packtent = player addAction [localize "str_actions_self_07", "\z\addons\dayz_code\actions\tent_pack.sqf",_cursorTarget, 0, false, true];
|
||||
};
|
||||
//sleep
|
||||
if (s_player_sleep < 0) then {
|
||||
s_player_sleep = player addAction [localize "str_actions_self_sleep", "\z\addons\dayz_code\actions\player_sleep.sqf",_cursorTarget, 0, false, true];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_packtent;
|
||||
s_player_packtent = -1;
|
||||
player removeAction s_player_sleep;
|
||||
s_player_sleep = -1;
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_deleteBuild;
|
||||
@@ -476,8 +470,6 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
s_player_upgradestroage = -1;
|
||||
player removeAction s_player_packtent;
|
||||
s_player_packtent = -1;
|
||||
player removeAction s_player_sleep;
|
||||
s_player_sleep = -1;
|
||||
};
|
||||
//other tents
|
||||
if (_istypeTent) then {
|
||||
@@ -492,7 +484,6 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
player removeAction s_player_destorytent;
|
||||
s_player_destorytent = -1;
|
||||
};
|
||||
|
||||
if (_typeOfCursorTarget in ["IC_DomeTent","IC_Tent"]) then {
|
||||
if (s_player_packtentinfected < 0) then {
|
||||
s_player_packtentinfected = player addAction [localize "str_actions_self_07", "\z\addons\dayz_code\actions\tent_pack.sqf",_cursorTarget, 0, false, true];
|
||||
@@ -501,6 +492,13 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
player removeAction s_player_packtentinfected;
|
||||
s_player_packtentinfected = -1;
|
||||
};
|
||||
//sleep
|
||||
if (s_player_sleep < 0) then {
|
||||
s_player_sleep = player addAction [localize "str_actions_self_sleep", "\z\addons\dayz_code\actions\player_sleep.sqf",_cursorTarget, 0, false, true];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_sleep;
|
||||
s_player_sleep = -1;
|
||||
};
|
||||
|
||||
//Study Body
|
||||
|
||||
Reference in New Issue
Block a user