mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Switch everything to use modelToWorldVisual instead of modelToWorld.
This commit is contained in:
@ -57,7 +57,7 @@ switch ((_type select 0)) do {
|
||||
};
|
||||
} else {
|
||||
_addedToPlayer = false;
|
||||
_pos = _unit modelToWorld [0,1,0.05];
|
||||
_pos = _unit modelToWorldVisual [0,1,0.05];
|
||||
_unit = createVehicle ["WeaponHolder_Single_F",_pos,[],0,"NONE"];
|
||||
_unit addWeaponCargoGlobal [_classname,1];
|
||||
_unit setPosATL _pos;
|
||||
@ -73,7 +73,7 @@ switch ((_type select 0)) do {
|
||||
};
|
||||
} else {
|
||||
_addedToPlayer = false;
|
||||
_pos = _unit modelToWorld [0,1,0.05];
|
||||
_pos = _unit modelToWorldVisual [0,1,0.05];
|
||||
_unit = createVehicle ["WeaponHolder_Single_F",_pos,[],0,"NONE"];
|
||||
_unit addMagazineCargoGlobal [_classname, 1];
|
||||
_unit setPosATL _pos;
|
||||
@ -89,7 +89,7 @@ switch ((_type select 0)) do {
|
||||
};
|
||||
} else {
|
||||
_addedToPlayer = false;
|
||||
_pos = _unit modelToWorld [0,1,0.05];
|
||||
_pos = _unit modelToWorldVisual [0,1,0.05];
|
||||
_unit = createVehicle ["WeaponHolder_Single_F",_pos,[],0,"NONE"];
|
||||
_unit addItemCargoGlobal [_classname,1];
|
||||
_unit setPosATL _pos;
|
||||
|
@ -242,10 +242,10 @@ _fnc_isInRange = {
|
||||
private ["_unitPosition", "_distance"];
|
||||
_unitPosition = getPos _unit;
|
||||
|
||||
_distance = _unitPosition distance (_vehicle modelToWorld _selectionPosition);
|
||||
_distance = _unitPosition distance (_vehicle modelToWorldVisual _selectionPosition);
|
||||
|
||||
if (!isNil "_selectionPosition2") then {
|
||||
_distance = _distance min (_unitPosition distance (_vehicle modelToWorld _selectionPosition2));
|
||||
_distance = _distance min (_unitPosition distance (_vehicle modelToWorldVisual _selectionPosition2));
|
||||
};
|
||||
|
||||
_distance < _radius
|
||||
|
@ -27,11 +27,11 @@ _povDir = [0,0,0];
|
||||
|
||||
if(_pov == "pip0_pos") then {
|
||||
_pipDir = ATLtoASL ( _vehicle modelToWorldVisual (_vehicle selectionPosition "pip0_dir" ) );
|
||||
_povDir = _povPos vectorDiff _pipDir;
|
||||
_povDir = _pipDir vectorDiff _povPos;
|
||||
} else {
|
||||
_gunBeginPos = ATLtoASL ( _vehicle modelToWorldVisual (_vehicle selectionPosition _gunBeg ) );
|
||||
_gunEndPos = ATLtoASL ( _vehicle modelToWorldVisual (_vehicle selectionPosition _gunEnd ) );
|
||||
_povDir = _gunEndPos vectorDiff _gunBeginPos;
|
||||
_povDir = _gunBeginPos vectorDiff _gunEndPos;
|
||||
};
|
||||
|
||||
[_povPos, _povDir]
|
@ -14,7 +14,7 @@ private ["_unit","_return","_aslPos"];
|
||||
_unit = _this select 0;
|
||||
_return = false;
|
||||
if ((surfaceIsWater getPos _unit)) then {
|
||||
_aslPos = _unit modelToWorld (_unit selectionPosition "head");
|
||||
_aslPos = _unit modelToWorldVisual (_unit selectionPosition "head");
|
||||
if ((_aslPos select 2) <= 0) then {
|
||||
_return = true;
|
||||
};
|
||||
|
Reference in New Issue
Block a user