mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Several smaller fixes
This commit is contained in:
parent
a94929f9d3
commit
e412774b07
@ -22,6 +22,9 @@ _canAutoRun = true;
|
|||||||
if !(alive player) exitwith {
|
if !(alive player) exitwith {
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
if (lifeState player == "INCAPACITATED") exitwith {
|
||||||
|
false
|
||||||
|
};
|
||||||
/*
|
/*
|
||||||
if !(istouchingground player) exitwith {
|
if !(istouchingground player) exitwith {
|
||||||
false
|
false
|
||||||
|
@ -13,11 +13,16 @@
|
|||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_HandleDamage.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_HandleDamage.sqf
|
||||||
*/
|
*/
|
||||||
params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
|
params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
|
||||||
|
|
||||||
|
_this call EPOCH_custom_EH_HandleDamage;
|
||||||
|
|
||||||
if !(_source isEqualTo _unit) then {
|
if !(_source isEqualTo _unit) then {
|
||||||
if ((missionnamespace getvariable ["EPOCH_HandleDamageTimeOut",diag_ticktime]) > diag_ticktime) exitwith {}; // prevent multiple actions here
|
if ((missionnamespace getvariable ["EPOCH_HandleDamageTimeOut",diag_ticktime]) - diag_ticktime > 5) exitwith {_damage = 1;};
|
||||||
EPOCH_HandleDamageTimeOut = diag_ticktime + 0.1;
|
|
||||||
switch _projectile do {
|
switch _projectile do {
|
||||||
case "B_EnergyPack": {
|
case "B_EnergyPack": {
|
||||||
|
_damage = 0;
|
||||||
|
if ((missionnamespace getvariable ["EPOCH_HandleDamageTimeOut",diag_ticktime]) > diag_ticktime) exitwith {}; // prevent multiple actions here
|
||||||
|
EPOCH_HandleDamageTimeOut = diag_ticktime + 0.1;
|
||||||
if (_source distance _unit > 10) exitwith {};
|
if (_source distance _unit > 10) exitwith {};
|
||||||
if !(missionnamespace getvariable ["EPOCH_OldRevive",false]) then {
|
if !(missionnamespace getvariable ["EPOCH_OldRevive",false]) then {
|
||||||
_attachments = handgunItems _source;
|
_attachments = handgunItems _source;
|
||||||
@ -58,6 +63,9 @@ if !(_source isEqualTo _unit) then {
|
|||||||
case "bbag_pvc";
|
case "bbag_pvc";
|
||||||
case "xbow_tranq";
|
case "xbow_tranq";
|
||||||
case "tranq_dart": {
|
case "tranq_dart": {
|
||||||
|
_damage = 0;
|
||||||
|
if ((missionnamespace getvariable ["EPOCH_HandleDamageTimeOut",diag_ticktime]) > diag_ticktime) exitwith {}; // prevent multiple actions here
|
||||||
|
EPOCH_HandleDamageTimeOut = diag_ticktime + 0.1;
|
||||||
if !(lifeState _unit == "INCAPACITATED") then {
|
if !(lifeState _unit == "INCAPACITATED") then {
|
||||||
EPOCH_HandleDamageTimeOut = diag_ticktime + 1;
|
EPOCH_HandleDamageTimeOut = diag_ticktime + 1;
|
||||||
_unit setUnconscious true;
|
_unit setUnconscious true;
|
||||||
@ -69,6 +77,7 @@ if !(_source isEqualTo _unit) then {
|
|||||||
case "B_Swing";
|
case "B_Swing";
|
||||||
case "B_Stick";
|
case "B_Stick";
|
||||||
case "B_Hatchet": {
|
case "B_Hatchet": {
|
||||||
|
if ((missionnamespace getvariable ["EPOCH_HandleDamageTimeOut",diag_ticktime]) > diag_ticktime) exitwith {}; // prevent multiple actions here
|
||||||
if !(lifeState _unit == "INCAPACITATED") then {
|
if !(lifeState _unit == "INCAPACITATED") then {
|
||||||
if ((random 100) < (["CfgEpochClient", "UnconsciousChance", 30] call EPOCH_fnc_returnConfigEntryV2)) then {
|
if ((random 100) < (["CfgEpochClient", "UnconsciousChance", 30] call EPOCH_fnc_returnConfigEntryV2)) then {
|
||||||
EPOCH_HandleDamageTimeOut = diag_ticktime + 1;
|
EPOCH_HandleDamageTimeOut = diag_ticktime + 1;
|
||||||
|
@ -284,7 +284,7 @@ class CfgEpochClient
|
|||||||
Killed = "_this call EPOCH_fnc_playerDeath;_this call Epoch_custom_EH_Killed";
|
Killed = "_this call EPOCH_fnc_playerDeath;_this call Epoch_custom_EH_Killed";
|
||||||
HandleRating = "0";
|
HandleRating = "0";
|
||||||
HandleScore = "";
|
HandleScore = "";
|
||||||
HandleDamage = "_this call EPOCH_HandleDamage;_this call EPOCH_custom_EH_HandleDamage";
|
HandleDamage = "_this call EPOCH_HandleDamage";
|
||||||
HandleHeal = "";
|
HandleHeal = "";
|
||||||
Dammaged = "";
|
Dammaged = "";
|
||||||
Hit = "_this call EPOCH_custom_EH_Hit";
|
Hit = "_this call EPOCH_custom_EH_Hit";
|
||||||
|
Loading…
Reference in New Issue
Block a user