mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-04-18 10:16:39 +03:00
Merge selfbloodbag and self_transfuse
This commit is contained in:
@@ -371,83 +371,4 @@ fnc_usec_damageBleed = {
|
||||
|
||||
deleteVehicle _source;
|
||||
deleteVehicle _point;
|
||||
};
|
||||
|
||||
//LEGACY BELOW HERE, LEFT IN FOR SCRIPTS THAT MAY REQUIRE THESE FUNCTIONS
|
||||
fnc_usec_damageType = {
|
||||
private["_damage","_ammo","_type"];
|
||||
_damage = _this select 0;
|
||||
_ammo = _this select 1;
|
||||
_type = 0;
|
||||
if ((_ammo isKindof "Grenade") || (_ammo isKindof "ShellBase") || (_ammo isKindof "TimeBombCore") || (_ammo isKindof "BombCore") || (_ammo isKindof "MissileCore") || (_ammo isKindof "RocketCore") || (_ammo isKindof "FuelExplosion") || (_ammo isKindof "GrenadeBase")) then {
|
||||
_type = 1;
|
||||
};
|
||||
if ((_ammo isKindof "B_127x107_Ball") || (_ammo isKindof "B_127x99_Ball")) then {
|
||||
_type = 2;
|
||||
};
|
||||
if (_ammo isKindof "Melee") then {
|
||||
_type = 3;
|
||||
};
|
||||
|
||||
_type;
|
||||
};
|
||||
|
||||
fnc_usec_recoverUncons = {
|
||||
player setVariable ["NORRN_unconscious",false,true];
|
||||
player setVariable ["unconsciousTime",0,true];
|
||||
player setVariable ["USEC_isCardiac",false,true];
|
||||
// player setVariable["medForceUpdate",true,true];
|
||||
|
||||
r_player_unconscious = false;
|
||||
r_player_cardiac = false;
|
||||
r_player_handler1 = false;
|
||||
|
||||
uiSleep 1;
|
||||
|
||||
disableUserInput false;
|
||||
if (vehicle player == player) then {
|
||||
[objNull,player,rSwitchMove,"AinjPpneMstpSnonWnonDnon"] call RE;
|
||||
player switchMove "AinjPpneMstpSnonWnonDnon";
|
||||
player playMoveNow "AmovPpneMstpSnonWnonDnon_healed";
|
||||
};
|
||||
};
|
||||
fnc_med_publicBlood = {
|
||||
while {(r_player_injured || r_player_infected) && r_player_blood > 0} do {
|
||||
player setVariable["USEC_BloodQty",r_player_blood,true];
|
||||
player setVariable["medForceUpdate",true];
|
||||
uiSleep 5;
|
||||
};
|
||||
};
|
||||
|
||||
fnc_usec_playerBleed = {
|
||||
private ["_bleedTime","_bleedPerSec","_total","_bTime","_myBleedTime","_id"];
|
||||
_bleedTime = 400; //seconds
|
||||
_total = r_player_bloodTotal;
|
||||
r_player_injured = true;
|
||||
_myBleedTime = (random 300) + 30;
|
||||
_bTime = 0;
|
||||
while {r_player_injured} do {}
|
||||
_bleedPerSec = 30;
|
||||
// If kneeling || crawling reduce bleeding
|
||||
if (dayz_isKneeling && !r_player_unconscious) then{
|
||||
_bleedPerSec = 15;
|
||||
};
|
||||
if (dayz_isCrawling && !r_player_unconscious) then{
|
||||
_bleedPerSec = 7.5;
|
||||
};
|
||||
//bleed out
|
||||
if (r_player_blood > 0) then {
|
||||
|
||||
r_player_blood = r_player_blood - _bleedPerSec;
|
||||
};
|
||||
_bTime = _bTime + 1;
|
||||
if (_bTime > _myBleedTime) then {
|
||||
r_player_injured = false;
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
|
||||
dayz_sourceBleeding = objNull;
|
||||
{player setVariable[_x,false,true];} count USEC_woundHit;
|
||||
player setVariable ["USEC_injured",false,true];
|
||||
};
|
||||
uiSleep 1;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user