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:
icomrade
2016-05-18 11:01:38 -04:00
parent 8fd4c8eb8b
commit 2889d8f010
3 changed files with 9 additions and 7 deletions

View File

@@ -108,9 +108,6 @@ if (_canBuild select 0) then {
};
_offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
if((count _offset) <= 0) then {
_offset = [0,1.5,0];
};
_location = [0,0,0];
_isOk = true;
@@ -124,6 +121,10 @@ if (_canBuild select 0) then {
_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];
_position = getPosATL _object;