mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #3497 from acemod/liteDrag
Fix portable light floating / dir when carrying
This commit is contained in:
commit
1d3950bfff
@ -16,6 +16,16 @@
|
|||||||
// setVectorUp requires local object
|
// setVectorUp requires local object
|
||||||
if (!local _this) exitWith {};
|
if (!local _this) exitWith {};
|
||||||
|
|
||||||
|
if ((getText (configFile >> "CfgVehicles" >> (typeOf _this) >> "simulation")) == "house") then {
|
||||||
|
//Houses don't have gravity/physics, so make sure they are not floating
|
||||||
|
private _posAbove = (getPos _this) select 2;
|
||||||
|
TRACE_2("house",_this,_posAbove);
|
||||||
|
if (_posAbove > 0.1) then {
|
||||||
|
private _newPosASL = (getPosASL _this) vectorDiff [0,0,_posAbove];
|
||||||
|
_this setPosASL _newPosASL;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
private _position = getPos _this;
|
private _position = getPos _this;
|
||||||
|
|
||||||
// don't place the object below the ground
|
// don't place the object below the ground
|
||||||
|
@ -40,4 +40,8 @@ detach _carriedItem;
|
|||||||
_carriedItem setPosATL _position;
|
_carriedItem setPosATL _position;
|
||||||
_carriedItem attachTo [_unit];
|
_carriedItem attachTo [_unit];
|
||||||
|
|
||||||
|
//reset the carry direction
|
||||||
|
private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0];
|
||||||
|
["setDir", _carriedItem, [_carriedItem, _direction]] call EFUNC(common,targetEvent);
|
||||||
|
|
||||||
true
|
true
|
||||||
|
Loading…
Reference in New Issue
Block a user