mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Raise lower carry object (#5234)
* Fix to move items up and down * Fixed private * Fixed public bug * Inserted Pabst solution * Remove extra space * Fixed request + added author * Fixed to correct comment * Tweeked comment again
This commit is contained in:
parent
8bb92cee6f
commit
cec82be93b
@ -104,6 +104,7 @@ nomisum <nomisum@gmail.com>
|
|||||||
OnkelDisMaster <onkeldismaster@gmail.com>
|
OnkelDisMaster <onkeldismaster@gmail.com>
|
||||||
oscarmolinadev
|
oscarmolinadev
|
||||||
PaxJaromeMalues <seemax1991@gmail.com>
|
PaxJaromeMalues <seemax1991@gmail.com>
|
||||||
|
Phyma <sethramstrom@gmail.com>
|
||||||
pokertour
|
pokertour
|
||||||
Professor <lukas.trneny@wo.cz>
|
Professor <lukas.trneny@wo.cz>
|
||||||
rakowozz
|
rakowozz
|
||||||
|
@ -37,8 +37,12 @@ _position set [2, ((_position select 2) + _scrollAmount min (_maxHeight + 1.5))
|
|||||||
|
|
||||||
// move up/down object and reattach at current position
|
// move up/down object and reattach at current position
|
||||||
detach _carriedItem;
|
detach _carriedItem;
|
||||||
_carriedItem setPosATL _position;
|
|
||||||
_carriedItem attachTo [_unit];
|
// Uses this method of selecting position because setPosATL did not have immediate effect
|
||||||
|
private _positionChange = _position vectorDiff (getPosATL _carriedItem);
|
||||||
|
private _selectionPosition = _unit worldToModel (ASLtoAGL getPosWorld _carriedItem);
|
||||||
|
_selectionPosition = _selectionPosition vectorAdd _positionChange;
|
||||||
|
_carriedItem attachTo [_unit, _selectionPosition];
|
||||||
|
|
||||||
//reset the carry direction
|
//reset the carry direction
|
||||||
private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0];
|
private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0];
|
||||||
|
Loading…
Reference in New Issue
Block a user