mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 17:42:01 +03:00
+ [FIXED] Battleye kick when calling dog. Thanks to @kikyou2 + [FIXED] Moved vehicle event handler to server side with a call to all connected clients. Before it was just set on only the owner and the server. This should fix issues with damage/repair handling of just purchased vehicles. + [FIXED] Fixed case sensitivity in building loot generation. This was only a problem on new maps that share the same buildings as others yet have differing case in the classnames. + [ADDED] New build-ables: Fence_corrugated_DZ, M240Nest_DZ, CanvasHut_DZ, ParkBench_DZ, MetalGate_DZ, OutHouse_DZ, Wooden_shed_DZ, WoodShack_DZ, StorageShed_DZ. + [ADDED] New crafting items: ItemCanvas, PartWoodLumber, PartWoodPlywood, ItemCorrugated, ItemPole + [ADDED] 55 gallon (210 liter) Fuel Barrel that can only be used on helicopters or fuel trucks. + [ADDED] All DayZ specific magazine items now only take one slot, this also makes it easier to become over burdened so be careful about blacking out. + [ADDED] More building loot spawn positions for Namalsk. + [FIXED] When packing tent get classname of new weapon_holder from config. + [CHANGED] Totally reworked player building system. Preview and placement accuracy has been significantly improved. Building now requires X number of stages to complete. Players cannot build while in combat. + [CHANGED] Added required tools array and is nearby checking for fire, etc. Also, each item can now have 5 separate crafting options. + [CHANGED] Reworked refuel and siphon code to support more can types. + [CHANGED] Removed all infinite fueling sources and added (KamazRefuel_DZ, UralRefuel_TK_EP1_DZ,MtvrRefuel_DES_EP1_DZ) variants of the fuel trucks to remove auto refuel and increase siphon-able fuel capacity to 10000. Old style refuel can still be used if the variable dayz_oldrefuel = true is set in the missions init.sqf. + [CHANGED] Remove object code now uses config variables instead of hard coded into sqf (default: constructioncount = 5) + [CHANGED] Moved most arrays for revealing objects, allowed objects, update objects, disallowed combat roll to arrays within variables.sqf. So that these arrays are unified and easier to change. + [CHANGED] New vehicle spawns now have a new fuel system using a random percent between min and max variables. Defaults: (DynamicVehicleFuelLow = 0; DynamicVehicleFuelHigh = 100;) + [CHANGED] New vehicle spawns now damage all parts and without a limiter on fuel and engine parts, this could cause a vehicle to be very close to blowing up. + [CHANGED] Disabled simulation server side of all road debris and crashes.
108 lines
3.1 KiB
Plaintext
108 lines
3.1 KiB
Plaintext
private["_object","_worldspace","_location","_dir","_character","_tent","_class","_id","_uid","_dam","_hitpoints","_selection","_array","_damage","_randFuel","_fuel","_key","_result","_outcome","_totaldam","_parts","_retry","_done","_spawnDMG"];
|
|
|
|
_object = _this select 0;
|
|
_worldspace = _this select 1;
|
|
_class = _this select 2;
|
|
_spawnDMG = _this select 3;
|
|
_characterID = _this select 4;
|
|
|
|
diag_log ("PUBLISH: Attempt " + str(_object));
|
|
_dir = _worldspace select 0;
|
|
_location = _worldspace select 1;
|
|
|
|
//Generate UID test using time
|
|
_uid = _worldspace call dayz_objectUID3;
|
|
|
|
// TODO: check if uid already exists and if so increment by 1 and check again as soon as we find nothing continue.
|
|
|
|
//Send request
|
|
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _characterID, _worldspace, [], [], 1,_uid];
|
|
diag_log ("HIVE: WRITE: "+ str(_key));
|
|
_key call server_hiveWrite;
|
|
|
|
// Switched to spawn so we can wait a bit for the ID
|
|
[_object,_uid,_characterID,_class,_dir,_location] spawn {
|
|
private["_object","_uid","_characterID","_done","_retry","_key","_result","_outcome","_oid","_selection","_dam","_class"];
|
|
|
|
_object = _this select 0;
|
|
_uid = _this select 1;
|
|
_characterID = _this select 2;
|
|
_class = _this select 3;
|
|
_dir = _this select 4;
|
|
_location = _this select 5;
|
|
|
|
_done = false;
|
|
_retry = 0;
|
|
// TODO: Needs major overhaul for 1.1
|
|
while {_retry < 10} do {
|
|
|
|
sleep 1;
|
|
// GET DB ID
|
|
_key = format["CHILD:388:%1:",_uid];
|
|
diag_log ("HIVE: WRITE: "+ str(_key));
|
|
_result = _key call server_hiveReadWrite;
|
|
_outcome = _result select 0;
|
|
if (_outcome == "PASS") then {
|
|
_oid = _result select 1;
|
|
//_object setVariable ["ObjectID", _oid, true];
|
|
diag_log("CUSTOM: Selected " + str(_oid));
|
|
_done = true;
|
|
_retry = 100;
|
|
|
|
} else {
|
|
diag_log("CUSTOM: trying again to get id for: " + str(_uid));
|
|
_done = false;
|
|
_retry = _retry + 1;
|
|
};
|
|
};
|
|
|
|
// Remove marker
|
|
deleteVehicle _object;
|
|
|
|
if(!_done) exitWith { diag_log("CUSTOM: failed to get id for : " + str(_uid)); };
|
|
|
|
_object_para = "ParachuteMediumWest" createVehicle [0,0,0];
|
|
|
|
_object_para setpos [_location select 0, _location select 1,(_location select 2) + 65];
|
|
|
|
_object = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
|
|
|
|
_object setVariable ["ObjectID", _oid, true];
|
|
|
|
_object setVariable ["lastUpdate",time];
|
|
|
|
_object setVariable ["CharacterID", _characterID, true];
|
|
|
|
_object attachTo [_object_para, [0,0,-1.6]];
|
|
|
|
sleep 1.0;
|
|
|
|
WaitUntil{(getpos _object select 2) < 0.1};
|
|
|
|
detach _object;
|
|
|
|
deleteVehicle _object_para;
|
|
|
|
// _object setDamage _damage;
|
|
// _object setFuel _fuel;
|
|
|
|
clearWeaponCargoGlobal _object;
|
|
clearMagazineCargoGlobal _object;
|
|
|
|
_veh setdir _dir;
|
|
_veh setpos _location;
|
|
|
|
//_object setvelocity [0,0,1];
|
|
|
|
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
|
|
|
_object call fnc_vehicleEventHandler;
|
|
|
|
// for non JIP users this should make sure everyone has eventhandlers for vehicles.
|
|
dayzVehicleInit = _object;
|
|
publicVariable "dayzVehicleInit";
|
|
|
|
|
|
|
|
diag_log ("PUBLISH: Created " + (_class) + " with ID " + str(_uid));
|
|
}; |