mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-19 14:42:56 +03:00
Update damage handler and improve study body
Vanilla development commits applied:3db0fe8e7a73a63898f108e18d5b52126da2dcd3d5fa323865d37526fcc65fcca134f0c9c1fc934d
This commit is contained in:
@@ -18,7 +18,7 @@ sched_medical_slow = { // 10 seconds
|
||||
sched_medical_init = { [ []spawn{} ] };
|
||||
sched_medical = { // 1 second
|
||||
HIDE_FSM_VARS
|
||||
private "_unconHdlr";
|
||||
private ["_method","_unconHdlr"];
|
||||
_unconHdlr = _this select 0;
|
||||
|
||||
if (r_player_blood == 12000) then {
|
||||
@@ -26,9 +26,15 @@ sched_medical = { // 1 second
|
||||
};
|
||||
|
||||
//r_player_unconscious = getVariable ["NORRN_unconscious", true];
|
||||
|
||||
|
||||
_method = switch (true) do {
|
||||
case (dayz_lastDamageSource != "none" && diag_tickTime - dayz_lastDamageTime < 30): {dayz_lastDamageSource}; //Major event takes priority for cause of death
|
||||
case (dayz_lastMedicalSource != "none" && diag_tickTime - dayz_lastMedicalTime < 10): {dayz_lastMedicalSource}; //Starve, Dehyd, Sick
|
||||
default {"bled"}; //No other damage sources in last 30 seconds
|
||||
};
|
||||
|
||||
if (r_player_blood <= 0) then {
|
||||
[dayz_sourceBleeding, "bled"] spawn player_death;
|
||||
[dayz_sourceBleeding, _method] spawn player_death;
|
||||
};
|
||||
|
||||
if (!canStand player) then { // be consistant with player_updateGui.sqf
|
||||
|
||||
Reference in New Issue
Block a user