From bad0a2e461128569876659f9afd43539c92be81b Mon Sep 17 00:00:00 2001 From: icomrade Date: Tue, 1 Mar 2016 00:23:14 -0500 Subject: [PATCH] add 2 new vars and fix up variable names DZE_HeartBeat DZE_UseBloodTypes --- SQF/dayz_code/NOTE.txt | 44 +++++-------------- SQF/dayz_code/actions/gather_meat.sqf | 4 +- SQF/dayz_code/actions/object_build.sqf | 6 +-- SQF/dayz_code/actions/object_disassembly.sqf | 14 +++--- SQF/dayz_code/actions/object_dismantle.sqf | 7 +-- .../actions/object_upgradeFireplace.sqf | 6 +-- .../actions/object_upgradeStorage.sqf | 13 +++--- .../actions/object_upgradebuilding.sqf | 11 ++--- SQF/dayz_code/actions/player_consume.sqf | 4 +- SQF/dayz_code/actions/player_createstash.sqf | 6 +-- SQF/dayz_code/actions/player_destroyTent.sqf | 9 ++-- SQF/dayz_code/actions/player_setTrap.sqf | 6 +-- SQF/dayz_code/actions/player_sleep.sqf | 4 +- SQF/dayz_code/actions/remove.sqf | 3 +- .../compile/player_humanityMorph.sqf | 4 +- SQF/dayz_code/compile/player_packTent.sqf | 7 +-- SQF/dayz_code/init/compiles.sqf | 2 +- SQF/dayz_code/init/publicEH.sqf | 8 ++-- SQF/dayz_code/init/variables.sqf | 8 +++- SQF/dayz_code/medical/load_wounded.sqf | 4 +- SQF/dayz_code/system/player_monitor.fsm | 20 ++++----- SQF/dayz_code/system/player_spawn_2.sqf | 8 ++-- SQF/dayz_code/system/scheduler/sched_gui.sqf | 2 +- .../system/scheduler/sched_medical.sqf | 4 +- .../compile/server_playerSetup.sqf | 2 +- .../eventHandlers/server_sendToClient.sqf | 19 ++++---- .../system/scheduler/sched_sync.sqf | 4 +- SQF/dayz_server/system/server_monitor.sqf | 4 +- 28 files changed, 112 insertions(+), 121 deletions(-) diff --git a/SQF/dayz_code/NOTE.txt b/SQF/dayz_code/NOTE.txt index ab5c52494..9fad4d6e8 100644 --- a/SQF/dayz_code/NOTE.txt +++ b/SQF/dayz_code/NOTE.txt @@ -1,48 +1,28 @@ +NEW VAR DZE_HeartBeat +USE TO ENABLE HEARTBEAT SOUND WHEN LOOKING AT BANDIT PLAYER (less than -5000 humanity), DISABLED BY DEFAULT + +NEW VAR DZE_UseBloodTypes +DZE_UseBloodTypes, OFF by default - Enables blood type system, and disables universal bloodbags. you can readily turn this system off and on + + + +fn_selfActions.sqf +player_updateGui.sqf + DZE_BloodBags NEEDED ARRAY OF ALL BLOOD BAGS Create switchable blood system with variable. Convert (if old system) to ItemBloodbag DZE_UseBloodTypes -replace all of -8Rnd_12Gauge_Buck -8Rnd_12Gauge_Slug -2Rnd_12Gauge_Buck -2Rnd_12Gauge_Slug -with original epoch ammo - -CHANGED WEAPON CLASSES - - {Loot_WEAPON, 3, Makarov_DZ}, - {Loot_WEAPON, 1, MakarovSD}, - {Loot_WEAPON, 2, M1911_DZ}, - {Loot_WEAPON, 2, M9_DZ}, - {Loot_WEAPON, 1, M9SD}, - {Loot_WEAPON, 2, G17_DZ}, - {Loot_WEAPON, 2, Revolver_DZ}, - {Loot_WEAPON, 0.5, revolver_gold_EP1}, - - -fn_selfActions.sqf -player_updateGui.sqf - bloodBagANEG bloodBagAPOS bloodBagBNEG bloodBagBPOS bloodBagONEG bloodBagOPOS wholeBloodBagANEG wholeBloodBagAPOS wholeBloodBagBNEG wholeBloodBagBPOS wholeBloodBagONEG wholeBloodBagOPOS - -WEAPONHOLDER_TOOL IS NO LONGER USED! FIX BY REPLACING OCCURENCES -I.E. ItemCrowbar replaces WeaponHolder_MeleeCrowbar -WeaponHolder_ItemHatchet_DZE -WeaponHolder_MeleeCrowbar - REMOVE TOOL BREAKING, IT'S STUPID building_spawnLoot_Legacy building_spawnZombies_Legacy player_craftItem_DZV = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem.sqf"; -COMPILES NOT DONE - LEFT OFF AT LOS_CHECK - -dayz_lowHumanity //HEARBEAT SOUND vehicle_handleDamage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_handleDamage.sqf"; vehicle_handleKilled = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_handleKilled.sqf"; @@ -54,7 +34,6 @@ fnc_veh_handleKilled = compile preprocessFileLineNumbers "\z\addons\dayz_code\co dayz_serverObjectMonitor = []; IS REPLACED WITH PVDZE_serverObjectMonitor = []; PVDZ_obj_Publish IS PVDZE_obj_Publish -PVCDZ_obj_HideBody IS PVDZE_obj_HideBody ******REPLACE ALL PVCDZ_ AND PVDZ_ with PVCDZE/PVDZE_ trap_monitor.fsm is no more! @@ -88,7 +67,6 @@ s_player_boil = -1; is now a_player_boil = true; a_player_cooking = true; -- NEW, old -1 var is still used??? PVCDZ_obj_GutBody IS NOW PVDZE_plr_GutBody MAKE SURE "ItemFuelBarrel" is in refuel can list -PVDZE_obj_Delete is PVDZ_obj_Destroy with 3 array elements ////////SERVER STUFF/////// REMOVE PVDZE_SEND PROJECTILE FOR FLARE AND CHEMLIGHT 0 1 diff --git a/SQF/dayz_code/actions/gather_meat.sqf b/SQF/dayz_code/actions/gather_meat.sqf index c51f40042..ec30eb0ec 100644 --- a/SQF/dayz_code/actions/gather_meat.sqf +++ b/SQF/dayz_code/actions/gather_meat.sqf @@ -58,8 +58,8 @@ if ((count _knifeArray > 0) and !_hasHarvested) then { if (local _item) then { [_item,_qty] spawn local_gutObject; //leave as spawn (sleeping in loops will work but can freeze the script) } else { - PVDZE_plr_GutBody =[_item,_qty]; - publicVariable "PVDZE_plr_GutBody"; + PVCDZE_obj_GutBody =[_item,_qty]; + publicVariable "PVCDZE_obj_GutBody"; //achievement system if (!achievement_Gut) then { diff --git a/SQF/dayz_code/actions/object_build.sqf b/SQF/dayz_code/actions/object_build.sqf index 92b867161..6b7da41f8 100644 --- a/SQF/dayz_code/actions/object_build.sqf +++ b/SQF/dayz_code/actions/object_build.sqf @@ -74,9 +74,9 @@ if (_build) then { */ _object setVariable ["characterID",dayz_characterID,true]; - PVDZ_obj_Publish = [dayz_characterID,_object,[round _direction, _location], _variables]; - publicVariableServer "PVDZ_obj_Publish"; - diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish]; + PVDZE_obj_Publish = [dayz_characterID,_object,[round _direction, _location], _variables]; + publicVariableServer "PVDZE_obj_Publish"; + diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZE_obj_Publish:", PVDZE_obj_Publish]; cutText [format [localize "str_build_01",_text], "PLAIN DOWN"]; r_action_count = 0; diff --git a/SQF/dayz_code/actions/object_disassembly.sqf b/SQF/dayz_code/actions/object_disassembly.sqf index aa73d9ba1..dd8e82d57 100644 --- a/SQF/dayz_code/actions/object_disassembly.sqf +++ b/SQF/dayz_code/actions/object_disassembly.sqf @@ -85,9 +85,11 @@ for "_i" from 1 to 20 do { _cursorTarget = objNull; if (_realObjectStillThere) then { // send to server the destroy request _realObjectStillThere = false; - PVDZ_obj_Destroy = [_objectID,_objectUID]; - publicVariableServer "PVDZ_obj_Destroy"; - diag_log [diag_ticktime, __FILE__, "Networked object, request to destroy", PVDZ_obj_Destroy]; + + _activatingPlayer = player; + PVDZE_obj_Delete = [_objectID,_objectUID, _activatingPlayer]; + publicVariableServer "PVDZE_obj_Delete"; + diag_log [diag_ticktime, __FILE__, "Networked object, request to destroy", PVDZE_obj_Delete]; }; ["Working",0,[20,40,15,0]] call dayz_NutritionSystem; @@ -153,9 +155,9 @@ if (!_realObjectStillThere) then { _object setVariable ["ownerArray",_ownerArray,true]; _variables = [[ "ownerArray", _ownerArray]]; _object setVariable ["characterID",_characterID,true]; - PVDZ_obj_Publish = [dayz_characterID,_object,[_dir, _pos],_variables]; - publicVariableServer "PVDZ_obj_Publish"; - diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish]; + PVDZE_obj_Publish = [dayz_characterID,_object,[_dir, _pos],_variables]; + publicVariableServer "PVDZE_obj_Publish"; + diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZE_obj_Publish:", PVDZE_obj_Publish]; /* //Send maintenance info PVDZ_veh_Save = [_object,"maintenance"]; diff --git a/SQF/dayz_code/actions/object_dismantle.sqf b/SQF/dayz_code/actions/object_dismantle.sqf index da0285034..561ed4c1a 100644 --- a/SQF/dayz_code/actions/object_dismantle.sqf +++ b/SQF/dayz_code/actions/object_dismantle.sqf @@ -155,11 +155,12 @@ if (_proceed) then { titleText [format["Dismantled, (%1).", (typeOf _object)], "PLAIN DOWN"]; - PVDZ_obj_Destroy = [_objectID,_objectUID]; - publicVariableServer "PVDZ_obj_Destroy"; + _activatingPlayer = player; + PVDZE_obj_Delete = [_objectID,_objectUID, _activatingPlayer]; + publicVariableServer "PVDZE_obj_Delete"; if (isServer) then { - PVDZ_obj_Destroy call server_deleteObj; + PVDZE_obj_Delete call server_deleteObj; }; //Need to update for sanity no client should ever create or delete anything diff --git a/SQF/dayz_code/actions/object_upgradeFireplace.sqf b/SQF/dayz_code/actions/object_upgradeFireplace.sqf index 56034524b..9bc6ba726 100644 --- a/SQF/dayz_code/actions/object_upgradeFireplace.sqf +++ b/SQF/dayz_code/actions/object_upgradeFireplace.sqf @@ -209,9 +209,9 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then { //publish new tent //[[[],[]],[[],[]],[[],[]]] - PVDZ_obj_Publish = [dayz_characterID,_object,[_dir, _pos],[[[],[]],_magazines,[[],[]]]]; - publicVariableServer "PVDZ_obj_Publish"; - diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish]; + PVDZE_obj_Publish = [dayz_characterID,_object,[_dir, _pos],[[[],[]],_magazines,[[],[]]]]; + publicVariableServer "PVDZE_obj_Publish"; + diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZE_obj_Publish:", PVDZE_obj_Publish]; //cutText [localize "str_upgradeDone", "PLAIN DOWN"]; _msg = localize "str_upgradeDone"; diff --git a/SQF/dayz_code/actions/object_upgradeStorage.sqf b/SQF/dayz_code/actions/object_upgradeStorage.sqf index 30497fd1a..b13af9ef0 100644 --- a/SQF/dayz_code/actions/object_upgradeStorage.sqf +++ b/SQF/dayz_code/actions/object_upgradeStorage.sqf @@ -168,11 +168,12 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then { player playActionNow "Medic"; //remove old tent - PVDZ_obj_Destroy = [_objectID,_objectUID]; - publicVariableServer "PVDZ_obj_Destroy"; + _activatingPlayer = player; + PVDZE_obj_Delete = [_objectID,_objectUID, _activatingPlayer]; + publicVariableServer "PVDZE_obj_Delete"; if (isServer) then { - PVDZ_obj_Destroy call server_deleteObj; + PVDZE_obj_Delete call server_deleteObj; }; deleteVehicle _cursorTarget; @@ -227,9 +228,9 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then { sleep 3; //publish new tent - PVDZ_obj_Publish = [dayz_characterID,_object,[_dir, _pos],[_weapons,_magazines,_backpacks]]; - publicVariableServer "PVDZ_obj_Publish"; - diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish]; + PVDZE_obj_Publish = [dayz_characterID,_object,[_dir, _pos],[_weapons,_magazines,_backpacks]]; + publicVariableServer "PVDZE_obj_Publish"; + diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZE_obj_Publish:", PVDZE_obj_Publish]; //cutText [localize "str_upgradeDone", "PLAIN DOWN"]; _msg = localize "str_upgradeDone"; diff --git a/SQF/dayz_code/actions/object_upgradebuilding.sqf b/SQF/dayz_code/actions/object_upgradebuilding.sqf index e5b45d5ca..9be403a28 100644 --- a/SQF/dayz_code/actions/object_upgradebuilding.sqf +++ b/SQF/dayz_code/actions/object_upgradebuilding.sqf @@ -144,8 +144,9 @@ _object setVariable ["characterID",_characterID,true]; //remove old object deleteVehicle _cursorTarget; -PVDZ_obj_Destroy = [_objectID,_objectUID]; -publicVariableServer "PVDZ_obj_Destroy"; +_activatingPlayer = player; +PVDZE_obj_Delete = [_objectID,_objectUID, _activatingPlayer]; +publicVariableServer "PVDZE_obj_Delete"; // create a weaponholder with dismissed parts _wh = "WeaponHolder" createVehicle (getPosATL player); @@ -157,9 +158,9 @@ _wh = "WeaponHolder" createVehicle (getPosATL player); //publish new object _variables = [["ownerArray", _ownerArray],["padlockCombination", _ownerPasscode]]; -PVDZ_obj_Publish = [dayz_characterID,_object,[_dir, _pos],_variables]; -publicVariableServer "PVDZ_obj_Publish"; -diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish]; +PVDZE_obj_Publish = [dayz_characterID,_object,[_dir, _pos],_variables]; +publicVariableServer "PVDZE_obj_Publish"; +diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZE_obj_Publish:", PVDZE_obj_Publish]; /* //Send maintenance info PVDZ_veh_Save = [_object,"maintenance"]; diff --git a/SQF/dayz_code/actions/player_consume.sqf b/SQF/dayz_code/actions/player_consume.sqf index 198c636a3..4842c0a63 100644 --- a/SQF/dayz_code/actions/player_consume.sqf +++ b/SQF/dayz_code/actions/player_consume.sqf @@ -102,8 +102,8 @@ if (_infectionChance != 0 && {abs(_infectionChance) > random 1}) then //Publish messing player setVariable ["messing",[dayz_hunger,dayz_thirst,dayz_nutrition],false]; //No need to be sent to everyplayer -PVDZ_serverStoreVar = [player,"messing",[dayz_hunger,dayz_thirst,dayz_nutrition]]; //update server side only -publicVariableServer "PVDZ_serverStoreVar"; +PVDZE_serverStoreVar = [player,"messing",[dayz_hunger,dayz_thirst,dayz_nutrition]]; //update server side only +publicVariableServer "PVDZE_serverStoreVar"; //Play sound and alert zombies if (_sound != "") then diff --git a/SQF/dayz_code/actions/player_createstash.sqf b/SQF/dayz_code/actions/player_createstash.sqf index 917bfa79a..181e889e1 100644 --- a/SQF/dayz_code/actions/player_createstash.sqf +++ b/SQF/dayz_code/actions/player_createstash.sqf @@ -62,9 +62,9 @@ if ((count _worldspace) == 2) then { _stash setVariable ["characterID",dayz_characterID,true]; - PVDZ_obj_Publish = [dayz_characterID,_stash,[_dir,_location],[]]; - publicVariableServer "PVDZ_obj_Publish"; - diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish]; + PVDZE_obj_Publish = [dayz_characterID,_stash,[_dir,_location],[]]; + publicVariableServer "PVDZE_obj_Publish"; + diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZE_obj_Publish:", PVDZE_obj_Publish]; r_action_count = 0; cutText [format [localize "str_success_stash_pitch",_stashname], "PLAIN DOWN"]; diff --git a/SQF/dayz_code/actions/player_destroyTent.sqf b/SQF/dayz_code/actions/player_destroyTent.sqf index ceae9d4ce..f1494b40d 100644 --- a/SQF/dayz_code/actions/player_destroyTent.sqf +++ b/SQF/dayz_code/actions/player_destroyTent.sqf @@ -82,14 +82,15 @@ _sfx = "tentpack"; // Added Nutrition-Factor for work ["Working",0,[20,40,15,0]] call dayz_NutritionSystem; -sleep 3; +uisleep 3; -PVDZ_obj_Destroy = [_objectID,_objectUID]; -publicVariableServer "PVDZ_obj_Destroy"; +_activatingPlayer = player; +PVDZE_obj_Delete = [_objectID,_objectUID, _activatingPlayer]; +publicVariableServer "PVDZE_obj_Delete"; //Send killed for object if (isServer) then { - PVDZ_obj_Destroy call server_deleteObj; + PVDZE_obj_Delete call server_deleteObj; } else { PVDZ_veh_Save = [_obj, "killed"]; publicVariableServer "PVDZ_veh_Save"; diff --git a/SQF/dayz_code/actions/player_setTrap.sqf b/SQF/dayz_code/actions/player_setTrap.sqf index fa1133d58..3d74a7b8a 100644 --- a/SQF/dayz_code/actions/player_setTrap.sqf +++ b/SQF/dayz_code/actions/player_setTrap.sqf @@ -29,9 +29,9 @@ _object setDir (getDir player); _object setVariable ["armed", false, true]; -PVDZ_obj_Publish = [dayz_characterID,_object,[getDir _object, getPosATL _object],[["armed", _object getVariable "armed"]]]; -publicVariableServer "PVDZ_obj_Publish"; -diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish]; +PVDZE_obj_Publish = [dayz_characterID,_object,[getDir _object, getPosATL _object],[["armed", _object getVariable "armed"]]]; +publicVariableServer "PVDZE_obj_Publish"; +diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZE_obj_Publish:", PVDZE_obj_Publish]; player reveal _object; diff --git a/SQF/dayz_code/actions/player_sleep.sqf b/SQF/dayz_code/actions/player_sleep.sqf index fbd84e731..1e4d2819b 100644 --- a/SQF/dayz_code/actions/player_sleep.sqf +++ b/SQF/dayz_code/actions/player_sleep.sqf @@ -47,8 +47,8 @@ while {r_doLoop} do { r_player_infected = false; player setVariable["USEC_infected",false,false]; - PVDZ_serverStoreVar = [player,"USEC_infected",false]; - publicVariableServer "PVDZ_serverStoreVar"; + PVDZE_serverStoreVar = [player,"USEC_infected",false]; + publicVariableServer "PVDZE_serverStoreVar"; } else { _infectedStatus = if (r_player_infected) then { "Infected" } else { "Cured" }; _cureAttempt = _cureAttempt + 0.01; diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index 41b9fede7..5b7994954 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -175,7 +175,8 @@ if (_proceed) then { deleteVehicle _obj; if(!_isWreck) then { - PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer]; + _activatingPlayer = player; + PVDZE_obj_Delete = [_objectID,_objectUID, _activatingPlayer]; publicVariableServer "PVDZE_obj_Delete"; }; diff --git a/SQF/dayz_code/compile/player_humanityMorph.sqf b/SQF/dayz_code/compile/player_humanityMorph.sqf index fd14fe782..992b4f9de 100644 --- a/SQF/dayz_code/compile/player_humanityMorph.sqf +++ b/SQF/dayz_code/compile/player_humanityMorph.sqf @@ -86,8 +86,8 @@ player setVariable["CharacterID",_charID,true]; player setVariable["worldspace",_worldspace,true]; player setVariable["friendlies",_friendlies,true]; player setVariable["tagList",_tagList,true]; -PVDZ_serverStoreVar = [player,"Achievements",_achievements]; -publicVariableServer "PVDZ_serverStoreVar"; +PVDZE_serverStoreVar = [player,"Achievements",_achievements]; +publicVariableServer "PVDZE_serverStoreVar"; call dayz_resetSelfActions; diff --git a/SQF/dayz_code/compile/player_packTent.sqf b/SQF/dayz_code/compile/player_packTent.sqf index 7d7f02471..58786a689 100644 --- a/SQF/dayz_code/compile/player_packTent.sqf +++ b/SQF/dayz_code/compile/player_packTent.sqf @@ -56,11 +56,12 @@ if(_pickup) then { _backpacks = getBackpackCargo _obj; //["PVDZ_obj_Delete",[_objectID,_objectUID]] call callRpcProcedure; - PVDZ_obj_Destroy = [_objectID,_objectUID]; - publicVariableServer "PVDZ_obj_Destroy"; + _activatingPlayer = player; + PVDZE_obj_Delete = [_objectID,_objectUID, _activatingPlayer]; + publicVariableServer "PVDZE_obj_Delete"; if (isServer) then { - PVDZ_obj_Destroy call server_deleteObj; + PVDZE_obj_Delete call server_deleteObj; }; deleteVehicle _obj; diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 4238afdfd..bcf6e9763 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -589,7 +589,7 @@ if (!isDedicated) then { private "_humanity"; _humanity = _unit getVariable["humanity",0]; dayz_heartBeat = true; - if (_humanity < -3000) then { + if (_humanity < -5000) then { private "_delay"; _delay = ((10000 + _humanity) / 5500) + 0.3; playSound "heartbeat_1"; diff --git a/SQF/dayz_code/init/publicEH.sqf b/SQF/dayz_code/init/publicEH.sqf index b17a50a64..c050b3725 100644 --- a/SQF/dayz_code/init/publicEH.sqf +++ b/SQF/dayz_code/init/publicEH.sqf @@ -14,12 +14,12 @@ //"usecBreakLegs" addPublicVariableEventHandler {(_this select 1) call player_breaklegs}; //Both -"PVCDZ_veh_SetFuel" addPublicVariableEventHandler {(_this select 1) spawn local_setFuel}; +"PVCDZE_veh_SetFuel" addPublicVariableEventHandler {(_this select 1) spawn local_setFuel}; "PVDZE_veh_SFix" addPublicVariableEventHandler {(_this select 1) call object_setFixServer}; -"PVDZE_plr_HideBody" addPublicVariableEventHandler {hideBody (_this select 1)}; +"PVCDZE_plr_HideBody" addPublicVariableEventHandler {hideBody (_this select 1)}; "PVDZE_obj_Hide" addPublicVariableEventHandler {hideObject (_this select 1)}; "PVDZE_veh_Lock" addPublicVariableEventHandler {(_this select 1) spawn local_lockUnlock}; -"PVCDZE_plr_GutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject}; +"PVCDZE_obj_GutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject}; "PVDZE_plr_GutBodyZ" addPublicVariableEventHandler {(_this select 1) spawn local_gutObjectZ}; "PVDZE_plr_DelLocal" addPublicVariableEventHandler {(_this select 1) call object_delLocal}; "PVDZE_veh_Init" addPublicVariableEventHandler {(_this select 1) call fnc_veh_ResetEH}; @@ -210,7 +210,7 @@ if (isServer) then { }; }; - "PVDZ_serverStoreVar" addPublicVariableEventHandler { + "PVDZE_serverStoreVar" addPublicVariableEventHandler { _obj = ((_this select 1) select 0); _name = ((_this select 1) select 1); _value = ((_this select 1) select 2); diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index ca82ed41e..53265313a 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -586,7 +586,7 @@ dayz_zombieTargetList = [ ]; PVDZE_plr_Hit = []; PVDZE_obj_Publish = []; //used for eventhandler to spawn a mirror of players tent -PVDZE_plr_HideBody = objNull; +PVCDZE_plr_HideBody = objNull; dayz_selectedVault = objNull; dayz_selectedDoor = objNull; @@ -757,6 +757,12 @@ if(isNil "DZE_PlotPole") then { if(isNil "DZE_maintainRange") then { DZE_maintainRange = ((DZE_PlotPole select 0)+20); }; +if(isNil "DZE_HeartBeat") then { + DZE_HeartBeat = false; +}; +if(isNil "DZE_UseBloodTypes") then { + DZE_UseBloodTypes = false; +}; if(isNil "dayz_presets") then { dayz_presets = "Vanilla"; }; diff --git a/SQF/dayz_code/medical/load_wounded.sqf b/SQF/dayz_code/medical/load_wounded.sqf index 620c29412..4a8093323 100644 --- a/SQF/dayz_code/medical/load_wounded.sqf +++ b/SQF/dayz_code/medical/load_wounded.sqf @@ -17,8 +17,8 @@ _wounded assignAsCargo _vcl; _wounded moveInCargo _vcl; sleep 1; //["PVDZ_drg_RaLW",_wounded] call broadcastRpcCallAll; - PVDZ_drg_RaLW = _wounded; - publicVariable "PVDZ_drg_RaLW"; + norrnRaLW = _wounded; + publicVariable "norrnRaLW"; if (local _wounded) then { diff --git a/SQF/dayz_code/system/player_monitor.fsm b/SQF/dayz_code/system/player_monitor.fsm index 03ec50939..4a0c09f73 100644 --- a/SQF/dayz_code/system/player_monitor.fsm +++ b/SQF/dayz_code/system/player_monitor.fsm @@ -430,10 +430,10 @@ class FSM "" \n "_msg = [];" \n "progressLoadingScreen 0.65;" \n - "PVDZ_plr_Login1 = [_playerUID,player];" \n - "publicVariableServer ""PVDZ_plr_Login1"";" \n - "diag_log ['Sent to server: PVDZ_plr_Login1', PVDZ_plr_Login1]; " \n - "PVDZ_send = [player,""dayzSetDate"",[player]];" \n + "PVDZE_plr_Login = [_playerUID,player];" \n + "publicVariableServer ""PVDZE_plr_Login"";" \n + "diag_log ['Sent to server: PVDZE_plr_Login', PVDZE_plr_Login]; " \n + "PVDZ_send = [player,""PVDZE_plr_SetDate"",[player]];" \n "publicVariableServer ""PVDZ_send"";" \n "diag_log ['Sent to server: PVDZ_send', PVDZ_send]; " \n "_myTime = diag_tickTime;" \n @@ -740,9 +740,9 @@ class FSM "" \n "dayz_playerAchievements = _playerAchievements;" \n " " \n - "PVDZ_serverStoreVar = [player,""Achievements"",_playerAchievements];" \n - "publicVariableServer ""PVDZ_serverStoreVar"";" \n - "diag_log ['Sent to server: PVDZ_serverStoreVar', PVDZ_serverStoreVar]; " \n + "PVDZE_serverStoreVar = [player,""Achievements"",_playerAchievements];" \n + "publicVariableServer ""PVDZE_serverStoreVar"";" \n + "diag_log ['Sent to server: PVDZE_serverStoreVar', PVDZE_serverStoreVar]; " \n "player setVariable [""Achievements"",_playerAchievements,false];" \n "" \n "" \n @@ -1503,9 +1503,9 @@ class FSM priority = 0.000000; to="Stream"; precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"!isNil ""dayzSetDate"""/*%FSM*/; - action=/*%FSM*/"diag_log ['Date & time received:', dayzSetDate];" \n - "setDate dayzSetDate;" \n + condition=/*%FSM*/"!isNil ""PVDZE_plr_SetDate"""/*%FSM*/; + action=/*%FSM*/"diag_log ['Date & time received:', PVDZE_plr_SetDate];" \n + "setDate PVDZE_plr_SetDate;" \n "diag_log ['Local date on this client:', date];"/*%FSM*/; }; /*%FSM*/ diff --git a/SQF/dayz_code/system/player_spawn_2.sqf b/SQF/dayz_code/system/player_spawn_2.sqf index 30110b51d..7a3ae9781 100644 --- a/SQF/dayz_code/system/player_spawn_2.sqf +++ b/SQF/dayz_code/system/player_spawn_2.sqf @@ -329,8 +329,8 @@ dayz_myLoad = (((count dayz_myBackpackMags) * 0.2) + (count dayz_myBackpackWpns) _messTimer = 0; player setVariable ["messing",[dayz_hunger,dayz_thirst,dayz_nutrition],false]; - PVDZ_serverStoreVar = [player,"messing",[dayz_hunger,dayz_thirst,dayz_nutrition]]; - publicVariableServer "PVDZ_serverStoreVar"; + PVDZE_serverStoreVar = [player,"messing",[dayz_hunger,dayz_thirst,dayz_nutrition]]; + publicVariableServer "PVDZE_serverStoreVar"; }; //Save Checker @@ -340,8 +340,8 @@ dayz_myLoad = (((count dayz_myBackpackMags) * 0.2) + (count dayz_myBackpackWpns) PVDZ_plr_Save = [player,nil,false,dayz_playerAchievements]; publicVariableServer "PVDZ_plr_Save"; - PVDZ_serverStoreVar = [player,"Achievements",dayz_playerAchievements]; - publicVariableServer "PVDZ_serverStoreVar"; + PVDZE_serverStoreVar = [player,"Achievements",dayz_playerAchievements]; + publicVariableServer "PVDZE_serverStoreVar"; player setVariable ["Achievements",dayz_playerAchievements,false]; if (isServer) then { diff --git a/SQF/dayz_code/system/scheduler/sched_gui.sqf b/SQF/dayz_code/system/scheduler/sched_gui.sqf index 3198de0c3..455b59462 100644 --- a/SQF/dayz_code/system/scheduler/sched_gui.sqf +++ b/SQF/dayz_code/system/scheduler/sched_gui.sqf @@ -24,7 +24,7 @@ sched_gui = { }; // move this elsewhere, it deals with the menu - if (!isNull cursorTarget and !dayz_heartBeat) then { + if (!isNull cursorTarget and {!dayz_heartBeat} and {DZE_HeartBeat}) then { if (alive cursorTarget) then { cursorTarget spawn dayz_lowHumanity; }; diff --git a/SQF/dayz_code/system/scheduler/sched_medical.sqf b/SQF/dayz_code/system/scheduler/sched_medical.sqf index aa6321120..c4d31178c 100644 --- a/SQF/dayz_code/system/scheduler/sched_medical.sqf +++ b/SQF/dayz_code/system/scheduler/sched_medical.sqf @@ -8,8 +8,8 @@ sched_medical_slow = { // 10 seconds player setVariable["USEC_BloodQty", r_player_blood, false]; player setVariable["medForceUpdate", true, false]; //Send only to server - PVDZ_serverStoreVar = [player, "USEC_BloodQty", r_player_blood]; - publicVariableServer "PVDZ_serverStoreVar"; + PVDZE_serverStoreVar = [player, "USEC_BloodQty", r_player_blood]; + publicVariableServer "PVDZE_serverStoreVar"; }; objNull diff --git a/SQF/dayz_server/compile/server_playerSetup.sqf b/SQF/dayz_server/compile/server_playerSetup.sqf index dd629d571..8ce1ac547 100644 --- a/SQF/dayz_server/compile/server_playerSetup.sqf +++ b/SQF/dayz_server/compile/server_playerSetup.sqf @@ -289,5 +289,5 @@ _playerObj setVariable ["lastTime",time]; //diag_log ("LOGIN PUBLISHING: " + str(_playerObj) + " Type: " + (typeOf _playerObj)); -PVDZ_plr_Login1 = null; +PVDZE_plr_Login = null; PVDZ_plr_Login2 = null; \ No newline at end of file diff --git a/SQF/dayz_server/eventHandlers/server_sendToClient.sqf b/SQF/dayz_server/eventHandlers/server_sendToClient.sqf index e98c4a097..d19807be5 100644 --- a/SQF/dayz_server/eventHandlers/server_sendToClient.sqf +++ b/SQF/dayz_server/eventHandlers/server_sendToClient.sqf @@ -17,8 +17,8 @@ switch (_variable) do { if (local _vehicle) then { _arraytosend call fnc_veh_handleDam; } else { - PVCDZE_vehSH = _arraytosend; - _owner publicVariableClient "PVCDZE_vehSH"; + PVCDZE_veh_SH = _arraytosend; + _owner publicVariableClient "PVCDZE_veh_SH"; }; }; @@ -28,8 +28,8 @@ switch (_variable) do { if (local _vehicle) then { _vehicle setFuel _qty; } else { - PVDZE_veh_SFuel = _arraytosend; - _owner publicVariableClient "PVDZE_veh_SFuel"; + PVCDZE_veh_SetFuel = _arraytosend; + _owner publicVariableClient "PVCDZE_veh_SetFuel"; }; }; @@ -46,15 +46,14 @@ switch (_variable) do { }; }; - case "GutBody": { PVCDZ_obj_GutBody = _arraytosend; _owner publicVariableClient "PVCDZ_obj_GutBody"; }; case "HideBody": { - PVDZE_plr_HideBody = _arraytosend select 0; - _owner publicVariableClient "PVDZE_plr_HideBody"; + PVCDZE_plr_HideBody = _arraytosend select 0; + _owner publicVariableClient "PVCDZE_plr_HideBody"; }; case "Humanity": { @@ -72,9 +71,9 @@ switch (_variable) do { _owner publicVariableClient "usecBleed"; }; - case "dayzSetDate": { - dayzSetDate = dayz_storeTimeDate; - _owner publicVariableClient "dayzSetDate"; + case "PVDZE_plr_SetDate": { + PVDZE_plr_SetDate = dayz_storeTimeDate; + _owner publicVariableClient "PVDZE_plr_SetDate"; //diag_log ("Time and date: " +str (dayz_storeTimeDate)); }; diff --git a/SQF/dayz_server/system/scheduler/sched_sync.sqf b/SQF/dayz_server/system/scheduler/sched_sync.sqf index d939187e4..4c28ead9a 100644 --- a/SQF/dayz_server/system/scheduler/sched_sync.sqf +++ b/SQF/dayz_server/system/scheduler/sched_sync.sqf @@ -16,8 +16,8 @@ sched_sync = { }; setDate _date; - dayzSetDate = _date; - publicVariable "dayzSetDate"; + PVDZE_plr_SetDate = _date; + publicVariable "PVDZE_plr_SetDate"; diag_log [ __FILE__, "TIME SYNC: Local Time set to:", _date, "Fullmoon:",dayz_ForcefullmoonNights, "Date given by HiveExt.dll:", _result select 1]; }; diff --git a/SQF/dayz_server/system/server_monitor.sqf b/SQF/dayz_server/system/server_monitor.sqf index 09b9af75a..485d1b614 100644 --- a/SQF/dayz_server/system/server_monitor.sqf +++ b/SQF/dayz_server/system/server_monitor.sqf @@ -35,8 +35,8 @@ if(_outcome == "PASS") then { }; diag_log [ "TIME SYNC: Local Time set to:", _date, "Fullmoon:",dayz_ForcefullmoonNights, "Date given by HiveExt.dll:", _result select 1]; setDate _date; - dayzSetDate = _date; - publicVariable "dayzSetDate"; + PVDZE_plr_SetDate = _date; + publicVariable "PVDZE_plr_SetDate"; }; // Custom Configs