Update damage handler and improve study body

Vanilla development commits applied:

3db0fe8e7a

73a63898f1

08e18d5b52

126da2dcd3

d5fa323865

d37526fcc6

5fcca134f0

c9c1fc934d
This commit is contained in:
ebaydayz
2016-08-11 15:16:46 -04:00
parent 4019d0c351
commit 7439b87779
10 changed files with 226 additions and 179 deletions

View File

@@ -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