mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Globally remove wrecked objects
using PVEH PVDZE_obj_Remove. Wrecks only exist for the players currently in the server when the parent object is destroyed. Passing the object through the PVEH does not work.
This commit is contained in:
@@ -105,6 +105,7 @@
|
||||
[FIXED] Players are no longer able to brute force doors or safes by the method described in #1187 @icomrade
|
||||
[FIXED] Fix some items not displaying removal option #1135 @icomrade
|
||||
[FIXED] Study body message saying his/he on female players. @ebaydayz
|
||||
[FIXED] Destroyed objects (i.e. ore veins, ammo crates and wrecked buildables) are now deleted globally after being removed. #1730 @icomrade
|
||||
|
||||
[UPDATED] .hpp files updated in dayz_code\Configs\CfgLoot\CfgBuildingPos. @Uro1
|
||||
[UPDATED] .bat files updated in Config-Examples @Raziel23x
|
||||
|
||||
@@ -27,6 +27,9 @@ if (DZE_permanentPlot) then {
|
||||
if (_obj in DZE_DoorsLocked) exitWith {DZE_ActionInProgress = false; localize "STR_EPOCH_ACTIONS_20" call dayz_rollingMessages;};
|
||||
if (_obj getVariable ["GeneratorRunning", false]) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_89" call dayz_rollingMessages;};
|
||||
|
||||
_PlayerNear = {isPlayer _x} count (([_obj] call FNC_GetPos) nearEntities ["CAManBase", 10]) > 1;
|
||||
if (_PlayerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages;};
|
||||
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
@@ -90,6 +93,9 @@ while {_isOk} do {
|
||||
_isOk = false;
|
||||
_proceed = false;
|
||||
};
|
||||
|
||||
format[localize "str_epoch_player_163",_nameVehicle,(_counter + 1),_limit] call dayz_rollingMessages;
|
||||
|
||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
||||
player playActionNow "Medic";
|
||||
_dis=20;
|
||||
@@ -138,8 +144,6 @@ while {_isOk} do {
|
||||
_proceed = false;
|
||||
};
|
||||
|
||||
format[localize "str_epoch_player_163",_nameVehicle,_counter,_limit] call dayz_rollingMessages;
|
||||
|
||||
if(_counter == _limit) exitWith {
|
||||
_isOk = false;
|
||||
_proceed = true;
|
||||
@@ -179,15 +183,19 @@ if (_proceed && _success) then {
|
||||
if(!isNull(_obj)) then {
|
||||
|
||||
_ipos = getPosATL _obj;
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
if(!_isWreck) then {
|
||||
if(!_isWreck && !_isWreckBuilding) then {
|
||||
_activatingPlayer = player;
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID, _activatingPlayer];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
};
|
||||
|
||||
if (_isWreckBuilding) then {
|
||||
PVDZ_send = [player,"RemoveObject",_ipos];
|
||||
publicVariableServer "PVDZ_send";
|
||||
};
|
||||
|
||||
format[localize "str_epoch_player_165",_nameVehicle] call dayz_rollingMessages;
|
||||
|
||||
_preventRefund = false;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
private "_pos";
|
||||
|
||||
if (isNil {_this select 0}) exitWith {[0,0,0]};
|
||||
//if (isNil {_this select 0}) exitWith {[0,0,0]};
|
||||
_thingy = _this select 0;
|
||||
_pos = getPosASL _thingy;
|
||||
|
||||
|
||||
@@ -15,9 +15,10 @@
|
||||
"PVDZE_veh_Lock" addPublicVariableEventHandler {(_this select 1) call local_lockUnlock};
|
||||
"PVDZE_plr_GutBodyZ" addPublicVariableEventHandler {(_this select 1) spawn local_gutObjectZ};
|
||||
"PVDZE_veh_Init" addPublicVariableEventHandler {(_this select 1) call fnc_veh_ResetEH};
|
||||
"PVDZE_obj_Remove" addPublicVariableEventHandler {_pos = (_this select 1); _obj = nearestObjects [_pos, DZE_isWreckBuilding, 5]; if (count _obj > 0) then {deleteVehicle (_obj select 0);};};
|
||||
|
||||
if (toLower worldName == "chernarus") then {
|
||||
{
|
||||
if (toLower worldName != "chernarus") exitWith {};
|
||||
private ["_building","_fckingcode"];
|
||||
|
||||
_fckingcode = {
|
||||
@@ -69,6 +70,7 @@
|
||||
[10443,2345,363318], [10481,2358,363308], [10365,2241,363748], [10518,2288,364628], [10457,2256,363454],
|
||||
[10174,1810,366820], [3589,2175,328944]
|
||||
];
|
||||
};
|
||||
|
||||
// Server only
|
||||
if (isServer) then {
|
||||
|
||||
@@ -124,4 +124,13 @@ switch (_variable) do {
|
||||
PVDZE_plr_FriendRQ = _arraytosend;
|
||||
_owner publicVariableClient "PVDZE_plr_FriendRQ";
|
||||
};
|
||||
|
||||
case "RemoveObject": {
|
||||
PVDZE_obj_Remove = _arraytosend;
|
||||
{
|
||||
if (isPlayer _x) then {
|
||||
(owner _x) publicVariableClient "PVDZE_obj_Remove";
|
||||
};
|
||||
} forEach playableUnits;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user