mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Update Precise Base Building to v1.0.5 by @Mikeeeyy
Note @icomrade : 1.0.6 test servers need to empty object_data or run the SQL query linked below before applying this update. http://epochmod.com/forum/topic/15813-release-v105-precise-base-building-persistent-bases-after-restart-updated-220915/#comment-118663
This commit is contained in:
@@ -30,12 +30,13 @@
|
|||||||
[NEW] Upgraded (_DZE1,2,3,4) ArmoredSUV and Kamaz classes are now available. #1518 #1538 @McKeighan
|
[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] 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] 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] 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] 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] 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] 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] 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] 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
|
[NEW] Weather effects are now configurable with DZE_WeatherVariables See DynamicWeatherEffects.sqf for info on these values @icomrade
|
||||||
|
|||||||
@@ -1,26 +1,32 @@
|
|||||||
// KK_Functions
|
// KK_Functions
|
||||||
//
|
//
|
||||||
// All functions inside created by KillZoneKid (http://killzonekid.com/)
|
// by KillZoneKid (http://killzonekid.com/)
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
// Precise positioning functions.
|
// Precise positioning functions.
|
||||||
|
|
||||||
KK_fnc_floatToString = {
|
KK_fnc_floatToString = {
|
||||||
private "_arr";
|
private "_arr";
|
||||||
if (abs (_this - _this % 1) == 0) exitWith { str _this };
|
if (abs (_this - _this % 1) == 0) exitWith { str _this };
|
||||||
_arr = toArray str abs (_this % 1);
|
_arr = toArray str abs (_this % 1);
|
||||||
_arr set [0, 32];
|
_arr set [0, 32];
|
||||||
toString (toArray str (
|
toString (toArray str (
|
||||||
abs (_this - _this % 1) * _this / abs _this
|
abs (_this - _this % 1) * _this / abs _this
|
||||||
) + _arr - [32])
|
) + _arr - [32])
|
||||||
};
|
};
|
||||||
|
|
||||||
KK_fnc_positionToString = {
|
KK_fnc_positionToString = {
|
||||||
format [
|
format [
|
||||||
"[%1,%2,%3]",
|
"[%1,%2,%3]",
|
||||||
_this select 0 call KK_fnc_floatToString,
|
_this select 0 call KK_fnc_floatToString,
|
||||||
_this select 1 call KK_fnc_floatToString,
|
_this select 1 call KK_fnc_floatToString,
|
||||||
_this select 2 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)]
|
||||||
|
};
|
||||||
@@ -17,11 +17,8 @@ diag_log ("PUBLISH: Attempt " + str(_object));
|
|||||||
//get UID
|
//get UID
|
||||||
_uid = _worldspace call dayz_objectUID2;
|
_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
|
//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));
|
//diag_log ("HIVE: WRITE: "+ str(_key));
|
||||||
_key call server_hiveWrite;
|
_key call server_hiveWrite;
|
||||||
|
|
||||||
@@ -32,11 +29,11 @@ _object setVariable ["ObjectUID", _uid,true];
|
|||||||
if (DZE_GodModeBase) then {
|
if (DZE_GodModeBase) then {
|
||||||
_object addEventHandler ["HandleDamage", {false}];
|
_object addEventHandler ["HandleDamage", {false}];
|
||||||
}else{
|
}else{
|
||||||
_object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
|
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
||||||
};
|
};
|
||||||
// Test disabling simulation server side on buildables only.
|
// Test disabling simulation server side on buildables only.
|
||||||
_object enableSimulation false;
|
_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);
|
diag_log ("PUBLISH: Created " + (_class) + " with ID " + _uid);
|
||||||
|
|||||||
@@ -13,15 +13,11 @@ if ([_object, "Server"] call check_publishobject) then {
|
|||||||
|
|
||||||
_objectUID = _worldspace call dayz_objectUID2;
|
_objectUID = _worldspace call dayz_objectUID2;
|
||||||
_object setVariable [ "ObjectUID", _objectUID, true ];
|
_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)
|
// 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 ];
|
//_characterID = _object getVariable [ "characterID", 0 ];
|
||||||
//_ownerArray = _object getVariable [ "ownerArray", [] ];
|
//_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;
|
_key call server_hiveWrite;
|
||||||
|
|
||||||
|
|||||||
@@ -46,20 +46,18 @@ if (!_allowed || !_proceed) exitWith {
|
|||||||
|
|
||||||
// Publish variables
|
// Publish variables
|
||||||
_object setVariable ["CharacterID",_charID,true];
|
_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
|
//get UID
|
||||||
_uid = _worldspace call dayz_objectUID2;
|
_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
|
//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));
|
//diag_log ("HIVE: WRITE: "+ str(_key));
|
||||||
_key call server_hiveWrite;
|
_key call server_hiveWrite;
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ _needUpdate = _object in needUpdate_objects;
|
|||||||
_object_position = {
|
_object_position = {
|
||||||
private ["_position","_worldspace","_fuel","_key"];
|
private ["_position","_worldspace","_fuel","_key"];
|
||||||
_position = getPosATL _object;
|
_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};
|
_fuel = if (_object isKindOf "AllVehicles") then {fuel _object} else {0};
|
||||||
|
|
||||||
_key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel];
|
_key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel];
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ BIS_MPF_remoteExecutionServer = {
|
|||||||
|
|
||||||
call compile preprocessFileLineNumbers "\z\addons\dayz_code\util\compile.sqf";
|
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_code\loot\compile.sqf";
|
||||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\KK_Functions.sqf";
|
|
||||||
|
|
||||||
BIS_Effects_Burn = {};
|
BIS_Effects_Burn = {};
|
||||||
dayz_disconnectPlayers = [];
|
dayz_disconnectPlayers = [];
|
||||||
@@ -175,10 +174,6 @@ dayz_objectUID2 = {
|
|||||||
_dir = _this select 0;
|
_dir = _this select 0;
|
||||||
_key = "";
|
_key = "";
|
||||||
_position = _this select 1;
|
_position = _this select 1;
|
||||||
if ((typeName _dir) == "STRING") then {
|
|
||||||
_dir = call (compile _dir);
|
|
||||||
_position = call (compile _position);
|
|
||||||
};
|
|
||||||
{
|
{
|
||||||
_x = _x * 10;
|
_x = _x * 10;
|
||||||
if (_x < 0) then { _x = _x * -10 };
|
if (_x < 0) then { _x = _x * -10 };
|
||||||
@@ -229,4 +224,6 @@ server_hiveReadWriteLarge = {
|
|||||||
_resultArray
|
_resultArray
|
||||||
};
|
};
|
||||||
|
|
||||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fa_hiveMaintenance.sqf";
|
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";
|
||||||
@@ -77,12 +77,6 @@ if (_status == "ObjectStreamStart") then {
|
|||||||
_pos = getMarkerpos "respawn_west";
|
_pos = getMarkerpos "respawn_west";
|
||||||
_wsDone = false;
|
_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 {
|
if (count _worldspace >= 1 && {(typeName (_worldspace select 0)) == "SCALAR"}) then {
|
||||||
_dir = _worldspace select 0;
|
_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));
|
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 {
|
if (count _worldspace < 3) then {
|
||||||
_worldspace set [count _worldspace, "0"];
|
_worldspace set [count _worldspace, "0"];
|
||||||
};
|
};
|
||||||
_ownerPUID = _worldspace select 2;
|
_ownerPUID = _worldspace select 2;
|
||||||
|
|
||||||
|
|
||||||
if (_damage < 1) then {
|
if (_damage < 1) then {
|
||||||
//diag_log format["OBJ: %1 - %2,%3,%4,%5,%6,%7,%8", _idKey,_type,_ownerID,_worldspace,_inventory,_hitPoints,_fuel,_damage];
|
//diag_log format["OBJ: %1 - %2,%3,%4,%5,%6,%7,%8", _idKey,_type,_ownerID,_worldspace,_inventory,_hitPoints,_fuel,_damage];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user