Merge pull request #978 from vbawol/PVS/PVC

Complete #941 - Need Testing
This commit is contained in:
vbawol
2014-01-14 17:00:03 -08:00
21 changed files with 44 additions and 171 deletions

View File

@@ -15,14 +15,8 @@ _caller setVariable ["friendlies", _friendlies, true];
_rfriendlies = _target getVariable ["friendlies", []];
if !(_callerID in _rfriendlies) then {
// caller
titleText [(localize "STR_EPOCH_ACTIONS_8"), "PLAIN DOWN"];
// target
PVDZE_plr_FriendRQ = _target;
publicVariable "PVDZE_plr_FriendRQ";
/* WIP - PVS/PVC - Skaronator
PVDZE_send = [_target,"tagFriendly",[_target]];
titleText [(localize "STR_EPOCH_ACTIONS_8"), "PLAIN DOWN"]; //To Caller
/* PVS/PVC - Skaronator */
PVDZE_send = [_target,"tagFriendly",[_target]]; //To Target
publicVariableServer "PVDZE_send";
*/
};

View File

@@ -106,17 +106,13 @@ _availableCans = ["ItemJerrycan","ItemFuelBarrel"];
if(([player,_canName] call BIS_fnc_invRemove) == 1) then {
/* WIP - PVS/PVC - Skaronator
/* PVS/PVC - Skaronator */
if (local _vehicle) then {
[_vehicle,_newFuel] call local_setFuel;
} else {
PVDZE_send = [_vehicle,"SetFuel",[_vehicle,_newFuel]];
publicVariableServer "PVDZE_send";
};
*/
PVDZE_veh_SFuel = [_vehicle,_newFuel];
PVDZE_veh_SFuel spawn local_setFuel;
publicVariable "PVDZE_veh_SFuel";
// Play sound
[player,"refuel",0,false] call dayz_zombieSpeak;

View File

@@ -112,7 +112,7 @@ _availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"];
if(([player,_canNameEmpty] call BIS_fnc_invRemove) == 1) then {
/* WIP - PVS/PVC - Skaronator
/* PVS/PVC - Skaronator */
if (local _vehicle) then {
[_vehicle,_newFuel] call local_setFuel;
} else {
@@ -120,11 +120,6 @@ _availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"];
publicVariableServer "PVDZE_send";
};
*/
PVDZE_veh_SFuel = [_vehicle,_newFuel];
if (local _vehicle) then {
PVDZE_veh_SFuel spawn local_setFuel;
};
publicVariable "PVDZE_veh_SFuel";
// Play sound
[player,"refuel",0,false] call dayz_zombieSpeak;

View File

@@ -39,14 +39,8 @@ if (_unitIsPlayer) then {
//Process Morality Hit
_myKills = 0 max (1 - (player getVariable ["humanKills",0]) / 5);
_humanityHit = -100 * _myKills * _damage;
//["PVDZE_plr_HumanityChange",[_source,_humanityHit,30]] call broadcastRpcCallAll;
if (_humanityHit != 0) then {
PVDZE_plr_HumanityChange = [_source,_humanityHit,30];
publicVariable "PVDZE_plr_HumanityChange";
};
/* WIP - PVS/PVC - Skaronator
/* PVS/PVC - Skaronator */
if (_humanityHit != 0) then {
[_source,_humanityHit] spawn {
private ["_source","_humanityHit"];
@@ -56,7 +50,6 @@ if (_unitIsPlayer) then {
publicVariableServer "PVDZE_send";
};
};
*/
};
};
};

View File

@@ -18,18 +18,13 @@ if (local _animalbody) then {
sleep 5;
};
PVDZE_plr_HideBody = _body;
hideBody _body; // local player
publicVariable "PVDZE_plr_HideBody"; // remote player
/* WIP - PVS/PVC - Skaronator
/* PVS/PVC - Skaronator */
_inRange = _pos nearEntities ["CAManBase",100];
{
PVDZE_send = [_x,"HideBody",[_body]];
publicVariableServer "PVDZE_send";
} forEach _inRange;
*/
sleep 5;
deleteVehicle _body;
true;

View File

@@ -13,19 +13,14 @@ if (local _zombiebody) then {
while {(count magazines _body >0) and (time - _timer < 300) } do {
sleep 5;
};
//["PVDZE_plr_HideBody",_body] call broadcastRpcCallAll;
PVDZE_plr_HideBody = _body;
hideBody _body; // local player
publicVariable "PVDZE_plr_HideBody"; // remote player
/* WIP - PVS/PVC - Skaronator
/* PVS/PVC - Skaronator */
_inRange = _pos nearEntities ["CAManBase",100];
{
PVDZE_send = [_x,"HideBody",[_body]];
publicVariableServer "PVDZE_send";
} forEach _inRange;
*/
sleep 5;
deleteVehicle _body;
true;

View File

@@ -77,12 +77,9 @@ if (count _array > 0) then {
_wait = 0;
};
if (_isBandit and !_isPZombie and (_humanity != 0)) then {
PVDZE_plr_HumanityChange = [_source,_humanity,_wait];
publicVariable "PVDZE_plr_HumanityChange";
/* WIP - PVS/PVC - Skaronator
/* PVS/PVC - Skaronator */
PVDZE_send = [_source,"Humanity",[_source,_humanity,_wait]];
publicVariableServer "PVDZE_send";
*/
};
};
@@ -90,8 +87,9 @@ if (count _array > 0) then {
_wait = 0;
};
if (!_canHitFree and !_isBandit and !_isPZombie and (_humanity != 0)) then {
PVDZE_plr_HumanityChange = [_source,_humanity,_wait];
publicVariable "PVDZE_plr_HumanityChange";
/* PVS/PVC - Skaronator */
PVDZE_send = [_source,"Humanity",[_source,_humanity,_wait]];
publicVariableServer "PVDZE_send";
};
if (_isPZombie) then {
@@ -99,12 +97,9 @@ if (count _array > 0) then {
_killsZ = _source getVariable ["zombieKills",0];
_source setVariable ["zombieKills",(_killsZ + 1),true];
_wait = 0;
PVDZE_plr_HumanityChange = [_source,_humanity,_wait];
publicVariable "PVDZE_plr_HumanityChange";
/* WIP - PVS/PVC - Skaronator
/* PVS/PVC - Skaronator */
PVDZE_send = [_source,"Humanity",[_source,_humanity,_wait]];
publicVariableServer "PVDZE_send";
*/
};
if (_canHitFree) then {
//_humanity = 100; //50
@@ -167,7 +162,6 @@ if (count _array > 0) then {
_body setVariable["combattimeout", 0, true];
//["dayzFlies",player] call broadcastRpcCallAll;
sleep 2;
1 cutRsc ["DeathScreen","BLACK OUT",3];

View File

@@ -3,39 +3,6 @@ ASSIGN DAMAGE TO A UNIT
- Function Vehicle_HandleDamage
- [unit, selectionName, damage, source, projectile] call Vehicle_HandleDamage;
************************************************************/
private ["_unit","_selection","_strH","_dam","_total","_needUpdate"];
_unit = _this select 0;
_selection = _this select 1;
_total = _this select 2;
_dam = _unit getVariable["totalDmg",0];
_needUpdate = _unit getVariable["needUpdate",false];
if (_dam < 1 ) then {
if ( (_selection != "") ) then {
_strH = "hit_" + (_selection);
} else {
_strH = "totalDmg";
};
if (_total > 0.98) then {
_total = 1;
};
if ( _total>0 ) then {
_unit setVariable [_strH,_total,true];
if ( !_needUpdate ) then {
_unit setVariable ["needUpdate",true,true];
//["PVDZE_veh_Update",[_unit,"damage"]] call callRpcProcedure;
if (isServer) then {
[_unit, "damage"] call server_updateObject;
} else {
PVDZE_veh_Update = [_unit,"damage"];
publicVariableServer "PVDZE_veh_Update";
};
};
};
};
_total
/* WIP - PVS/PVC - Skaronator - CP out of DayZ Mod 1.8
private["_unit","_selection","_strH","_total","_damage","_needUpdate"];
_unit = _this select 0;
@@ -67,11 +34,10 @@ if (local _unit) then {
};
} else {
// vehicle is not local to this client, ask the client which vehicle is local to set damage
//_this resize 5; // delete "broadcast" boolean
/* PVS/PVC - Skaronator */
PVDZE_send = [_unit,"VehHandleDam",_this];
publicVariableServer "PVDZE_send";
};
// all "HandleDamage event" functions should return the effective damage that the engine will record for that part
_total
*/
_total

View File

@@ -25,20 +25,13 @@
"PVDZE_veh_Init" addPublicVariableEventHandler {(_this select 1) call fnc_veh_ResetEH};
"PVDZE_plr_HumanityChange" addPublicVariableEventHandler {(_this select 1) spawn player_humanityChange};
"PVDZE_serverObjectMonitor" addPublicVariableEventHandler {PVDZE_serverObjectMonitor = dayz_safety};
/* WIP - PVS/PVC Skaronator
/* PVS/PVC - Skaronator */
"PVCDZE_vehSH" addPublicVariableEventHandler {(_this select 1) call vehicle_handleDamage}; // set damage to vehicle part
"PVCDZE_hideBody" addPublicVariableEventHandler {hideBody (_this select 1)};
*/
//Server only
if (isServer) then {
//WIP - Skaronator
//"PVDZE_send" addPublicVariableEventHandler {(_this select 1) call server_sendToClient};
/* PVS/PVC - Skaronator */
"PVDZE_send" addPublicVariableEventHandler {(_this select 1) call server_sendToClient};
"PVDZE_plr_Died" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerDied};
"PVDZE_plr_Save" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerSync;};

View File

@@ -59,12 +59,9 @@ if (_finished) then {
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
dayz_sourceBleeding = objNull;
} else {
usecBandage = [_unit,player];
publicVariable "usecBandage";
/* WIP - PVS/PVC - Skaronator
/* PVS/PVC - Skaronator */
PVDZE_send = [_unit,"Bandage",[_unit,player]];
publicVariableServer "PVDZE_send";
*/
[player,20] call player_humanityChange;
};

View File

@@ -14,12 +14,9 @@ if (!_isDead) then {
_unit setVariable ["NORRN_unconscious", false, true];
_unit setVariable ["USEC_isCardiac",false,true];
sleep 5;
usecEpi = [_unit,player,"ItemEpinephrine"];
publicVariable "usecEpi";
/* WIP - PVS/PVC - Skaronator
/* PVS/PVC - Skaronator */
PVDZE_send = [_unit,"Epinephrine",[_unit,player,"ItemEpinephrine"]];
publicVariableServer "PVDZE_send";
*/
};
r_action = false;

View File

@@ -59,14 +59,10 @@ if (_finished) then {
//PVDZE_plr_HumanityChange = [player,50];
[player,50] call player_humanityChange;
};
usecMorphine = [_unit,player];
publicVariable "usecMorphine";
/* WIP - PVS/PVC - Skaronator
/* PVS/PVC - Skaronator */
PVDZE_send = [_unit,"Morphine",[_unit,player]];
publicVariableServer "PVDZE_send";
*/
};
} else {
r_interrupt = false;

View File

@@ -34,11 +34,7 @@ if(_num_removed == 1) then {
sleep 1;
//clear the healed player's vision
usecPainK = [_unit,player];
publicVariable "usecPainK";
/* WIP - PVS/PVC - Skaronator
/* PVS/PVC - Skaronator */
PVDZE_send = [_unit,"Painkiller",[_unit,player]];
publicVariableServer "PVDZE_send";
*/
};

View File

@@ -16,9 +16,4 @@ if ((_unit == player) or (vehicle player != player)) then {
_display = uiNamespace getVariable 'DAYZ_GUI_display';
_control = _display displayCtrl 1303;
_control ctrlShow false;
};
/* WIP - PVS/PVC - Not anymore used: moved to server_sendToClient.sqf - Skaronator */
if (isServer) then {
_unit setVariable["medForceUpdate",true];
};

View File

@@ -20,9 +20,4 @@ if (!_isDead) then {
r_player_cardiac = false;
r_player_handler1 = false;
};
/* WIP - PVS/PVC - Not anymore used: moved to server_sendToClient.sqf - Skaronator */
if (isServer) then {
_unit setVariable["medForceUpdate",true];
};
};

