Push #941 - Humanity

This commit is contained in:
Skaronator
2014-01-11 20:11:00 +01:00
parent 4f2ab53a1f
commit 2a37818e47
3 changed files with 24 additions and 29 deletions

View File

@@ -24,29 +24,6 @@ _humanityHit = 0;
_myKills = 0;
_unitIsPlayer = _unit == player;
//Publish Damage
//player sidechat format["Processed damage for %1",_unit];
//USEC_SystemMessage = format["CLIENT: %1 damaged for %2 (in vehicle: %5)",_unit,_damage,_isMinor,_isHeadHit,_inVehicle];
//PublicVariable "USEC_SystemMessage";
/*
if (_isPlayer) then {
if (_damage > 0.1) then {
dayz_canDisconnect = false;
//["PVDZE_plr_DiscAdd",getPlayerUID player] call callRpcProcedure;
PVDZE_plr_DiscAdd = getPlayerUID player;
publicVariableServer "PVDZE_plr_DiscAdd";
dayz_damageCounter = time;
//Ensure Control is visible
_display = uiNamespace getVariable 'DAYZ_GUI_display';
_control = _display displayCtrl 1204;
_control ctrlShow true;
};
};
*/
if (_unitIsPlayer) then {
if (_hit == "") then {
if ((_source != player) and _isPlayer) then {
@@ -68,6 +45,18 @@ if (_unitIsPlayer) then {
PVDZE_plr_HumanityChange = [_source,_humanityHit,30];
publicVariable "PVDZE_plr_HumanityChange";
};
/* WIP - PVS/PVC - Skaronator
if (_humanityHit != 0) then {
[_source,_humanityHit] spawn {
private ["_source","_humanityHit"];
_source = _this select 0;
_humanityHit = _this select 1;
PVDZE_send = [_source,"Humanity",[_source,_humanityHit,30]];
publicVariableServer "PVDZE_send";
};
};
*/
};
};
};

View File

@@ -79,6 +79,10 @@ if (count _array > 0) then {
if (_isBandit and !_isPZombie and (_humanity != 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";
*/
};
};
@@ -97,6 +101,10 @@ if (count _array > 0) then {
_wait = 0;
PVDZE_plr_HumanityChange = [_source,_humanity,_wait];
publicVariable "PVDZE_plr_HumanityChange";
/* WIP - PVS/PVC - Skaronator
PVDZ_send = [_source,"Humanity",[_source,_humanity,_wait]];
publicVariableServer "PVDZ_send";
*/
};
if (_canHitFree) then {
//_humanity = 100; //50

View File

@@ -31,16 +31,14 @@ switch (_variable) do {
};
};
case "HideBody": {
case "HideBody": { //DONE
PVCDZE_hideBody = _arraytosend select 0;
_owner publicVariableClient "PVCDZE_hideBody";
};
case "Humanity": {
PVCDZ_plr_Humanity = _arraytosend;
_owner publicVariableClient "PVCDZ_plr_Humanity";
//diag_log ("Humanity" +str(PVCDZ_plr_Humanity));
case "Humanity": { //DONE
PVDZE_plr_HumanityChange = _arraytosend;
_owner publicVariableClient "PVDZE_plr_HumanityChange";
};
case "dayzSetDate": {