mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-24 09:29:21 +03:00
Change publishVeh2 and 3 to call instead of spawn
Following 95b3174 it is now possible to use call to avoid suspension mid
execution as described in:
https://epochmod.com/forum/topic/43805-epoch-shed_safetyvehiclesqf-issue/?tab=comments#comment-292696
This commit is contained in:
@@ -84,10 +84,14 @@ if (_outcome != "PASS") then {
|
||||
|
||||
if(DZE_TRADER_SPAWNMODE) then {
|
||||
_object attachTo [_object_para, [0,0,-1.6]];
|
||||
uiSleep 1;
|
||||
WaitUntil{(([_object] call FNC_GetPos) select 2) < 0.1};
|
||||
detach _object;
|
||||
deleteVehicle _object_para;
|
||||
[_object,_object_para] spawn {
|
||||
_object = _this select 0;
|
||||
_object_para = _this select 1;
|
||||
uiSleep 1;
|
||||
waitUntil {([_object] call fnc_getPos) select 2 < 0.1};
|
||||
detach _object;
|
||||
deleteVehicle _object_para;
|
||||
};
|
||||
};
|
||||
|
||||
_object call fnc_veh_ResetEH;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_activatingPlayer","_object","_worldspace","_location","_dir","_class","_uid","_key","_keySelected","_characterID","_donotusekey","_result","_outcome","_oid","_countr","_objectID","_objectUID","_newobject","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_clientKey","_exitReason","_playerUID"];
|
||||
private ["_activatingPlayer","_object","_worldspace","_location","_dir","_class","_uid","_key","_keySelected","_characterID","_donotusekey","_result","_outcome","_oid","_objectID","_objectUID","_newobject","_weapons","_magazines","_backpacks","_clientKey","_exitReason","_playerUID"];
|
||||
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
|
||||
|
||||
if (count _this < 7) exitWith {
|
||||
@@ -93,33 +93,8 @@ if (_outcome != "PASS") then {
|
||||
_object setVariable ["lastUpdate",diag_tickTime];
|
||||
_object setVariable ["CharacterID", _characterID, true];
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
|
||||
//Add weapons
|
||||
_objWpnTypes = _weapons select 0;
|
||||
_objWpnQty = _weapons select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} count _objWpnTypes;
|
||||
|
||||
//Add Magazines
|
||||
_objWpnTypes = _magazines select 0;
|
||||
_objWpnQty = _magazines select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} count _objWpnTypes;
|
||||
|
||||
//Add Backpacks
|
||||
_objWpnTypes = _backpacks select 0;
|
||||
_objWpnQty = _backpacks select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} count _objWpnTypes;
|
||||
|
||||
[_weapons,_magazines,_backpacks,_object] call server_addCargo;
|
||||
|
||||
_object setDir _dir;
|
||||
_object setPosATL _location;
|
||||
|
||||
Reference in New Issue
Block a user