ebaydayz
2016-08-11 15:16:46 -04:00
parent 4019d0c351
commit 7439b87779
10 changed files with 226 additions and 179 deletions
@@ -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