mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
disconnect save first 20 mags minus melee ammo
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
private ["_empty","_playerwasNearby","_character","_magazines","_force","_characterID","_charPos","_isInVehicle","_timeSince","_humanity","_debug","_distance","_isNewMed","_isNewPos","_isNewGear","_playerPos","_playerGear","_playerBackp","_medical","_distanceFoot","_lastPos","_backpack","_kills","_killsB","_killsH","_headShots","_lastTime","_timeGross","_timeLeft","_currentWpn","_currentAnim","_config","_onLadder","_isTerminal","_currentModel","_modelChk","_muzzles","_temp","_currentState","_array","_key","_pos","_forceGear"];
|
private ["_empty","_playerwasNearby","_character","_magazines","_force","_characterID","_charPos","_isInVehicle","_timeSince","_humanity","_debug","_distance","_isNewMed","_isNewPos","_isNewGear","_playerPos","_playerGear","_playerBackp","_medical","_distanceFoot","_lastPos","_backpack","_kills","_killsB","_killsH","_headShots","_lastTime","_timeGross","_timeLeft","_currentWpn","_currentAnim","_config","_onLadder","_isTerminal","_currentModel","_modelChk","_muzzles","_temp","_currentState","_array","_key","_pos","_forceGear","_friendlies"];
|
||||||
|
|
||||||
_character = _this select 0;
|
_character = _this select 0;
|
||||||
|
_magazines = _this select 1;
|
||||||
// prevent saving more than 20 magazine items
|
|
||||||
_magazines = [(_this select 1),20] call array_reduceSize;
|
|
||||||
|
|
||||||
//_force = _this select 2;
|
//_force = _this select 2;
|
||||||
_forceGear = _this select 3;
|
_forceGear = _this select 3;
|
||||||
|
|||||||
@@ -55,9 +55,10 @@ array_reduceSizeReverse = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
array_reduceSize = {
|
array_reduceSize = {
|
||||||
private["_array","_count","_num","_newarray","_startnum","_index"];
|
private["_array1","_array","_count","_num","_newarray","_startnum","_index"];
|
||||||
_array = _this select 0;
|
_array1 = _this select 0;
|
||||||
diag_log format ["array_reduceSize IN: %1", _array];
|
_array = _array1 - ["Hatchet_Swing","Machete_Swing","Fishing_Swing","sledge_swing","crowbar_swing"];
|
||||||
|
//diag_log format ["array_reduceSize IN: %1", _array];
|
||||||
_newarray = [];
|
_newarray = [];
|
||||||
_count = _this select 1;
|
_count = _this select 1;
|
||||||
_num = count _array;
|
_num = count _array;
|
||||||
@@ -69,7 +70,7 @@ array_reduceSize = {
|
|||||||
};
|
};
|
||||||
_array = _newarray;
|
_array = _newarray;
|
||||||
};
|
};
|
||||||
diag_log format ["array_reduceSize OUT: %1", _array];
|
//diag_log format ["array_reduceSize OUT: %1", _array];
|
||||||
_array
|
_array
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user