mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-15 12:42:57 +03:00
Merge pull request #978 from vbawol/PVS/PVC
Complete #941 - Need Testing
This commit is contained in:
@@ -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";
|
||||
};
|
||||
};
|
||||
*/
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user