mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Add weight for backpacks
This commit is contained in:
@@ -64,8 +64,7 @@ while {true} do {
|
|||||||
|
|
||||||
_posATL = (getPosATL player) select 2;
|
_posATL = (getPosATL player) select 2;
|
||||||
|
|
||||||
|
if ((vehicle player == player) && {_posATL < 100}) then {
|
||||||
if((vehicle player == player) && (_posATL < 100)) then {
|
|
||||||
R3F_TIRED_Accumulator = R3F_TIRED_Accumulator
|
R3F_TIRED_Accumulator = R3F_TIRED_Accumulator
|
||||||
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_vitesse_de_mon_joueur * R3F_TIRED_Ratio_Position * R3F_TIRED_WEIGHT_SPEED_RATIO*R3F_TIRED_Ratio_Overweight)
|
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_vitesse_de_mon_joueur * R3F_TIRED_Ratio_Position * R3F_TIRED_WEIGHT_SPEED_RATIO*R3F_TIRED_Ratio_Overweight)
|
||||||
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_coeff_mon_elevation_en_z * R3F_TIRED_WEIGHT_LEVEL2);
|
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_coeff_mon_elevation_en_z * R3F_TIRED_WEIGHT_LEVEL2);
|
||||||
@@ -94,8 +93,8 @@ while {true} do {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (R3F_TIRED_GLOBAL_TIRING
|
if (R3F_TIRED_GLOBAL_TIRING
|
||||||
&& R3F_TIRED_vitesse_de_mon_joueur > 4
|
&& {R3F_TIRED_vitesse_de_mon_joueur > 4}
|
||||||
&& R3F_TIRED_Ratio_Recovery > R3F_TIRED_RATIO_RECOVERING
|
&& {R3F_TIRED_Ratio_Recovery > R3F_TIRED_RATIO_RECOVERING}
|
||||||
) then {
|
) then {
|
||||||
R3F_TIRED_Counter_Time= R3F_TIRED_Counter_Time + 1;
|
R3F_TIRED_Counter_Time= R3F_TIRED_Counter_Time + 1;
|
||||||
};
|
};
|
||||||
@@ -126,4 +125,3 @@ while {true} do {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//[_voil] call R3F_TIRED_FNCT_Effect_Off;
|
//[_voil] call R3F_TIRED_FNCT_Effect_Off;
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ FNC_PrintToRPT = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
R3F_TIRED_FNCT_Voile_Noir = {
|
R3F_TIRED_FNCT_Voile_Noir = {
|
||||||
|
private "_level";
|
||||||
|
|
||||||
_level = _this select 0;
|
_level = _this select 0;
|
||||||
if(_level < R3F_TIRED_SHORTNESS_THRESHOLD ) then{
|
if(_level < R3F_TIRED_SHORTNESS_THRESHOLD ) then{
|
||||||
playSound "heartbeat_1";
|
playSound "heartbeat_1";
|
||||||
|
|||||||
@@ -9,29 +9,31 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#include "R3F_WEIGHT_Configuration.sqf"
|
#include "R3F_WEIGHT_Configuration.sqf"
|
||||||
R3F_WEIGHT_FNCT_MakeSingleArray = {
|
R3F_WEIGHT_FNCT_MakeSingleArray = {
|
||||||
private ["_arr_i","_arr_n", "_arr", "_n", "_nb", "_x"];
|
private ["_arr_i","_arr_n", "_arr", "_n", "_nb"];
|
||||||
|
|
||||||
_arr_i = (_this select 0) select 0;
|
_arr_i = (_this select 0) select 0;
|
||||||
_arr_n = (_this select 0) select 1;
|
_arr_n = (_this select 0) select 1;
|
||||||
|
|
||||||
_arr = [];
|
_arr = [];
|
||||||
|
|
||||||
_n = 0;
|
_n = 0;
|
||||||
{
|
{
|
||||||
_nb = _arr_n select _n;
|
_nb = _arr_n select _n;
|
||||||
for [{_i = 0}, {_i < _nb}, {_i = _i + 1}] do{
|
|
||||||
_arr = _arr + [_x];
|
for "_i" from 1 to _nb do{
|
||||||
|
_arr set [count _arr,_x];
|
||||||
};
|
};
|
||||||
_n = _n + 1;
|
_n = _n + 1;
|
||||||
|
|
||||||
}count _arr_i;
|
} count _arr_i;
|
||||||
|
|
||||||
_arr;
|
_arr;
|
||||||
};
|
};
|
||||||
|
|
||||||
R3F_WEIGHT_FNCT_GetItemWeight = {
|
R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||||
private ["_arr_class", "_total_weight", "_weight"];
|
private ["_arr_class", "_total_weight", "_weight","_bagpack","_type"];
|
||||||
|
|
||||||
_arr_class = (_this select 0) + (_this select 1);
|
_arr_class = (_this select 0) + (_this select 1);
|
||||||
if (dayz_onBack != "" && count _this > 2) then {
|
if (dayz_onBack != "" && {count _this > 2}) then {
|
||||||
_arr_class set [count _arr_class, dayz_onBack];
|
_arr_class set [count _arr_class, dayz_onBack];
|
||||||
};
|
};
|
||||||
_total_weight = 0;
|
_total_weight = 0;
|
||||||
@@ -56,11 +58,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
|||||||
_total_weight = _total_weight + _weight;
|
_total_weight = _total_weight + _weight;
|
||||||
} else {
|
} else {
|
||||||
// log only if not found
|
// log only if not found
|
||||||
//diag_log format["No R3F weight config for: %1", _x];
|
diag_log format["No R3F weight config for: %1", _x];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}count _arr_class;
|
}count _arr_class;
|
||||||
|
|
||||||
|
_bagpack = unitBackpack player;
|
||||||
|
if (!isNull _bagpack) then {
|
||||||
|
_type = typeof _bagpack;
|
||||||
|
if (isclass(CfgWeight >> "Backpacks" >> _type)) then {
|
||||||
|
_weight = getNumber(CfgWeight >> "Backpacks" >> _type >> "weight");
|
||||||
|
_total_weight = _total_weight + _weight;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
_total_weight;
|
_total_weight;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -81,4 +93,3 @@ R3F_WEIGHT_FNCT_GetWeight = {
|
|||||||
};
|
};
|
||||||
_return;
|
_return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user