Added setting to disable variable sync (recommended on)

This commit is contained in:
Glowbal 2015-04-05 20:23:07 +02:00
parent 7ffd690a71
commit 147bb92541
4 changed files with 21 additions and 7 deletions

View File

@ -16,13 +16,12 @@ class ACE_Settings {
};
class GVAR(enableOverdosing) {
typeName = "BOOL";
value = true;
value = 1;
};
class GVAR(bleedingCoefficient) {
typeName = "SCALAR";
value = 1;
};
class GVAR(enableAirway) {
typeName = "BOOL";
value = false;
@ -37,11 +36,11 @@ class ACE_Settings {
};
class GVAR(enableVehicleCrashes) {
typeName = "BOOL";
value = true;
value = 1;
};
class GVAR(enableScreams) {
typeName = "BOOL";
value = true;
value = 1;
};
class GVAR(playerDamageThreshold) {
typeName = "SCALAR";
@ -58,7 +57,7 @@ class ACE_Settings {
};
class GVAR(preventInstaDeath) {
typeName = "BOOL";
value = false;
value = 0;
};
class GVAR(maxReviveTime) {
typeName = "SCALAR";
@ -70,7 +69,7 @@ class ACE_Settings {
};
class GVAR(allowDeadBodyMovement) {
typeName = "BOOL";
value = false;
value = 0;
};
class GVAR(allowLitterCreation) {
typeName = "BOOL";
@ -83,17 +82,25 @@ class ACE_Settings {
class GVAR(medicSetting_PAK) {
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(medicSetting_SurgicalKit) {
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(consumeItem_PAK) {
typeName = "SCALAR";
value = 0;
values[] = {"No", "Yes"};
};
class GVAR(consumeItem_SurgicalKit) {
typeName = "SCALAR";
value = 0;
values[] = {"No", "Yes"};
};
class GVAR(keepLocalSettingsSynced) {
typeName = "BOOL";
value = 1;
};
};

View File

@ -128,6 +128,12 @@ class CfgVehicles {
typeName = "NUMBER";
defaultValue = 1;
};
class keepLocalSettingsSynced {
displayName = "Sync status";
description = "Keep unit status synced. Recommended on.";
typeName = "BOOL";
defaultValue = 1;
};
};
class ModuleDescription {
description = "Provides a medical system for both players and AI.";

View File

@ -22,7 +22,7 @@ _unit setVariable [QGVAR(lastMomentVitalsHandled), time];
if (_interval == 0) exitWith {};
_lastTimeValuesSynced = _unit getvariable [QGVAR(lastMomentValuesSynced), 0];
_syncValues = time - _lastTimeValuesSynced >= (10 + floor(random(10)));
_syncValues = (time - _lastTimeValuesSynced >= (10 + floor(random(10))) && GVAR(keepLocalSettingsSynced));
if (_syncValues) then {
_unit setvariable [QGVAR(lastMomentValuesSynced), time];
};

View File

@ -34,3 +34,4 @@ if !(_activated) exitWith {};
[_logic, QGVAR(enableUnsconsiousnessAI), "enableUnsconsiousnessAI"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(preventInstaDeath), "preventInstaDeath"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(bleedingCoefficient), "bleedingCoefficient"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(keepLocalSettingsSynced), "keepLocalSettingsSynced"] call EFUNC(common,readSettingFromModule);