View File

@@ -17,12 +17,4 @@ if ((_unit == player) or (vehicle player != player)) then {
_control ctrlShow false;
_id = false spawn dayz_disableRespawn;
};
/* WIP - PVS/PVC - Not anymore used: moved to server_sendToClient.sqf - Skaronator */
_unit setVariable ["hit_legs",0,false];
_unit setVariable ["hit_hands",0,false];
if (isServer) then {
_unit setVariable["medForceUpdate",true];
};

View File

@@ -9,8 +9,4 @@ if ((_unit == player) or (vehicle player != player)) then {
r_player_inpain = false;
R3F_TIRED_Accumulator = 0;
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
};
/* WIP - PVS/PVC - Not anymore used: moved to server_sendToClient.sqf - Skaronator */
if (isServer) then {
_unit setVariable["medForceUpdate",true];
};

View File

@@ -26,8 +26,4 @@ if (_unit == player) then {
_control ctrlShow true;
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];
};
};

View File

@@ -45,13 +45,10 @@ 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];
publicVariable "usecTransfuse";
/* WIP - PVS/PVC - Skaronator
PVDZE_send = [_unit,"Transfuse",[_unit,player]];
publicVariableServer "PVDZE_send";
*/
/* PVS/PVC - Skaronator */
PVDZE_send = [_unit,"Transfuse",[_unit,player]];
publicVariableServer "PVDZE_send";
[player,100] call player_humanityChange;
};

