mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Add a few missing playerIsNear checks
Blocks duping method reported by Sercan and confirmed with @oiad . Thanks
This commit is contained in:
@@ -87,6 +87,7 @@
|
||||
[FIXED] Vehicle lock and unlock actions are now refreshed correctly without needing to look away and back again. @oiad
|
||||
[FIXED] A potential undefined error on bear trap trigger. @oiad
|
||||
[FIXED] A few floating loot positions in firestation.
|
||||
[FIXED] Blocked a duping method involving changing clothes. Thanks to Sercan for reporting. @oiad
|
||||
|
||||
[NOTE] The fixes below are included in the 1.0.6 Build C server package released December 29th, 2016 (http://dayzepoch.com/a2dayzepoch.php)
|
||||
[FIXED] Hive child 309 errors that resulted in broken saving of newly built storage object inventory. @icomrade
|
||||
|
||||
@@ -9,10 +9,13 @@
|
||||
};
|
||||
|
||||
*/
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_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","_vector"];
|
||||
"_objWpnTypes","_objWpnQty","_countr","_itemName","_vector","_playerNear"];
|
||||
|
||||
_cursorTarget = _this select 3;
|
||||
|
||||
@@ -52,7 +55,15 @@ _isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
|
||||
_upgradeParts = [];
|
||||
_startUpgrade = true;
|
||||
|
||||
if(_isWater or _onLadder) exitWith { localize "str_CannotUpgrade" call dayz_rollingMessages; };
|
||||
if(_isWater or _onLadder) exitWith {dayz_actionInProgress = false; localize "str_CannotUpgrade" call dayz_rollingMessages;};
|
||||
|
||||
// Make sure you are the closest player to the object
|
||||
_playerNear = _cursorTarget call dze_isnearest_player;
|
||||
if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_pickup_limit_5" call dayz_rollingMessages;};
|
||||
|
||||
// Make sure no other players are nearby
|
||||
_playerNear = {isPlayer _x} count (([_cursorTarget] call FNC_GetPos) nearEntities ["CAManBase",10]) > 1;
|
||||
if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_pickup_limit_5" call dayz_rollingMessages;};
|
||||
|
||||
// lets check player has requiredTools for upgrade
|
||||
{
|
||||
@@ -197,4 +208,6 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then {
|
||||
} else {
|
||||
localize "str_upgradeNoOption" call dayz_rollingMessages;
|
||||
*/
|
||||
};
|
||||
};
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,6 +1,10 @@
|
||||
if (dayz_lastClothesChange + 5 > diag_tickTime) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_lastClothesChange = diag_tickTime;
|
||||
|
||||
// Make sure no other players are nearby
|
||||
_playerNear = {isPlayer _x} count (([player] call FNC_GetPos) nearEntities ["CAManBase",12]) > 1;
|
||||
if (_playerNear) exitWith {localize "STR_EPOCH_PLAYER_84" call dayz_rollingMessages;};
|
||||
|
||||
if (_this in DZE_RestrictSkins) exitWith { format[localize "str_epoch_player_315",_this] call dayz_rollingMessages; };
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_83" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
private ["_notClosest","_playerDistance","_nearPlayers","_obj","_playerNear"];
|
||||
private ["_notClosest","_playerDistance","_nearPlayers","_playerNear"];
|
||||
|
||||
_notClosest = false;
|
||||
|
||||
if (!isNull _this) then {
|
||||
_nearPlayers = _this nearEntities ["CAManBase", 12];
|
||||
_playerNear = ({isPlayer _x} count _nearPlayers) > 1;
|
||||
_notClosest = false;
|
||||
|
||||
if (_playerNear) then {
|
||||
// check if another player is closer
|
||||
_playerDistance = player distance _this;
|
||||
@@ -11,8 +13,6 @@ if (!isNull _this) then {
|
||||
if (_playerDistance > (_x distance _this)) exitWith { _notClosest = true; };
|
||||
} count _nearPlayers;
|
||||
};
|
||||
} else {
|
||||
_notClosest = false;
|
||||
};
|
||||
|
||||
_notClosest
|
||||
@@ -14,9 +14,14 @@ if (DZE_permanentPlot) then {
|
||||
_ownerID = _obj getVariable["ownerPUID","0"];
|
||||
};
|
||||
|
||||
// Make sure you are the closest player to the tent
|
||||
_playerNear = _obj call dze_isnearest_player;
|
||||
if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_16" call dayz_rollingMessages;};
|
||||
|
||||
// Make sure no other players are nearby
|
||||
_playerNear = {isPlayer _x} count (([_obj] call FNC_GetPos) nearEntities ["CAManBase",10]) > 1;
|
||||
if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_pickup_limit_5" call dayz_rollingMessages;};
|
||||
|
||||
_packobj = getText (configFile >> "CfgVehicles" >> typeOf _obj >> "pack");
|
||||
|
||||
player removeAction s_player_packtent;
|
||||
|
||||
Reference in New Issue
Block a user