mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 04:23:13 +03:00
0.81
This commit is contained in:
@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_damageHandler.sqf";
|
||||
- Function
|
||||
- [unit, selectionName, damage, source, projectile] call fnc_usec_damageHandler;
|
||||
************************************************************/
|
||||
private["_unit","_humanityHit","_myKills","_isBandit","_hit","_damage","_isPlayer","_unconscious","_wound","_isHit","_isInjured","_type","_hitPain","_inPain","_isDead","_isCardiac","_killerID","_evType","_recordable","_inVehicle","_isHeadHit","_isMinor","_scale","_canHitFree"];
|
||||
private["_unit","_humanityHit","_myKills","_isBandit","_hit","_damage","_isPlayer","_unconscious","_wound","_isHit","_isInjured","_type","_hitPain","_inPain","_isDead","_isCardiac","_killerID","_evType","_recordable","_isHeadHit","_isMinor","_scale","_canHitFree"];
|
||||
_unit = _this select 0;
|
||||
_hit = _this select 1;
|
||||
_damage = _this select 2;
|
||||
@@ -14,13 +14,12 @@ _ammo = _this select 4;
|
||||
_type = [_damage,_ammo] call fnc_usec_damageType;
|
||||
_isMinor = (_hit in USEC_MinorWounds);
|
||||
_isHeadHit = (_hit == "head_hit");
|
||||
_inVehicle = (vehicle _unit != _unit);
|
||||
_evType = "";
|
||||
_recordable = false;
|
||||
_isPlayer = (isPlayer _source);
|
||||
_humanityHit = 0;
|
||||
_myKills = 0;
|
||||
_sourceZombie = _source isKindOf "zZombie_base";
|
||||
_unitIsPlayer = _unit == player;
|
||||
|
||||
//Publish Damage
|
||||
//player sidechat format["Processed damage for %1",_unit];
|
||||
@@ -43,7 +42,7 @@ if (_isPlayer) then {
|
||||
};
|
||||
*/
|
||||
|
||||
if (_unit == player) then {
|
||||
if (_unitIsPlayer) then {
|
||||
if (_hit == "") then {
|
||||
if ((_source != player) and _isPlayer) then {
|
||||
//Enable aggressor Actions
|
||||
@@ -81,7 +80,7 @@ if (_damage > 0.4) then {
|
||||
case 1: {_scale = _scale + 200};
|
||||
case 2: {_scale = _scale + 200};
|
||||
};
|
||||
if (_unit == player) then {
|
||||
if (_unitIsPlayer) then {
|
||||
//Cause blood loss
|
||||
//Log Damage
|
||||
//diag_log ("DAMAGE: player hit by " + typeOf _source + " in " + _hit + " with " + _ammo + " for " + str(_damage) + " scaled " + str(_damage * _scale));
|
||||
@@ -106,13 +105,13 @@ if (_hit in USEC_MinorWounds) then {
|
||||
};
|
||||
|
||||
|
||||
if (_unit == player) then {
|
||||
if (_unitIsPlayer) then {
|
||||
//incombat
|
||||
_unit setVariable["startcombattimer", 1, false];
|
||||
};
|
||||
|
||||
if (_damage > 0.1) then {
|
||||
if (_unit == player) then {
|
||||
if (_unitIsPlayer) then {
|
||||
//shake the cam, frighten them!
|
||||
//player sidechat format["Processed bullet hit for %1 (should only be for me!)",_unit];
|
||||
1 call fnc_usec_bulletHit;
|
||||
@@ -127,7 +126,7 @@ if (_damage > 0.4) then { //0.25
|
||||
*/
|
||||
_wound = _hit call fnc_usec_damageGetWound;
|
||||
_isHit = _unit getVariable[_wound,false];
|
||||
if (_unit == player) then {
|
||||
if (_unitIsPlayer) then {
|
||||
_rndPain = (random 10);
|
||||
_rndInfection = (random 500);
|
||||
_hitPain = (_rndPain < _damage);
|
||||
@@ -138,13 +137,13 @@ if (_damage > 0.4) then { //0.25
|
||||
//player sidechat format["HitPain: %1, HitInfection %2 (Damage: %3)",_rndPain,_rndInfection,_damage]; //r_player_infected
|
||||
if (_isHit) then {
|
||||
//Make hit worse
|
||||
if (_unit == player) then {
|
||||
if (_unitIsPlayer) then {
|
||||
r_player_blood = r_player_blood - 50;
|
||||
};
|
||||
};
|
||||
if (_hitInfection) then {
|
||||
//Set Infection if not already
|
||||
if (_unit == player) then {
|
||||
if (_unitIsPlayer) then {
|
||||
r_player_infected = true;
|
||||
player setVariable["USEC_infected",true,true];
|
||||
};
|
||||
@@ -152,7 +151,7 @@ if (_damage > 0.4) then { //0.25
|
||||
};
|
||||
if (_hitPain) then {
|
||||
//Set Pain if not already
|
||||
if (_unit == player) then {
|
||||
if (_unitIsPlayer) then {
|
||||
r_player_inpain = true;
|
||||
player setVariable["USEC_inPain",true,true];
|
||||
};
|
||||
@@ -172,7 +171,7 @@ if (_damage > 0.4) then { //0.25
|
||||
_isInjured = _unit getVariable["USEC_injured",false];
|
||||
if (!_isInjured) then {
|
||||
_unit setVariable["USEC_injured",true,true];
|
||||
if ((_unit == player) and (_ammo != "zombie")) then {
|
||||
if ((_unitIsPlayer) and (_ammo != "zombie")) then {
|
||||
dayz_sourceBleeding = _source;
|
||||
};
|
||||
};
|
||||
@@ -181,7 +180,7 @@ if (_damage > 0.4) then { //0.25
|
||||
if (!_lowBlood) then {
|
||||
_unit setVariable["USEC_lowBlood",true,true];
|
||||
};
|
||||
if (_unit == player) then {
|
||||
if (_unitIsPlayer) then {
|
||||
r_player_injured = true;
|
||||
};
|
||||
};
|
||||
@@ -191,13 +190,13 @@ if (_type == 1) then {
|
||||
/*
|
||||
BALISTIC DAMAGE
|
||||
*/
|
||||
if ((_damage > 0.01) and (_unit == player)) then {
|
||||
if ((_damage > 0.01) and (_unitIsPlayer)) then {
|
||||
//affect the player
|
||||
[20,45] call fnc_usec_pitchWhine; //Visual , Sound
|
||||
};
|
||||
if (_damage > 4) then {
|
||||
//serious ballistic damage
|
||||
if (_unit == player) then {
|
||||
if (_unitIsPlayer) then {
|
||||
_id = [_source,"explosion"] spawn player_death;
|
||||
};
|
||||
} else {
|
||||
@@ -216,7 +215,7 @@ if (_type == 2) then {
|
||||
*/
|
||||
if (_damage > 4) then {
|
||||
//serious ballistic damage
|
||||
if (_unit == player) then {
|
||||
if (_unitIsPlayer) then {
|
||||
_id = [_source,"shotheavy"] spawn player_death;
|
||||
};
|
||||
} else {
|
||||
|
||||
@@ -25,4 +25,4 @@ if (_needleLen <= _haystackLen) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
_found;
|
||||
_found
|
||||
|
||||
@@ -33,7 +33,7 @@ class CfgMods
|
||||
hidePicture = 0;
|
||||
hideName = 0;
|
||||
action = "http://www.dayepoch.com";
|
||||
version = "0.8";
|
||||
version = "0.81";
|
||||
hiveVersion = 0.96; //0.93
|
||||
};
|
||||
};
|
||||
|
||||
@@ -224,13 +224,20 @@ if (!isDedicated) then {
|
||||
private ["_dikCode", "_handled"];
|
||||
_dikCode = _this select 1;
|
||||
_handled = false;
|
||||
DoRE = ({isPlayer _x} count (player nearEntities ["AllVehicles",500]) > 1);
|
||||
if (_dikCode in (actionKeys "GetOver")) then {
|
||||
if (animationState player in ["amovpercmrunslowwrfldf","amovpercmrunsraswrfldf","amovpercmevaslowwrfldf","amovpercmevasraswrfldf"]) then {
|
||||
if (canRoll && animationState player in ["amovpercmrunslowwrfldf","amovpercmrunsraswrfldf","amovpercmevaslowwrfldf","amovpercmevasraswrfldf"]) then {
|
||||
canRoll = false;
|
||||
null = [] spawn {
|
||||
//Needed for sync with others
|
||||
if (DoRE) then {
|
||||
[nil, player, rSWITCHMOVE,"ActsPercMrunSlowWrflDf_FlipFlopPara"] call RE;
|
||||
} else {
|
||||
player switchMove "ActsPercMrunSlowWrflDf_FlipFlopPara";
|
||||
};
|
||||
sleep 0.3;
|
||||
player setVelocity [(velocity player select 0) + 1.5 * sin direction player, (velocity player select 1) + 1.5 * cos direction player, (velocity player select 2) + 4];
|
||||
sleep 1;
|
||||
canRoll = true;
|
||||
};
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
@@ -34,6 +34,7 @@ pz_priest = "pz_priest";
|
||||
|
||||
|
||||
dayz_combatLog = "";
|
||||
canRoll = true;
|
||||
|
||||
|
||||
//Hunting Variables
|
||||
|
||||
@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
|
||||
class DAYZ_Version : CA_Version
|
||||
{
|
||||
idc = -1;
|
||||
text = "DayZ Epoch 0.8 (1.7.5.M1D25)";
|
||||
text = "DayZ Epoch 0.81 (1.7.5.M1D25)";
|
||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||
};
|
||||
class CA_TitleMainMenu;
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
<Russian>Костер убран.</Russian>
|
||||
<Spanish>La fogata fue removida</Spanish>
|
||||
<Dutch>Het kampvuur is verwijderd</Dutch>
|
||||
<French>Le feu de camp a été retiré.</French
|
||||
<French>Le feu de camp a été retiré.</French>
|
||||
</Key>
|
||||
<Key ID="str_success_gutted_animal">
|
||||
<Original>%1 has been gutted, %2 meat steaks now on the carcass</Original>
|
||||
@@ -625,7 +625,7 @@
|
||||
<Russian>обезвоживания</Russian>
|
||||
<Spanish>deshidratacion</Spanish>
|
||||
<Dutch>uitdroging</Dutch>
|
||||
<French>une déshydratation</French
|
||||
<French>une déshydratation</French>
|
||||
</Key>
|
||||
<Key ID="str_death_starve">
|
||||
<Original>starvation</Original>
|
||||
|
||||
Reference in New Issue
Block a user