diff --git a/CHANGE LOG 1.0.6.txt b/CHANGE LOG 1.0.6.txt index c1d5d7b3f..c4c6491f4 100644 --- a/CHANGE LOG 1.0.6.txt +++ b/CHANGE LOG 1.0.6.txt @@ -30,12 +30,13 @@ [NEW] Upgraded (_DZE1,2,3,4) ArmoredSUV and Kamaz classes are now available. #1518 #1538 @McKeighan [NEW] Added waves effect during stormy weather #974 @FramedYannick @ebaydayz [NEW] Optional variable to prevent stealing from backpacks by non-friendlies at traders. Set DZE_BackpackAntiTheft = true; in init.sqf @ebaydayz -[NEW] Zupa's Advanced Trading is now included as part of the Epoch Code, enabled with DZE_advancedTrading = true; NOT COMPATIBLE WITH DATABASE TRADERS @icomrade @Windmolders +[NEW] Zupa's Advanced Trading v2.1 is now included as part of the Epoch Code, enabled with DZE_advancedTrading = true; NOT COMPATIBLE WITH DATABASE TRADERS @icomrade @Windmolders [NEW] With config based traders categories can be reused by setting the duplicate=#; value. # is the category number to copy. @ebaydayz [NEW] Gems are now treated as variable value currency (Advanced Trading only). configure gem values using DZE_GemWorthArray =[]; see ConfigVariables.sqf for more info @icomrade [NEW] Gem rarity is now configurable for mining using DZE_GemOccurance =[]; see ConfigVariables.sqf for more info @icomrade [NEW] Plot Management by Zupa is now included and enabled by default with variable DZE_plotManagement, see ConfigVariables.sqf @DevZupa @Bruce-LXXVI @icomrade -[NEW] A Plot For Life by RimBlock is now included and enabled by default with variable DZE_plotforLife, see configVariables.sqf @RimBlock @icomrade +[NEW] A Plot For Life v2.5 by RimBlock is now included and enabled by default with variable DZE_plotforLife, see configVariables.sqf @RimBlock @icomrade +[NEW] Precise Base Building v1.0.5 by Mikeeeyy is now included. @Mikeeeyy @icomrade @ebaydayz [NEW] You may toggle vehicle destruction effects to prevent damage from vehicle explosions (useful to prevent griefing from ramming) use DZE_NoVehicleExplosions = true; to enable #1198 @icomrade [NEW] Temperature factors are now configurable with DZE_TempVars see ConfigVariables.sqf for more info @icomrade [NEW] Weather effects are now configurable with DZE_WeatherVariables See DynamicWeatherEffects.sqf for info on these values @icomrade diff --git a/SQF/dayz_server/compile/KK_Functions.sqf b/SQF/dayz_server/compile/KK_Functions.sqf index 7e35efd1b..df999f186 100644 --- a/SQF/dayz_server/compile/KK_Functions.sqf +++ b/SQF/dayz_server/compile/KK_Functions.sqf @@ -1,26 +1,32 @@ // KK_Functions // -// All functions inside created by KillZoneKid (http://killzonekid.com/) +// by KillZoneKid (http://killzonekid.com/) // // // Precise positioning functions. KK_fnc_floatToString = { - private "_arr"; - if (abs (_this - _this % 1) == 0) exitWith { str _this }; - _arr = toArray str abs (_this % 1); - _arr set [0, 32]; - toString (toArray str ( - abs (_this - _this % 1) * _this / abs _this - ) + _arr - [32]) + private "_arr"; + if (abs (_this - _this % 1) == 0) exitWith { str _this }; + _arr = toArray str abs (_this % 1); + _arr set [0, 32]; + toString (toArray str ( + abs (_this - _this % 1) * _this / abs _this + ) + _arr - [32]) }; KK_fnc_positionToString = { - format [ - "[%1,%2,%3]", - _this select 0 call KK_fnc_floatToString, - _this select 1 call KK_fnc_floatToString, - _this select 2 call KK_fnc_floatToString - ] + format [ + "[%1,%2,%3]", + _this select 0 call KK_fnc_floatToString, + _this select 1 call KK_fnc_floatToString, + _this select 2 call KK_fnc_floatToString + ] }; + +AN_fnc_formatWorldspace = { + private "_ws"; + _ws = toArray str _this; + format ["[%1,%2%3]", _this select 0 call KK_fnc_floatToString, _this select 1 call KK_fnc_positionToString, toString ([_ws, (_ws find 93) + 1, count _ws - 2] call BIS_fnc_subSelect)] +}; \ No newline at end of file diff --git a/SQF/dayz_server/compile/server_publishFullObject.sqf b/SQF/dayz_server/compile/server_publishFullObject.sqf index 764657a22..d6d558cc7 100644 --- a/SQF/dayz_server/compile/server_publishFullObject.sqf +++ b/SQF/dayz_server/compile/server_publishFullObject.sqf @@ -17,11 +17,8 @@ diag_log ("PUBLISH: Attempt " + str(_object)); //get UID _uid = _worldspace call dayz_objectUID2; -_worldspace set [0, (_worldspace select 0) call KK_fnc_floatToString]; -_worldspace set [1, (_worldspace select 1) call KK_fnc_positionToString]; - //Send request -_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage, _charID, _worldspace, _inventory, _hitpoints, _fuel,_uid]; +_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage, _charID, _worldspace call AN_fnc_formatWorldspace, _inventory, _hitpoints, _fuel,_uid]; // Precise Base Building 1.0.5 //diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; @@ -32,11 +29,11 @@ _object setVariable ["ObjectUID", _uid,true]; if (DZE_GodModeBase) then { _object addEventHandler ["HandleDamage", {false}]; }else{ - _object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}]; + _object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}]; }; // Test disabling simulation server side on buildables only. _object enableSimulation false; -PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object]; +dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object]; diag_log ("PUBLISH: Created " + (_class) + " with ID " + _uid); diff --git a/SQF/dayz_server/compile/server_publishObject.sqf b/SQF/dayz_server/compile/server_publishObject.sqf index 83822e431..f7a1bbdb2 100644 --- a/SQF/dayz_server/compile/server_publishObject.sqf +++ b/SQF/dayz_server/compile/server_publishObject.sqf @@ -13,15 +13,11 @@ if ([_object, "Server"] call check_publishobject) then { _objectUID = _worldspace call dayz_objectUID2; _object setVariable [ "ObjectUID", _objectUID, true ]; - - //Precise base building - _worldspace set [0, (_worldspace select 0) call KK_fnc_floatToString]; - _worldspace set [1, (_worldspace select 1) call KK_fnc_positionToString]; - // we can't use getVariable because only the object creation is known from the server (position,direction,variables are not sync'ed yet) //_characterID = _object getVariable [ "characterID", 0 ]; //_ownerArray = _object getVariable [ "ownerArray", [] ]; - _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:", dayZ_instance, _type, 0, _characterID, _worldspace, _inventory, [], 0,_objectUID ]; + //_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:", dayZ_instance, _type, 0, _characterID, _worldspace, _inventory, [], 0,_objectUID ]; + _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _type, 0 , _characterID, _worldspace call AN_fnc_formatWorldspace, _inventory, [], 0,_objectUID]; // Precise Base Building 1.0.5 _key call server_hiveWrite; diff --git a/SQF/dayz_server/compile/server_swapObject.sqf b/SQF/dayz_server/compile/server_swapObject.sqf index 28d29c2d4..5d1aa8a56 100644 --- a/SQF/dayz_server/compile/server_swapObject.sqf +++ b/SQF/dayz_server/compile/server_swapObject.sqf @@ -46,20 +46,18 @@ if (!_allowed || !_proceed) exitWith { // Publish variables _object setVariable ["CharacterID",_charID,true]; + +//_object setVariable ["ObjectUID",_objectUID,true]; +_object setVariable ["OEMPos",(_worldspace select 1),true]; + +//diag_log ("PUBLISH: Attempt " + str(_object)); //get UID _uid = _worldspace call dayz_objectUID2; -_worldspace set [0, (_worldspace select 0) call KK_fnc_floatToString]; -_worldspace set [1, (_worldspace select 1) call KK_fnc_positionToString]; - -//_object setVariable ["ObjectUID",_objectUID,true]; -_object setVariable ["OEMPos", call compile (_worldspace select 1), true]; - -//diag_log ("PUBLISH: Attempt " + str(_object)); - //Send request -_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid]; +//_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid]; +_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace call AN_fnc_formatWorldspace, [], [], 0,_uid]; // Precise Base Building 1.0.5 //diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; diff --git a/SQF/dayz_server/compile/server_updateObject.sqf b/SQF/dayz_server/compile/server_updateObject.sqf index 2e78b13be..c63e58143 100644 --- a/SQF/dayz_server/compile/server_updateObject.sqf +++ b/SQF/dayz_server/compile/server_updateObject.sqf @@ -52,7 +52,8 @@ _needUpdate = _object in needUpdate_objects; _object_position = { private ["_position","_worldspace","_fuel","_key"]; _position = getPosATL _object; - _worldspace = [(getDir _object) call KK_fnc_floatToString, _position call KK_fnc_positionToString]; + //_worldspace = [round (direction _object),_position]; + _worldspace = [getDir _object, _position] call AN_fnc_formatWorldspace; // Precise Base Building 1.0.5 _fuel = if (_object isKindOf "AllVehicles") then {fuel _object} else {0}; _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel]; diff --git a/SQF/dayz_server/init/server_functions.sqf b/SQF/dayz_server/init/server_functions.sqf index 41ec5d799..208c0b737 100644 --- a/SQF/dayz_server/init/server_functions.sqf +++ b/SQF/dayz_server/init/server_functions.sqf @@ -10,7 +10,6 @@ BIS_MPF_remoteExecutionServer = { call compile preprocessFileLineNumbers "\z\addons\dayz_code\util\compile.sqf"; call compile preprocessFileLineNumbers "\z\addons\dayz_code\loot\compile.sqf"; -call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\KK_Functions.sqf"; BIS_Effects_Burn = {}; dayz_disconnectPlayers = []; @@ -175,10 +174,6 @@ dayz_objectUID2 = { _dir = _this select 0; _key = ""; _position = _this select 1; - if ((typeName _dir) == "STRING") then { - _dir = call (compile _dir); - _position = call (compile _position); - }; { _x = _x * 10; if (_x < 0) then { _x = _x * -10 }; @@ -229,4 +224,6 @@ server_hiveReadWriteLarge = { _resultArray }; -call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fa_hiveMaintenance.sqf"; \ No newline at end of file +call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fa_hiveMaintenance.sqf";\ +// Precise base building 1.0.5 +call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\kk_functions.sqf"; \ No newline at end of file diff --git a/SQF/dayz_server/system/server_monitor.sqf b/SQF/dayz_server/system/server_monitor.sqf index c64aa72e5..01290a946 100644 --- a/SQF/dayz_server/system/server_monitor.sqf +++ b/SQF/dayz_server/system/server_monitor.sqf @@ -77,12 +77,6 @@ if (_status == "ObjectStreamStart") then { _pos = getMarkerpos "respawn_west"; _wsDone = false; - if (count _worldspace >= 2) then { - if ((typeName (_worldspace select 0)) == "STRING") then { - _worldspace set [0, call compile (_worldspace select 0)]; - _worldspace set [1, call compile (_worldspace select 1)]; - }; - }; if (count _worldspace >= 1 && {(typeName (_worldspace select 0)) == "SCALAR"}) then { _dir = _worldspace select 0; }; @@ -102,13 +96,15 @@ if (_status == "ObjectStreamStart") then { diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos)); }; - // Realign characterID to OwnerPUID - need to force save though. - + + /* Plot For Life 2.5 */ + // Realign characterID to OwnerPUID - need to force save though. if (count _worldspace < 3) then { _worldspace set [count _worldspace, "0"]; }; _ownerPUID = _worldspace select 2; + if (_damage < 1) then { //diag_log format["OBJ: %1 - %2,%3,%4,%5,%6,%7,%8", _idKey,_type,_ownerID,_worldspace,_inventory,_hitPoints,_fuel,_damage];