mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Should fix building issues with player sliding
The change in module_build will only fix items that d ono have an offset set in the config. BoundingBox can be a bit generous but the player should be able to work with any overestimation in size.
This commit is contained in:
@@ -624,7 +624,7 @@ class Wooden_shed_DZ: Land_Shed_wooden
|
|||||||
scope = public;
|
scope = public;
|
||||||
destrType = "DestructBuilding";
|
destrType = "DestructBuilding";
|
||||||
//cost = 100;
|
//cost = 100;
|
||||||
offset[] = {0,2.5,1};
|
offset[] = {0,3,1};
|
||||||
armor = 800;
|
armor = 800;
|
||||||
displayName = "Wooden Shed";
|
displayName = "Wooden Shed";
|
||||||
vehicleClass = "Fortifications";
|
vehicleClass = "Fortifications";
|
||||||
|
|||||||
@@ -106,9 +106,6 @@ if (_canBuild select 0) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset"); //check default distance offset, define if does not exist
|
_offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset"); //check default distance offset, define if does not exist
|
||||||
if((count _offset) <= 0) then {
|
|
||||||
_offset = [0,1.5,0];
|
|
||||||
};
|
|
||||||
|
|
||||||
_objectHelper = objNull;
|
_objectHelper = objNull;
|
||||||
_isOk = true;
|
_isOk = true;
|
||||||
@@ -122,6 +119,10 @@ if (_canBuild select 0) then {
|
|||||||
|
|
||||||
_object = createVehicle [_classname, [0,0,0], [], 0, "CAN_COLLIDE"]; //object preview, not an actual object that will be built
|
_object = createVehicle [_classname, [0,0,0], [], 0, "CAN_COLLIDE"]; //object preview, not an actual object that will be built
|
||||||
|
|
||||||
|
if((count _offset) <= 0) then {
|
||||||
|
_offset = [0,(abs(((boundingBox _object)select 0) select 1)),0];
|
||||||
|
};
|
||||||
|
|
||||||
_objectHelper = "Sign_sphere10cm_EP1" createVehicle [0,0,0];
|
_objectHelper = "Sign_sphere10cm_EP1" createVehicle [0,0,0];
|
||||||
_helperColor = "#(argb,8,8,3)color(0,0,0,0,ca)";
|
_helperColor = "#(argb,8,8,3)color(0,0,0,0,ca)";
|
||||||
_objectHelper setobjecttexture [0,_helperColor];
|
_objectHelper setobjecttexture [0,_helperColor];
|
||||||
|
|||||||
@@ -108,9 +108,6 @@ if (_canBuild select 0) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
|
_offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
|
||||||
if((count _offset) <= 0) then {
|
|
||||||
_offset = [0,1.5,0];
|
|
||||||
};
|
|
||||||
|
|
||||||
_location = [0,0,0];
|
_location = [0,0,0];
|
||||||
_isOk = true;
|
_isOk = true;
|
||||||
@@ -124,6 +121,10 @@ if (_canBuild select 0) then {
|
|||||||
|
|
||||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||||
|
|
||||||
|
if((count _offset) <= 0) then {
|
||||||
|
_offset = [0,(abs(((boundingBox _object)select 0) select 1)),0];
|
||||||
|
};
|
||||||
|
|
||||||
_object attachTo [player,_offset];
|
_object attachTo [player,_offset];
|
||||||
|
|
||||||
_position = getPosATL _object;
|
_position = getPosATL _object;
|
||||||
|
|||||||
Reference in New Issue
Block a user