Roll back to old dayz_objectUID2

1.8.7 dayz_objectUID2 seems to generate keys that are too long for the
Epoch hive. So, we will keep the old method for now.
This commit is contained in:
ebaydayz
2016-04-13 18:41:36 -04:00
parent 3d4b15517c
commit 577892c40e
6 changed files with 21 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
[NEW] Fully updated to DayZ 1.8.7 code base @icomrade @ebaydayz [NEW] Fully updated to DayZ 1.8.7 base @icomrade @ebaydayz
[NEW] 1.8.7 attachments system, community weapons and buildable base objects [NEW] 1.8.7 attachments system, community weapons and buildable base objects
[NEW] 1.8.7 journal and crafting menu are now functional (default 'J' key) [NEW] 1.8.7 journal and crafting menu are now functional (default 'J' key)
[NEW] 1.8.7 infected camps, points of interest and infectious waterholes map additions (Chernarus only) [NEW] 1.8.7 infected camps, points of interest and infectious waterholes map additions (Chernarus only)
@@ -30,7 +30,7 @@
[CHANGED] Several weapon, item and tool classnames changed. Admins see SQL\1.0.6_Updates @ebaydayz [CHANGED] Several weapon, item and tool classnames changed. Admins see SQL\1.0.6_Updates @ebaydayz
[CHANGED] New loot table format is incompatible with old loot tables. Admins see CfgLoot\README.txt [CHANGED] New loot table format is incompatible with old loot tables. Admins see CfgLoot\README.txt
[CHANGED] Combattimeout now uses diag_tickTime instead of time. [CHANGED] Combattimeout now uses diag_tickTime instead of time.
[CHANGED] AmmoBoxSmall_556/762 have been replaced with DZ_AmmoBoxUS/RU/EU/CZ [CHANGED] AmmoBoxSmall_556/762 is replaced with DZ_AmmoBoxUS/RU/EU/CZ and MedBox0 is replaced with DZ_MedBox
[CHANGED] An infection chance of -1 disables self-transfusion infection. 0 is always infected. (DZE_selfTransfuse_Values) @icomrade [CHANGED] An infection chance of -1 disables self-transfusion infection. 0 is always infected. (DZE_selfTransfuse_Values) @icomrade
[CHANGED] Removed weapons from Traders hands and made them stand with arms by their side. @SilvDev [CHANGED] Removed weapons from Traders hands and made them stand with arms by their side. @SilvDev
[CHANGED] Tweaked fuel capacity variables for vehicles. @RimBlock [CHANGED] Tweaked fuel capacity variables for vehicles. @RimBlock

View File

@@ -13,6 +13,7 @@
- dayz_allowedObjects --> DayZ_SafeObjects - dayz_allowedObjects --> DayZ_SafeObjects
- dayz_CLBase --> dz_loot_groups (similar not identical) - dayz_CLBase --> dz_loot_groups (similar not identical)
- dayz_CLChances --> dz_loot_weighted (similar not identical) - dayz_CLChances --> dz_loot_weighted (similar not identical)
- dayz_combat --> no longer exists use (player getVariable["combattimeout",0] >= diag_tickTime)
- dayz_fullMoonNights --> dayz_ForcefullmoonNights - dayz_fullMoonNights --> dayz_ForcefullmoonNights
- dayz_updateObjects --> DayZ_GearedObjects - dayz_updateObjects --> DayZ_GearedObjects
- DZE_CanPickup --> canPickup - DZE_CanPickup --> canPickup

View File

