From 63fc23b8cb2ed5b0a40037d0e79545f32f6c5dfe Mon Sep 17 00:00:00 2001 From: vbawol Date: Thu, 12 Oct 2017 07:04:29 -0500 Subject: [PATCH] fix snap checks --- Sources/epoch_code/compile/both/EPOCH_weightedArray.sqf | 9 --------- Sources/epoch_code/compile/building/EPOCH_staticMove.sqf | 5 +++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Sources/epoch_code/compile/both/EPOCH_weightedArray.sqf b/Sources/epoch_code/compile/both/EPOCH_weightedArray.sqf index c2052cde..8c921e5f 100644 --- a/Sources/epoch_code/compile/both/EPOCH_weightedArray.sqf +++ b/Sources/epoch_code/compile/both/EPOCH_weightedArray.sqf @@ -34,10 +34,6 @@ if(_return isEqualTo[]) then { if(_x isEqualType []) then { _x params ["_tname","_tqty",["_extraLogicRaw", [] ]]; _tname params ["_item",["_itemType","NA"]]; - // if (_configName isEqualTo "CfgMainTable") then {_itemType = "CfgLootTable"}; - if (_debug) then { - diag_log format["DEBUG: _tname: _item %1 _itemType: %2",_item,_itemType]; - }; _allow = true; if !(_extraLogicRaw isEqualTo[]) then { _extraLogicRaw params [["_extraLogicType",""],["_extraLogicName",""],["_extraLogicCond",""],["_extraLogicData",""]]; @@ -72,11 +68,6 @@ if(_return isEqualTo[]) then { case "weapon": { _allow = isClass (configFile >> "CfgWeapons" >> _item); }; - /* - case "CfgLootTable": { - _allow = isClass (missionConfigFile >> "CfgLootTable" >> _item); - }; - */ }; }; // add to loot table diff --git a/Sources/epoch_code/compile/building/EPOCH_staticMove.sqf b/Sources/epoch_code/compile/building/EPOCH_staticMove.sqf index 3edf4050..b6d3f310 100644 --- a/Sources/epoch_code/compile/building/EPOCH_staticMove.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_staticMove.sqf @@ -23,7 +23,7 @@ NOTHING */ //[[[cog import generate_private_arrays ]]] -private ["_AnchorPos","_EPOCH_1","_EPOCH_2","_MoveObject","_Snapdirection","_allowedSnapObjects","_allowedSnapPoints","_arr_snapPoints","_baselineSnapPos","_cfgBaseBuilding","_class","_currentOffSet","_currentPos","_currentTarget","_currentTargetAttachedTo","_dir2","_direction","_distance","_energyCost","_helper","_ins","_isSnap","_lastCheckTime","_maxHeight","_maxSnapDistance","_nearestObject","_nearestObjects","_newDir","_newDirAndUp","_numberOfContacts","_objSlot","_objType","_offSet","_offsetZPos","_pOffset","_playerEnergy","_playerEnergyKeyFinal","_pos1_snap","_pos2","_pos2ATL","_pos2_snap","_pos_snapObj","_rejectMove","_simulClass","_snapChecks","_snapConfig","_snapDistance","_snapMemoryPoint","_snapPointsPara","_snapPointsPerp","_snapPos","_snapPos1","_snapPosition","_snapType","_snapped","_stabilityCheck","_tempClass","_tiltFB","_tiltLR","_vectorDir","_vectorUp","_worldspace"]; +private ["_AnchorPos","_EPOCH_1","_EPOCH_2","_MoveObject","_Snapdirection","_allowedSnapObjects","_allowedSnapPoints","_arr_snapPoints","_baselineSnapPos","_cfgBaseBuilding","_class","_currentOffSet","_currentPos","_currentTarget","_currentTargetAttachedTo","_dir2","_direction","_distance","_energyCost","_helper","_ins","_isSnap","_lastCheckTime","_maxHeight","_maxSnapDistance","_nearestObject","_nearestObjects","_newDir","_newDirAndUp","_numberOfContacts","_objSlot","_objType","_offSet","_offsetZPos","_pOffset","_playerEnergy","_playerEnergyKeyFinal","_pos1_snap","_pos2","_pos2ATL","_pos2_snap","_pos_snapObj","_rejectMove","_simulClass","_snapChecks","_snapConfig","_snapDistance","_snapMemoryPoint","_snapPointsPara","_snapPointsPerp","_snapPos","_snapPos1","_snapPosition","_snapType","_snapped","_stabilityCheck","_staticClass","_tempClass","_tiltFB","_tiltLR","_vectorDir","_vectorUp","_worldspace"]; //[[[end]]] if !(isNil "EPOCH_simulSwap_Lock") exitWith{}; @@ -57,7 +57,8 @@ if (_class != "") then { _energyCost = getNumber(_cfgBaseBuilding >> _objType >> "energyCost"); _maxHeight = getNumber(_cfgBaseBuilding >> _objType >> "maxHeight"); _simulClass = getText(_cfgBaseBuilding >> _objType >> "simulClass"); - _snapChecks = getArray(("CfgSnapChecks" call EPOCH_returnConfig) >> _objType >> "nails"); + _staticClass = getText(_cfgBaseBuilding >> _objType >> "staticClass"); + _snapChecks = getArray(("CfgSnapChecks" call EPOCH_returnConfig) >> _staticClass >> "nails"); _allowedSnapPoints = getArray(_cfgBaseBuilding >> _class >> "allowedSnapPoints"); _allowedSnapObjects = getArray(_cfgBaseBuilding >> _class >> "allowedSnapObjects");