mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
maxBuildingHeight now var as it is used oneachframe
This commit is contained in:
parent
078014cd72
commit
fd5f4cb1f9
@ -24,11 +24,9 @@ if (EPOCH_velTransform) then {
|
||||
EPOCH_target setvelocitytransformation[_pos1, (EP_velocityTransformation select 0), _vel1, (EP_velocityTransformation select 1), _dir1, (EP_velocityTransformation select 2), _up1, (EP_velocityTransformation select 3), _interval];
|
||||
} else {
|
||||
_pos2 = player modelToWorld[EPOCH_X_OFFSET, EPOCH_Y_OFFSET, EPOCH_Z_OFFSET];
|
||||
_CfgEpochClient = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_maxBuildingHeight = getNumber(_CfgEpochClient >> "maxBuildingHeight");
|
||||
if !(_maxBuildingHeight == 0) then {
|
||||
if (_pos2 select 2 > _maxBuildingHeight) then {
|
||||
_pos2 set[2, _maxBuildingHeight];
|
||||
if !(EPOCH_maxBuildingHeight == 0) then {
|
||||
if (_pos2 select 2 > EPOCH_maxBuildingHeight) then {
|
||||
_pos2 set[2, EPOCH_maxBuildingHeight];
|
||||
};
|
||||
};
|
||||
if ((_pos2 select 2) < 0) then { _pos2 set[2, 0] };
|
||||
|
@ -22,7 +22,7 @@
|
||||
NOTHING
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_maxBuildingHeight","_CfgEpochClient","_maxHeight","_allowedSnapObjects","_allowedSnapPoints","_cfgBaseBuilding","_class","_create","_currentTarget","_dir2","_direction","_disallowed","_distance","_distanceMod","_distanceNear","_energyCost","_isSnap","_lastCheckTime","_nearestObject","_nearestObjectRaw","_newObj","_objSlot","_objType","_object","_oemType","_offset","_onContactEH","_pOffset","_playerdistance","_pos2","_prevSnapDistance","_previousDistanceNear","_rejectMove","_removeParts","_return","_simulClassConfig","_snapArrayPara","_snapArrayPerp","_snapDistance","_snapObjects","_snapPointsPara","_snapPointsPerp","_snapPos","_snapPosition","_snapType","_textureSlot","_up2","_vel2","_velocityTransformation","_worldspace"];
|
||||
private ["_allowedSnapObjects","_allowedSnapPoints","_cfgBaseBuilding","_class","_create","_currentTarget","_dir2","_direction","_disallowed","_distance","_distanceMod","_distanceNear","_energyCost","_isSnap","_lastCheckTime","_maxHeight","_nearestObject","_nearestObjectRaw","_newObj","_objSlot","_objType","_object","_oemType","_offset","_onContactEH","_pOffset","_playerdistance","_pos2","_prevSnapDistance","_previousDistanceNear","_rejectMove","_return","_simulClassConfig","_snapArrayPara","_snapArrayPerp","_snapDistance","_snapObjects","_snapPointsPara","_snapPointsPerp","_snapPos","_snapPosition","_snapType","_textureSlot","_up2","_vel2","_velocityTransformation","_worldspace"];
|
||||
//[[[end]]]
|
||||
|
||||
if !(isNil "EPOCH_simulSwap_Lock") exitWith{};
|
||||
@ -63,10 +63,8 @@ if (isText(_simulClassConfig)) then {
|
||||
if (_maxHeight == 0) then {
|
||||
_maxHeight = 500;
|
||||
};
|
||||
_CfgEpochClient = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_maxBuildingHeight = getNumber(_CfgEpochClient >> "maxBuildingHeight");
|
||||
if !(_maxBuildingHeight == 0) then {
|
||||
_maxHeight = _maxHeight min _maxBuildingHeight;
|
||||
if !(EPOCH_maxBuildingHeight == 0) then {
|
||||
_maxHeight = _maxHeight min EPOCH_maxBuildingHeight;
|
||||
};
|
||||
if (isArray(_snapObjects)) then {
|
||||
_allowedSnapObjects = getArray(_snapObjects);
|
||||
|
@ -23,7 +23,7 @@
|
||||
NOTHING
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_snapped","_EPOCH_1","_EPOCH_2","_allowedSnapObjects","_allowedSnapPoints","_arr_snapPoints","_baselineSnapPos","_cfgBaseBuilding","_class","_currentOffSet","_currentPos","_currentTarget","_dir2","_direction","_distance","_energyCost","_ins","_isSnap","_lastCheckTime","_maxHeight","_maxSnapDistance","_nearestObject","_nearestObjects","_numberOfContacts","_objSlot","_objType","_offSet","_offsetZPos","_pOffset","_pos1","_pos1_snap","_pos2","_pos2ATL","_pos2_snap","_pos_snapObj","_rejectMove","_simulClass","_snapChecks","_snapConfig","_snapDistance","_snapPointsPara","_snapPointsPerp","_snapPos","_snapPos1","_snapPosition","_snapType","_stabilityCheck","_up2","_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","_newDirAndUp","_numberOfContacts","_objSlot","_objType","_offSet","_offsetZPos","_pOffset","_pos1_snap","_pos2","_pos2ATL","_pos2_snap","_pos_snapObj","_rejectMove","_simulClass","_snapChecks","_snapConfig","_snapDistance","_snapPointsPara","_snapPointsPerp","_snapPos","_snapPos1","_snapPosition","_snapType","_snapped","_stabilityCheck","_worldspace"];
|
||||
//[[[end]]]
|
||||
if !(isNil "EPOCH_simulSwap_Lock") exitWith{};
|
||||
|
||||
@ -71,10 +71,8 @@ if (_class != "") then {
|
||||
};
|
||||
};
|
||||
|
||||
_CfgEpochClient = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_maxBuildingHeight = getNumber(_CfgEpochClient >> "maxBuildingHeight");
|
||||
if !(_maxBuildingHeight == 0) then {
|
||||
_maxHeight = _maxHeight min _maxBuildingHeight;
|
||||
if !(EPOCH_maxBuildingHeight == 0) then {
|
||||
_maxHeight = _maxHeight min EPOCH_maxBuildingHeight;
|
||||
};
|
||||
|
||||
_objSlot = _object getVariable["BUILD_SLOT", -1];
|
||||
|
@ -66,6 +66,8 @@ rmx_var_dynamicHUD_groupCTRL = [];
|
||||
EPOCH_keysActionPressed = false; //prevents EH spam
|
||||
0 call EPOCH_clientKeyMap;
|
||||
|
||||
EPOCH_maxBuildingHeight = getNumber(_CfgEpochClient >> "maxBuildingHeight");
|
||||
|
||||
//ON INIT and RESPAWN
|
||||
call EPOCH_clientInit;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user