More PVS/PVC Stuff

This commit is contained in:
Skaronator
2014-01-16 14:39:53 +01:00
parent a363400d64
commit 40e4239d42
12 changed files with 100 additions and 29 deletions

View File

@@ -159,9 +159,15 @@ if (_damage > 0.4) then { //0.25
if(!_isPZombie) then {
//Create Wound
_unit setVariable[_wound,true,true];
[_unit,_wound,_hit] spawn fnc_usec_damageBleed;
usecBleed = [_unit,_wound,_hit];
publicVariable "usecBleed";
/* PVS/PVC - Skaronator */
_pos = getPosATL _unit;
_inRange = _pos nearEntities ["CAManBase",1000];
{
PVDZE_send = [_x,"PlayerBleed",[_unit,_wound,_hit]];
publicVariableServer "PVDZE_send";
} forEach _inRange;
//Set Injured if not already
_isInjured = _unit getVariable["USEC_injured",false];

View File

@@ -66,11 +66,25 @@ if ((!r_player_handler1) and (r_handlerCount == 0)) then {
//Give Blood
r_player_blood = r_player_bloodTotal;
player setVariable["USEC_lowBlood",false,true];
//Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
player setVariable ["hit_legs",0,false];
player setVariable ["hit_hands",0,false];
player setVariable["medForceUpdate",true];
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
player setVariable["medForceUpdate",true];
/* REMOVED USE THAT ABOVE
usecMorphine = [player,player];
publicVariable "usecMorphine";
player setVariable ["USEC_inPain", false, true];
usecBandage = [player,player];
publicVariable "usecBandage";
*/
player setVariable ["USEC_inPain", false, true];
player setdamage 0;
{player setVariable[_x,false,true];} forEach USEC_woundHit;
player setVariable ["USEC_injured",false,true];

View File

@@ -6,8 +6,12 @@ if (!(isNull _backpack) and local _backpack) then {
_weaponscnt = count (_weapons select 0);
_magazinescnt = count (_magazines select 0);
if((_magazinescnt > 0) or (_weaponscnt > 0)) then {
// hide backpack from everyone else
PVDZE_obj_Hide = _backpack;
publicVariable "PVDZE_obj_Hide";
/* PVS/PVC - Skaronator */
_pos = getPosATL player;
_inRange = _pos nearEntities ["CAManBase",300];
{
PVDZE_send = [_x,"HideObj",[_backpack]];
publicVariableServer "PVDZE_send";
} forEach _inRange;
};
};

View File

@@ -60,15 +60,29 @@ if (_ammo isKindOf "SmokeShell") then {
//hint str(_ammo);
_projectile = nearestObject [_unit, "RoadFlare"];
_id = [_projectile,0] spawn object_roadFlare;
PVDZE_obj_RoadFlare = [_projectile,0];
publicVariable "PVDZE_obj_RoadFlare";
/* PVS/PVC - Skaronator */
_pos = getPosATL player;
_inRange = _pos nearEntities ["CAManBase",1250];
{
PVDZE_send = [_x,"RoadFlare",[_projectile,0]];
publicVariableServer "PVDZE_send";
} forEach _inRange;
_id = _this spawn player_throwObject;
};
if (_ammo isKindOf "ChemLight") then {
_projectile = nearestObject [_unit, "ChemLight"];
_id = [_projectile,1] spawn object_roadFlare;
PVDZE_obj_RoadFlare = [_projectile,1];
publicVariable "PVDZE_obj_RoadFlare";
/* PVS/PVC - Skaronator */
_pos = getPosATL player;
_inRange = _pos nearEntities ["CAManBase",1250];
{
PVDZE_send = [_x,"RoadFlare",[_projectile,1]];
publicVariableServer "PVDZE_send";
} forEach _inRange;
_id = _this spawn player_throwObject;
};
};