mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Merge branch 'experimental' of https://github.com/EpochModTeam/Epoch into experimental
This commit is contained in:
commit
fb0a15aa99
@ -1,5 +1,6 @@
|
||||
// init
|
||||
_forceBloodRise = false;
|
||||
_forceBloodDrop = false;
|
||||
_forceFatigue = false;
|
||||
_allowBloodDrop = false;
|
||||
_forceStaminaDrop = false;
|
||||
@ -88,9 +89,13 @@ EPOCH_currentTargetMode = _currentTargetMode;
|
||||
_curCtrl ctrlSetText _ctrlText;
|
||||
_critical = (_criticalHigh || _criticalLow);
|
||||
if (_critical) then {
|
||||
if ((_criticalAttributes param [0,""]) isEqualType []) then {
|
||||
_criticalAttributes = _criticalAttributes select _criticalLow;
|
||||
};
|
||||
_forceUpdate = "forceUpdate" in _criticalAttributes;
|
||||
_forceFatigue = "forceFatigue" in _criticalAttributes;
|
||||
_forceBloodRise = "forceBloodRise" in _criticalAttributes;
|
||||
_forceBloodDrop = "forceBloodDrop" in _criticalAttributes;
|
||||
[_curCtrl,0.55] call epoch_2DCtrlHeartbeat;
|
||||
};
|
||||
// todo make this reversable or even limited to a color range.
|
||||
@ -124,9 +129,9 @@ if (_forceFatigue) then {
|
||||
if (_forceBloodRise) then {
|
||||
_playerBloodP = [_playerBloodPKey, 0.05, _playerBloodPMax , _playerBloodPMin] call EPOCH_fnc_setVariableLimited;
|
||||
} else {
|
||||
if (_allowBloodDrop) then {
|
||||
// allow player to bleed out
|
||||
_lowerBPlimit = [100,0] select (isBleeding player);
|
||||
if (_allowBloodDrop || _forceBloodDrop) then {
|
||||
// allow player to bleed out or die from hypothermia
|
||||
_lowerBPlimit = [100,0] select (isBleeding player || _forceBloodDrop);
|
||||
_playerBloodP = [_playerBloodPKey, -1, _playerBloodPMax , _lowerBPlimit] call EPOCH_fnc_setVariableLimited;
|
||||
};
|
||||
};
|
||||
@ -387,7 +392,7 @@ if(getNumber(('CfgEpochClient' call EPOCH_returnConfig) >> 'mapOnZoomSetMarkerSi
|
||||
private "_markerString";
|
||||
_markerString = toArray _zoomMarker;
|
||||
_markerString resize 6;
|
||||
if (toString _markerString == "EPOCH_") then {
|
||||
if (toString _markerString == "EPOCH_") then {
|
||||
switch(true)do{
|
||||
case ( (_mapScale >= 0.95) && (_mapScale <= 1) ): {
|
||||
_zoomMarker setMarkerSizeLocal [0.666,0.666];
|
||||
|
@ -140,8 +140,6 @@ if ((getFatigue player) >= 0.7 && _airTemp > 100) then {
|
||||
_maxTemp = _airTemp;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// toxic fever and immunity increase
|
||||
_playerToxicity = missionNamespace getVariable [_playerToxicityKey, _playerToxicityDefault];
|
||||
// _playerImmunity = missionNamespace getVariable [_playerImmunityKey, _playerImmunityDefault];
|
||||
@ -202,11 +200,8 @@ _playerThirst = [_playerThirstKey,-_thirstlossRate,_playerThirstMax,_playerThirs
|
||||
_playerNuisance = [_playerNuisanceKey,-1,_playerNuisanceMax,_playerNuisanceMin] call EPOCH_fnc_setVariableLimited;
|
||||
|
||||
// Radiation Handler
|
||||
if (_radsLevel == 0) then {
|
||||
// only lower rads if player has taken medicine and it no longer in a radiation zone.
|
||||
_playerRadiation = [_playerRadiationKey,-0.01,_playerRadiationMax,_playerRadiationMin] call EPOCH_fnc_setVariableLimited;
|
||||
} else {
|
||||
// allow increase rads based on radiation levels and consumed rads
|
||||
if (_radsLevel > 0) then {
|
||||
// increase rads based on radiation levels
|
||||
_playerRadiation = [_playerRadiationKey,_radsLevel,_playerRadiationMax,_playerRadiationMin] call EPOCH_fnc_setVariableLimited;
|
||||
};
|
||||
|
||||
|
@ -125,11 +125,11 @@ class CfgEpochClient
|
||||
{{"Oxygen","getPlayerOxygenRemaining","",{},{1,0,2,2,1,0.55}},"topRight","x\addons\a3_epoch_code\Data\UI\oxygen_ca.paa"},
|
||||
{"Hunger","topRight","x\addons\a3_epoch_code\Data\UI\hunger_ca.paa",{"forceBloodRise"}},
|
||||
{"Thirst","topRight","x\addons\a3_epoch_code\Data\UI\thirst_ca.paa",{"forceBloodRise"}},
|
||||
{"Temp","topRight",{"x\addons\a3_epoch_code\Data\UI\hot_ca.paa","x\addons\a3_epoch_code\Data\UI\cold_ca.paa"},{"forceFatigue"}},
|
||||
{"Toxicity","topRight","x\addons\a3_epoch_code\Data\UI\hazzard_ca.paa"},
|
||||
{"Temp","topRight",{"x\addons\a3_epoch_code\Data\UI\hot_ca.paa","x\addons\a3_epoch_code\Data\UI\cold_ca.paa"},{{"forceFatigue","forceBloodRise"},{"forceFatigue","forceBloodDrop"}}},
|
||||
{"Toxicity","topRight","x\addons\a3_epoch_code\Data\UI\hazzard_ca.paa",{"forceBloodRise"}},
|
||||
{"Alcohol","topRight","x\addons\a3_epoch_code\Data\UI\drunk_ca.paa"},
|
||||
{"Soiled","topRight","x\addons\a3_epoch_code\Data\UI\soiled_ca.paa"},
|
||||
{"Radiation","topRight","x\addons\a3_epoch_code\Data\UI\rads_ca.paa"},
|
||||
{"Radiation","topRight","x\addons\a3_epoch_code\Data\UI\rads_ca.paa",{"forceBloodRise"}},
|
||||
{{"HitPoints","getPlayerHitPointDamage","HitLegs"},"topRight","x\addons\a3_epoch_code\Data\UI\broken_ca.paa"}
|
||||
};
|
||||
defineCommunityStats[] = {
|
||||
|
@ -13,7 +13,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_savePlayer.sqf
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_Svars","_allowSave","_appearance","_cIndex","_dmg","_extraLoadoutInfo","_group","_hitpoints","_loadout","_medical","_playerUID","_pos","_return","_return2","_revive","_schemaVersion","_server_vars","_stats","_vehiclePlyr"];
|
||||
private ["_Svars","_allowSave","_appearance","_bloodPIndex","_bloodPressure","_group","_hitpoints","_loadout","_medical","_playerUID","_pos","_return","_return2","_revive","_schemaVersion","_server_vars","_stats","_vehiclePlyr"];
|
||||
//[[[end]]]
|
||||
params [["_player",objNull], ["_vars",[]] ];
|
||||
|
||||
@ -48,7 +48,7 @@ if (_allowSave) then{
|
||||
private _serverOnly = ["Crypto"];
|
||||
_Svars = _player getVariable["VARS", call EPOCH_defaultVars_SEPXVar];
|
||||
{
|
||||
_cIndex = EPOCH_customVars find _x;
|
||||
private _cIndex = EPOCH_customVars find _x;
|
||||
if (_cIndex != -1) then{
|
||||
_vars set[_cIndex, (_Svars select _cIndex)];
|
||||
};
|
||||
@ -86,7 +86,7 @@ if (_allowSave) then{
|
||||
// build medical array
|
||||
_medical = [getBleedingRemaining _player, 0, getOxygenRemaining _player, damage _player, _hitpoints];
|
||||
|
||||
// appearance now handled with getUnitLoadout, typeof is still need to determine players class.
|
||||
// appearance now handled with getUnitLoadout, typeof is still needed to determine players class.
|
||||
_appearance = ["", "", "", "", currentWeapon _player, typeOf _player];
|
||||
|
||||
// new save format
|
||||
@ -102,9 +102,12 @@ if (_allowSave) then{
|
||||
_stats = _player getVariable["COMMUNITY_STATS", EPOCH_defaultStatVars];
|
||||
_return2 = ["CommunityStats", _playerUID, EPOCH_expiresCommunityStats, [_stats]] call EPOCH_fnc_server_hiveSETEX;
|
||||
|
||||
// kill player if blood pressure >= 180
|
||||
if (_vars select 12 >= 180) then {
|
||||
// blood pressure must stay within 11-179 range
|
||||
_bloodPIndex = EPOCH_customVars find "BloodP";
|
||||
_bloodPressure = _vars param [_bloodPIndex,100];
|
||||
if (_bloodPressure >= 180 || _bloodPressure <= 10) then {
|
||||
_player setDamage 1;
|
||||
["PlayerStats", _playerUID, 0, 1] call EPOCH_fnc_server_hiveSETBIT;
|
||||
} else {
|
||||
// set player alive bit
|
||||
["PlayerStats", _playerUID, 0, 0] call EPOCH_fnc_server_hiveSETBIT;
|
||||
|
Loading…
Reference in New Issue
Block a user