mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
snap optimization for large bases
This commit is contained in:
@@ -14,6 +14,7 @@ class SnapBuilding {
|
|||||||
"BagFenceRound_DZ",
|
"BagFenceRound_DZ",
|
||||||
"Fort_RazorWire"
|
"Fort_RazorWire"
|
||||||
};
|
};
|
||||||
|
radius = 5;
|
||||||
};
|
};
|
||||||
//snap points
|
//snap points
|
||||||
class Land_HBarrier5Preview: Barrier{ //fix for broken offsets in ghost
|
class Land_HBarrier5Preview: Barrier{ //fix for broken offsets in ghost
|
||||||
@@ -122,6 +123,7 @@ class SnapBuilding {
|
|||||||
"CinderWallDoorSmall_DZ",
|
"CinderWallDoorSmall_DZ",
|
||||||
"MetalFloor_DZ"
|
"MetalFloor_DZ"
|
||||||
};
|
};
|
||||||
|
radius = 5;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WoodFloorQuarter_Preview_DZ: FloorsWallsStairs { //fix for broken offsets in ghost
|
class WoodFloorQuarter_Preview_DZ: FloorsWallsStairs { //fix for broken offsets in ghost
|
||||||
@@ -171,6 +173,7 @@ class SnapBuilding {
|
|||||||
{-2.45,0,0.130,"Left"},
|
{-2.45,0,0.130,"Left"},
|
||||||
{2.45,0,0.130,"Right"}
|
{2.45,0,0.130,"Right"}
|
||||||
};
|
};
|
||||||
|
radius = 10;
|
||||||
};
|
};
|
||||||
class WoodFloor_DZ: WoodFloor_Preview_DZ{};
|
class WoodFloor_DZ: WoodFloor_Preview_DZ{};
|
||||||
|
|
||||||
@@ -243,6 +246,7 @@ class SnapBuilding {
|
|||||||
{2.752, 0, 1.5,"Right"},
|
{2.752, 0, 1.5,"Right"},
|
||||||
{0, 0, 3.37042,"Top"}
|
{0, 0, 3.37042,"Top"}
|
||||||
};
|
};
|
||||||
|
radius = 5;
|
||||||
};
|
};
|
||||||
class CinderWall_Preview_DZ: Cinder_DZE {};
|
class CinderWall_Preview_DZ: Cinder_DZE {};
|
||||||
class CinderWallDoorway_Preview_DZ: Cinder_DZE {};
|
class CinderWallDoorway_Preview_DZ: Cinder_DZE {};
|
||||||
@@ -279,6 +283,7 @@ class SnapBuilding {
|
|||||||
{-2.64, 0, 0.009,"Left"},
|
{-2.64, 0, 0.009,"Left"},
|
||||||
{2.64, 0, 0.009,"Right"}
|
{2.64, 0, 0.009,"Right"}
|
||||||
};
|
};
|
||||||
|
radius = 10;
|
||||||
};
|
};
|
||||||
class MetalFloor_DZ: FloorsWallsStairs{
|
class MetalFloor_DZ: FloorsWallsStairs{
|
||||||
points[] = {
|
points[] = {
|
||||||
@@ -288,6 +293,7 @@ class SnapBuilding {
|
|||||||
{-2.64, 0, 0.15,"Left"},
|
{-2.64, 0, 0.15,"Left"},
|
||||||
{2.64, 0, 0.15,"Right"}
|
{2.64, 0, 0.15,"Right"}
|
||||||
};
|
};
|
||||||
|
radius = 10;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -296,6 +302,7 @@ class SnapBuilding {
|
|||||||
snapTo[] = {
|
snapTo[] = {
|
||||||
"WoodCrate_DZ"
|
"WoodCrate_DZ"
|
||||||
};
|
};
|
||||||
|
radius = 5;
|
||||||
points[] = {
|
points[] = {
|
||||||
{0,0,0,"Pivot"},
|
{0,0,0,"Pivot"},
|
||||||
{0,-0.47,0,"Back"},
|
{0,-0.47,0,"Back"},
|
||||||
@@ -310,6 +317,7 @@ class SnapBuilding {
|
|||||||
snapTo[] = {
|
snapTo[] = {
|
||||||
"MetalPanel_DZ"
|
"MetalPanel_DZ"
|
||||||
};
|
};
|
||||||
|
radius = 5;
|
||||||
points[] = {
|
points[] = {
|
||||||
{0,0,0,"Pivot"},
|
{0,0,0,"Pivot"},
|
||||||
{-1.5,0,0,"Left"},
|
{-1.5,0,0,"Left"},
|
||||||
@@ -321,6 +329,7 @@ class SnapBuilding {
|
|||||||
snapTo[] = {
|
snapTo[] = {
|
||||||
"MetalGate_DZ"
|
"MetalGate_DZ"
|
||||||
};
|
};
|
||||||
|
radius = 5;
|
||||||
points[] = {
|
points[] = {
|
||||||
{0,0,0,"Pivot"},
|
{0,0,0,"Pivot"},
|
||||||
{-4.1,0,0,"Left"}
|
{-4.1,0,0,"Left"}
|
||||||
@@ -331,6 +340,7 @@ class SnapBuilding {
|
|||||||
snapTo[] = {
|
snapTo[] = {
|
||||||
"StickFence_DZ"
|
"StickFence_DZ"
|
||||||
};
|
};
|
||||||
|
radius = 5;
|
||||||
points[] = {
|
points[] = {
|
||||||
{0,0,0,"Pivot"},
|
{0,0,0,"Pivot"},
|
||||||
{-2.95,0,0.3,"Left"},
|
{-2.95,0,0.3,"Left"},
|
||||||
@@ -342,6 +352,7 @@ class SnapBuilding {
|
|||||||
snapTo[] = {
|
snapTo[] = {
|
||||||
"Fence_corrugated_DZ"
|
"Fence_corrugated_DZ"
|
||||||
};
|
};
|
||||||
|
radius = 5;
|
||||||
points[] = {
|
points[] = {
|
||||||
{0,0,0,"Pivot"},
|
{0,0,0,"Pivot"},
|
||||||
{-1.95,0,0.88,"Left"},
|
{-1.95,0,0.88,"Left"},
|
||||||
@@ -353,6 +364,7 @@ class SnapBuilding {
|
|||||||
snapTo[] = {
|
snapTo[] = {
|
||||||
"WoodRamp_DZ"
|
"WoodRamp_DZ"
|
||||||
};
|
};
|
||||||
|
radius = 5;
|
||||||
points[] = {
|
points[] = {
|
||||||
{0,0,0,"Pivot"},
|
{0,0,0,"Pivot"},
|
||||||
{0.65,-1.7,1.2,"Back"},
|
{0.65,-1.7,1.2,"Back"},
|
||||||
@@ -366,6 +378,7 @@ class SnapBuilding {
|
|||||||
snapTo[] = {
|
snapTo[] = {
|
||||||
"WoodLadder_DZ"
|
"WoodLadder_DZ"
|
||||||
};
|
};
|
||||||
|
radius = 5;
|
||||||
points[] = {
|
points[] = {
|
||||||
{0,0,0,"Pivot"},
|
{0,0,0,"Pivot"},
|
||||||
{-0.4,0,1.725,"Left"},
|
{-0.4,0,1.725,"Left"},
|
||||||
@@ -379,6 +392,7 @@ class SnapBuilding {
|
|||||||
"VaultStorageLocked",
|
"VaultStorageLocked",
|
||||||
"VaultStorage"
|
"VaultStorage"
|
||||||
};
|
};
|
||||||
|
radius = 5;
|
||||||
points[] = {
|
points[] = {
|
||||||
{0,0,0,"Pivot"},
|
{0,0,0,"Pivot"},
|
||||||
{0,0.284,0.615,"Back"},
|
{0,0.284,0.615,"Back"},
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// July 10 2014 //
|
// July 10 2014 //
|
||||||
/*--------------------------------*/
|
/*--------------------------------*/
|
||||||
|
|
||||||
private ["_object","_objectSnapGizmo","_objColorActive","_objColorInactive","_classname","_whitelist","_points","_cfg","_cnt","_pos","_findWhitelisted","_nearbyObject","_posNearby","_selectedAction","_newPos","_pointsNearby","_onWater"];
|
private ["_object","_objectSnapGizmo","_objColorActive","_objColorInactive","_classname","_whitelist","_points","_radius","_cfg","_cnt","_pos","_findWhitelisted","_nearbyObject","_posNearby","_selectedAction","_newPos","_pointsNearby","_onWater"];
|
||||||
//Args
|
//Args
|
||||||
snapActionState = _this select 3 select 0;
|
snapActionState = _this select 3 select 0;
|
||||||
_object = _this select 3 select 1;
|
_object = _this select 3 select 1;
|
||||||
@@ -15,6 +15,7 @@ _selectedAction = _this select 3 select 4;
|
|||||||
_cfg = (configFile >> "SnapBuilding" >> _classname);
|
_cfg = (configFile >> "SnapBuilding" >> _classname);
|
||||||
_whitelist = getArray (_cfg >> "snapTo");
|
_whitelist = getArray (_cfg >> "snapTo");
|
||||||
_points = getArray (_cfg >> "points");
|
_points = getArray (_cfg >> "points");
|
||||||
|
_radius = getNumber (_cfg >> "radius");
|
||||||
|
|
||||||
//colors
|
//colors
|
||||||
_objColorActive = "#(argb,8,8,3)color(0,0.92,0.06,1,ca)";
|
_objColorActive = "#(argb,8,8,3)color(0,0.92,0.06,1,ca)";
|
||||||
@@ -58,7 +59,7 @@ fnc_initSnapPoints = {
|
|||||||
fnc_initSnapPointsNearby = {
|
fnc_initSnapPointsNearby = {
|
||||||
_pos = getPosATL _object;
|
_pos = getPosATL _object;
|
||||||
_findWhitelisted = []; _pointsNearby = [];
|
_findWhitelisted = []; _pointsNearby = [];
|
||||||
_findWhitelisted = nearestObjects [_pos,_whitelist,10]-[_object];
|
_findWhitelisted = nearestObjects [_pos,_whitelist,_radius]-[_object];
|
||||||
snapGizmosNearby = [];
|
snapGizmosNearby = [];
|
||||||
{
|
{
|
||||||
_nearbyObject = _x;
|
_nearbyObject = _x;
|
||||||
|
|||||||
Reference in New Issue
Block a user