mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-07-04 15:41:55 +03:00
Update vanilla player_breakin.sqf
Vanilla commits: https://github.com/DayZMod/DayZ/commit/63aaf07a30803c3d72bdc252b87c3ed974e5e740 https://github.com/DayZMod/DayZ/commit/b074e7d8471b5fde7b20ddc7259c30a40d660f4a https://github.com/DayZMod/DayZ/commit/fb3f69a69a0ad528f2b85e9dfbb1c47eb52dafdc https://github.com/DayZMod/DayZ/commit/416cc5dcf186f7d37f82a5198f86cbf048679f16 https://github.com/DayZMod/DayZ/commit/b6c0dd58494d27a425fda58b3a1148fc935c4df1 https://github.com/DayZMod/DayZ/commit/39a3d45965fba93fde635bc6429eb69fd1ab545d
This commit is contained in:
@@ -10,6 +10,6 @@ _return = [0.25] call fn_chance; // will return TRUE 25% of the time
|
||||
*************************************************************/
|
||||
private ["_result"];
|
||||
|
||||
if ((_this select 0) > (random 1)) then {_result = true;} else {_result = false;};
|
||||
_result = if (((_this select 0) * 100) > floor(random 100)) then { true } else { false };
|
||||
|
||||
_result
|
||||
|
||||
@@ -523,6 +523,8 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
//Only the owners can lock the gates
|
||||
_isLockableGate = _typeOfCursorTarget in ["WoodenGate_2","WoodenGate_3","WoodenGate_4","MetalGate_2","MetalGate_3","MetalGate_4"];
|
||||
_isUnlocked = _cursorTarget getVariable ["isOpen","0"] == "1";
|
||||
|
||||
_isActionInProgress = _cursorTarget getVariable ["actionInProgress",false];
|
||||
|
||||
//Allow the gates to be opened when not locked by anyone
|
||||
_isOpen = ((_cursorTarget animationPhase "DoorL") == 1) || ((_cursorTarget animationPhase "DoorR") == 1);
|
||||
@@ -597,7 +599,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
s_player_lockhouse = -1;
|
||||
};
|
||||
//Break In
|
||||
if ((_isHouse or _isLockableGate) && (_ownerPID != _uid) && !_isUnlocked) then {
|
||||
if ((_isHouse or _isLockableGate) && (_ownerPID != _uid) && !_isUnlocked && !_isActionInProgress) then {
|
||||
if (s_player_breakinhouse < 0) then {
|
||||
s_player_breakinhouse = player addAction [localize "STR_BLD_ACTIONS_BREAKIN", "\z\addons\dayz_code\actions\player_breakin.sqf",_cursorTarget, 1, true, true];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user