From c5ce2f70a416eebb102bf6829fa895843c1f3635 Mon Sep 17 00:00:00 2001 From: Skaronator Date: Sat, 11 Jan 2014 20:19:26 +0100 Subject: [PATCH] Push #941 - Transfuse --- SQF/dayz_code/compile/player_death.sqf | 8 ++++---- SQF/dayz_code/medical/publicEH/medTransfuse.sqf | 1 + SQF/dayz_code/medical/transfusion.sqf | 7 +++++-- SQF/dayz_server/compile/server_sendToClient.sqf | 14 ++++---------- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/SQF/dayz_code/compile/player_death.sqf b/SQF/dayz_code/compile/player_death.sqf index 7cbec9c22..f22118750 100644 --- a/SQF/dayz_code/compile/player_death.sqf +++ b/SQF/dayz_code/compile/player_death.sqf @@ -80,8 +80,8 @@ if (count _array > 0) then { PVDZE_plr_HumanityChange = [_source,_humanity,_wait]; publicVariable "PVDZE_plr_HumanityChange"; /* WIP - PVS/PVC - Skaronator - PVDZ_send = [_source,"Humanity",[_source,_humanity,_wait]]; - publicVariableServer "PVDZ_send"; + PVDZE_send = [_source,"Humanity",[_source,_humanity,_wait]]; + publicVariableServer "PVDZE_send"; */ }; }; @@ -102,8 +102,8 @@ if (count _array > 0) then { PVDZE_plr_HumanityChange = [_source,_humanity,_wait]; publicVariable "PVDZE_plr_HumanityChange"; /* WIP - PVS/PVC - Skaronator - PVDZ_send = [_source,"Humanity",[_source,_humanity,_wait]]; - publicVariableServer "PVDZ_send"; + PVDZE_send = [_source,"Humanity",[_source,_humanity,_wait]]; + publicVariableServer "PVDZE_send"; */ }; if (_canHitFree) then { diff --git a/SQF/dayz_code/medical/publicEH/medTransfuse.sqf b/SQF/dayz_code/medical/publicEH/medTransfuse.sqf index 13ed27295..f6c1d1d1c 100644 --- a/SQF/dayz_code/medical/publicEH/medTransfuse.sqf +++ b/SQF/dayz_code/medical/publicEH/medTransfuse.sqf @@ -27,6 +27,7 @@ if (_unit == player) then { player setVariable["USEC_BloodQty",r_player_bloodTotal,true]; }; +/* WIP - PVS/PVC - Not anymore used: moved to server_sendToClient.sqf - Skaronator */ if (isServer) then { _unit setVariable["medForceUpdate",true]; }; diff --git a/SQF/dayz_code/medical/transfusion.sqf b/SQF/dayz_code/medical/transfusion.sqf index 1be704fe5..fc0ac56aa 100644 --- a/SQF/dayz_code/medical/transfusion.sqf +++ b/SQF/dayz_code/medical/transfusion.sqf @@ -45,11 +45,14 @@ if (_finished) then { _unit setVariable["USEC_lowBlood",false,true]; _num_removed = ([player,"ItemBloodbag"] call BIS_fnc_invRemove); if(_num_removed == 1) then { - //["usecTransfuse",[_unit,player]] call broadcastRpcCallAll; usecTransfuse = [_unit,player]; publicVariable "usecTransfuse"; + + /* WIP - PVS/PVC - Skaronator + PVDZE_send = [_unit,"Transfuse",[_unit,player]]; + publicVariableServer "PVDZE_send"; + */ - //PVDZE_plr_HumanityChange = [player,100]; [player,100] call player_humanityChange; }; } else { diff --git a/SQF/dayz_server/compile/server_sendToClient.sqf b/SQF/dayz_server/compile/server_sendToClient.sqf index 5d5e0d432..dce11eea5 100644 --- a/SQF/dayz_server/compile/server_sendToClient.sqf +++ b/SQF/dayz_server/compile/server_sendToClient.sqf @@ -41,16 +41,10 @@ switch (_variable) do { _owner publicVariableClient "PVDZE_plr_HumanityChange"; }; - case "dayzSetDate": { - dayzSetDate = dayz_storeTimeDate; - _owner publicVariableClient "dayzSetDate"; - - //diag_log ("Time and date: " +str (dayz_storeTimeDate)); - }; - - case "Transfuse": { - PVCDZ_hlt_Transfuse = _arraytosend; - _owner publicVariableClient "PVCDZ_hlt_Transfuse"; + case "Transfuse": { //DONE + usecTransfuse = _arraytosend; + _owner publicVariableClient "usecTransfuse"; + //Don't forget!! Checkout dayz_code\medical\publicEH\medTransfuse.sqf #30 _unit setVariable["medForceUpdate",true]; };