Remove fnc_usec_resetWoundPoints from server

This function uses player as object which does not work on the server.

Thx to mmrsz
This commit is contained in:
A Man
2022-06-03 20:43:55 +02:00
parent abce13a659
commit 99f5acee6e
2 changed files with 12 additions and 6 deletions

View File

@@ -265,11 +265,13 @@ fnc_usec_playerHandleBlood = {
};
};
fnc_usec_resetWoundPoints = {
{
player setVariable["hit_"+_x,false,true];
} forEach USEC_typeOfWounds;
player setVariable ["USEC_injured",false,true];
if (!isDedicated) then {
fnc_usec_resetWoundPoints = {
{
player setVariable["hit_"+_x,false,true];
} forEach USEC_typeOfWounds;
player setVariable ["USEC_injured",false,true];
};
};
fnc_usec_damageBleed = {

View File

@@ -99,6 +99,7 @@ if (count _medical > 0) then {
_fractures = _medical select 9;
_playerObj setVariable ["hit_legs",(_fractures select 0),true];
_playerObj setVariable ["hit_hands",(_fractures select 1),true];
_playerObj setVariable ["unconsciousTime",(_medical select 10),true];
_playerObj setVariable ["messing",if (count _medical >= 14) then {(_medical select 13)} else {[0,0,0]},true];
_playerObj setVariable ["blood_testdone",if (count _medical >= 15) then {(_medical select 14)} else {false},true];
@@ -114,7 +115,10 @@ if (count _medical > 0) then {
};
} else {
//Reset bleeding wounds
call fnc_usec_resetWoundPoints;
{
_playerObj setVariable["hit_"+_x,false,true];
} forEach USEC_typeOfWounds;
//Reset fractures
_playerObj setVariable ["hit_legs",0,true];
_playerObj setVariable ["hit_hands",0,true];