@@ -5,7 +5,7 @@ DZE_ActionInProgress = true;
_item = _this select 3; _item = _this select 3;
_type = typeOf _item; _type = typeOf _item;
_hasHarvested = _item getVariable ["meatHarvested",false]; _hasHarvested = _item getVariable ["meatHarvested",false];
_config = configFile >> "CfgSurvival" >> "Meat" >> _type; //_config = configFile >> "CfgSurvival" >> "Meat" >> _type;
_knifeArray = []; _knifeArray = [];
player removeAction s_player_butcher; player removeAction s_player_butcher;
s_player_butcher = -1; s_player_butcher = -1;
@@ -27,7 +27,7 @@ if ((count _knifeArray > 0) && !_hasHarvested) then {
_activeKnife = _knifeArray call BIS_fnc_selectRandom; _activeKnife = _knifeArray call BIS_fnc_selectRandom;
//Get Zombie Type //Get Zombie Type
_isListed = isClass _config; //_isListed = isClass _config;
_text = getText (configFile >> "CfgVehicles" >> _type >> "displayName"); _text = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
player playActionNow "Medic"; player playActionNow "Medic";
@@ -37,11 +37,11 @@ if ((count _knifeArray > 0) && !_hasHarvested) then {
_item setVariable ["meatHarvested",true,true]; _item setVariable ["meatHarvested",true,true];
_qty = if (_isListed) then {getNumber (_config >> "yield")} else {2}; _qty = 2;
if (_activeKnife == "ItemKnifeBlunt") then { _qty = round(_qty / 2); }; if (_activeKnife == "ItemKnifeBlunt") then { _qty = round(_qty / 2); };
if (local _item) then { if (local _item) then {
[_item,_qty] spawn local_gutObject; //leave as spawn (sleeping in loops will work but can freeze the script) [_item,_qty] spawn local_gutObjectZ; //leave as spawn (sleeping in loops will work but can freeze the script)
} else { } else {
PVDZE_plr_GutBodyZ = [_item,_qty]; PVDZE_plr_GutBodyZ = [_item,_qty];
publicVariable "PVDZE_plr_GutBodyZ"; publicVariable "PVDZE_plr_GutBodyZ";

View File

@@ -7,7 +7,7 @@ if (local _animalbody) then {
_animalbody addMagazine _rawfoodtype; _animalbody addMagazine _rawfoodtype;
}; };
if (typeOf _animalbody == "Hen") then { if (typeOf _animalbody in ["Cock","Hen"]) then {
_amount = (floor (random 4)) + 2; _amount = (floor (random 4)) + 2;
for "_x" from 1 to _amount do { for "_x" from 1 to _amount do {
_animalbody addMagazine "equip_feathers"; _animalbody addMagazine "equip_feathers";

View File

@@ -45,12 +45,12 @@ if (_characterID != "?") exitWith {
//Punish combat log //Punish combat log
_timeout = _playerObj getVariable["combattimeout",0]; _timeout = _playerObj getVariable["combattimeout",0];
if ((_timeout - diag_tickTime) > 0) then { if (_timeout >= diag_tickTime) then {
_playerObj setVariable ["NORRN_unconscious",true,true]; // Set status to unconscious _playerObj setVariable ["NORRN_unconscious",true,true]; // Set status to unconscious
_playerObj setVariable ["unconsciousTime",150,true]; // Set knock out timer to 150 seconds _playerObj setVariable ["unconsciousTime",150,true]; // Set knock out timer to 150 seconds
//_playerObj setVariable ["USEC_injured",true]; // Set status to bleeding //_playerObj setVariable ["USEC_injured",true]; // Set status to bleeding
//_playerObj setVariable ["USEC_BloodQty",3000]; // Set blood to 3000 //_playerObj setVariable ["USEC_BloodQty",3000]; // Set blood to 3000
diag_log format["PLAYER COMBAT LOGGED: %1(%4) (timeout: %2) at location %3",_playerName,_timeout,_playerPos,_playerUID]; diag_log format["PLAYER COMBAT LOGGED: %1(%4) (with %2s combat time remaining) at location %3",_playerName,(_timeout - diag_tickTime),_playerPos,_playerUID];
_message = format["PLAYER COMBAT LOGGED: %1",_playerName]; _message = format["PLAYER COMBAT LOGGED: %1",_playerName];
[nil, nil, rTitleText, _message, "PLAIN"] call RE; // Message whole server [nil, nil, rTitleText, _message, "PLAIN"] call RE; // Message whole server
}; };

View File

@@ -167,16 +167,18 @@ server_getDiff2 = {
_result _result
}; };
// 1.8.7 dayz_objectUID2 seems to generate keys that are too long for Epoch hive. Keep old method for now.
dayz_objectUID2 = { dayz_objectUID2 = {
private ["_p","_d","_key"]; private["_position","_dir","_key"];
_d = _this select 0; _dir = _this select 0;
_p = _this select 1; _key = "";
_key = format ["%1%2%3%4", _position = _this select 1;
abs round(10 * (_p select 0)), {
abs round(10 * (_p select 1)), _x = _x * 10;
abs round(100 * (_p select 2)), if (_x < 0) then { _x = _x * -10 };
abs round((_d * diag_tickTime) % 1000) _key = _key + str(round(_x));
]; } count _position;
_key = _key + str(round(_dir));
// Make sure the generated key is not a duplicate // Make sure the generated key is not a duplicate
while {true} do { while {true} do {
if !(_key in currentObjectUIDs) exitWith {currentObjectUIDs set [count currentObjectUIDs,_key];}; if !(_key in currentObjectUIDs) exitWith {currentObjectUIDs set [count currentObjectUIDs,_key];};