mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 19:06:29 +03:00
Change inCombat to bool instead of number
When a variable is only going to be 0 or 1 it makes more sense to use a
bool.
Also avoided unnecessary network broadcasts of inCombat from e446603
This commit is contained in:
@@ -27,7 +27,7 @@ if (isNil "_playerObj") exitWith {
|
||||
//If the the playerObj exists lets run all sync systems
|
||||
|
||||
_characterID = _playerObj getVariable["characterID", "?"];
|
||||
_inCombat = _playerObj getVariable ["inCombat",0];
|
||||
_inCombat = _playerObj getVariable ["inCombat",false];
|
||||
_Sepsis = _playerObj getVariable["USEC_Sepsis",false];
|
||||
|
||||
//Login processing do not sync
|
||||
@@ -58,7 +58,7 @@ if (_characterID != "?") exitwith {
|
||||
*/
|
||||
|
||||
//Punish combat log
|
||||
if (_inCombat > 0 && _playerPos distance (getMarkerPos "respawn_west") > 1500) then {
|
||||
if (_inCombat && _playerPos distance (getMarkerPos "respawn_west") > 1500) then {
|
||||
// Moved setVariables to server_playerSync since they are high priority
|
||||
// Messages are low priority. Player object not needed
|
||||
diag_log format["PLAYER COMBAT LOGGED: %1(%3) at location %2",_playerName,_playerPos,_playerUID];
|
||||
|
||||
@@ -149,7 +149,7 @@ if (_currentModel == _modelChk) then {
|
||||
_character setVariable ["model_CHK",typeOf _character];
|
||||
};
|
||||
if (count _this > 4) then { //calling from player_onDisconnect
|
||||
if (_this select 4 > 0) then { //combat logged
|
||||
if (_this select 4) then { //combat logged
|
||||
_medical set [1, true]; //set unconcious to true
|
||||
_medical set [10, 150]; //combat timeout
|
||||
//_character setVariable ["NORRN_unconscious",true,true]; // Set status to unconscious
|
||||
|
||||
Reference in New Issue
Block a user