mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Slightly speed up a switch model check
Check once instead of twice
This commit is contained in:
@@ -150,7 +150,8 @@ if (!isNil "_newBackpackType" && {_newBackpackType != ""}) then {
|
||||
if (gear_done) then {sleep 0.001;};
|
||||
_countr = 0;
|
||||
{
|
||||
if (typeName _x != "STRING") then {
|
||||
_isArray = typeName _x == "ARRAY";
|
||||
if (_isArray) then {
|
||||
_isWeapon = isClass (configFile >> "CfgWeapons" >> (_x select 0));
|
||||
_isMagazine = isClass (configFile >> "CfgMagazines" >> (_x select 0));
|
||||
} else {
|
||||
@@ -159,7 +160,7 @@ if (!isNil "_newBackpackType" && {_newBackpackType != ""}) then {
|
||||
};
|
||||
if (!_isWeapon || (_isWeapon && _isMagazine)) then {
|
||||
_countr = _countr + 1;
|
||||
if (typeName _x != "STRING") then {
|
||||
if (_isArray) then {
|
||||
if (_x select 1 > 0) then { //Javelin rockets in BP returns ["Javelin", 0],"Javelin". Dupe on relog -> # real Javs + 1 per skin change
|
||||
dayz_myBackpack addMagazineCargoGlobal [_x select 0, 1];
|
||||
_idc = 4999 + _countr;
|
||||
|
||||
@@ -536,7 +536,6 @@ if (isNil "DZE_SelfTransfuse") then {DZE_SelfTransfuse = false;};
|
||||
if (isNil "DZE_selfTransfuse_Values") then {DZE_selfTransfuse_Values = [12000,15,120];};
|
||||
if (isNil "DZE_PlotPole") then {DZE_PlotPole = [30,45];};
|
||||
DZE_maintainRange = ((DZE_PlotPole select 0)+20);
|
||||
if (isNil "DZE_slowZombies") then {DZE_slowZombies = false;};
|
||||
|
||||
if (isServer) then {
|
||||
dayz_serverPUIDArray = [];
|
||||
|
||||
@@ -1046,7 +1046,6 @@ class FSM
|
||||
"_myDest = [ _agent modelToWorld [0,0,0]];" \n
|
||||
"_agent setVariable [""myDest"",(_agent modelToWorld [0,0,0])];" \n
|
||||
"" \n
|
||||
"//_adjustSpeed = if (DZE_slowZombies) then {2} else {_agent getVariable [""speedLimit"", 3]};" \n
|
||||
"_speedMin = DZE_ZombieSpeed select 0;" \n
|
||||
"_speedMax = DZE_ZombieSpeed select 1;" \n
|
||||
"_adjustSpeed = if (_speedMin == _speedMax && ((_speedMin > 0) && (_speedMax > 0))) then {_speedMin} else {_agent getVariable [""speedLimit"", 3]};" \n
|
||||
|
||||
Reference in New Issue
Block a user