View File

@@ -10,7 +10,7 @@ _owner = owner _unit;
//execution
switch (_variable) do {
case "VehHandleDam": { //DONE
case "VehHandleDam": {
_vehicle = _arraytosend select 0;
if (local _vehicle) then {
_arraytosend call fnc_veh_handleDam;
@@ -20,7 +20,7 @@ switch (_variable) do {
};
};
case "SetFuel": { //DONE
case "SetFuel": {
_vehicle = _arraytosend select 0;
_qty = _arraytosend select 1;
if (local _vehicle) then {
@@ -31,53 +31,48 @@ switch (_variable) do {
};
};
case "HideBody": { //DONE
PVCDZE_hideBody = _arraytosend select 0;
_owner publicVariableClient "PVCDZE_hideBody";
case "HideBody": {
PVDZE_plr_HideBody = _arraytosend select 0;
_owner publicVariableClient "PVDZE_plr_HideBody";
};
case "Humanity": { //DONE
case "Humanity": {
PVDZE_plr_HumanityChange = _arraytosend;
_owner publicVariableClient "PVDZE_plr_HumanityChange";
};
case "Transfuse": { //DONE
case "Transfuse": {
usecTransfuse = _arraytosend;
_owner publicVariableClient "usecTransfuse";
//Don't forget!! Checkout dayz_code\medical\publicEH\medTransfuse.sqf #30
_unit setVariable["medForceUpdate",true];
};
case "Painkiller": { //DONE
case "Painkiller": {
usecPainK = _arraytosend;
_owner publicVariableClient "usecPainK";
//Don't forget!! Checkout dayz_code\medical\publicEH\medPainkiller.sqf #13
_unit setVariable["medForceUpdate",true];
};
case "Morphine": { //DONE
case "Morphine": {
usecMorphine = _arraytosend;
_owner publicVariableClient "usecMorphine";
//Don't forget!! Checkout dayz_code\medical\publicEH\medMorphine.sqf #22
_unit setVariable ["hit_legs",0,false];
_unit setVariable ["hit_hands",0,false];
_unit setVariable["medForceUpdate",true];
};
case "Epinephrine": { //DONE
case "Epinephrine": {
usecEpi = _arraytosend;
_owner publicVariableClient "usecEpi";
//Don't forget!! Checkout dayz_code\medical\publicEH\medEpi.sqf #24
_unit setVariable["medForceUpdate",true];
};
case "Bandage": { //DONE
case "Bandage": {
usecBandage = _arraytosend;
_owner publicVariableClient "usecBandage";
//Don't forget!! Checkout dayz_code\medical\publicEH\medEpi.sqf #21
_unit setVariable["medForceUpdate",true];
};
case "tagFriendly": { //DONE
case "tagFriendly": {
PVDZE_plr_FriendRQ = _arraytosend;
_owner publicVariableClient "PVDZE_plr_FriendRQ";
};

View File

@@ -30,8 +30,8 @@ server_spawnEvents = compile preprocessFileLineNumbers "\z\addons\dayz_server\
fnc_plyrHit = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_plyrHit.sqf";
server_deaths = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDeaths.sqf";
//WIP - Skaronator
//server_sendToClient = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_sendToClient.sqf";
/* PVS/PVC - Skaronator */
server_sendToClient = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_sendToClient.sqf";
vehicle_handleInteract = {
private["_object"];