mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
vector corrections and improvements
Correct vector snap issues clientside Correct vector placement issues server side Correct remoteExec reveal to clients(fixes incorrect placement during swap)
This commit is contained in:
parent
f53933a2ee
commit
f3700efba7
@ -287,9 +287,8 @@ if (_class != "") then {
|
|||||||
if (surfaceIsWater _snapPosition) then {
|
if (surfaceIsWater _snapPosition) then {
|
||||||
_snapPosition = ASLtoATL _snapPosition;
|
_snapPosition = ASLtoATL _snapPosition;
|
||||||
};
|
};
|
||||||
|
|
||||||
_currentTarget setposATL _snapPosition;
|
|
||||||
_currentTarget setVectorDirAndUp[_dir2, (vectorUp _nearestObject)];
|
_currentTarget setVectorDirAndUp[_dir2, (vectorUp _nearestObject)];
|
||||||
|
_currentTarget setposATL _snapPosition;
|
||||||
|
|
||||||
// Vector + Snapping
|
// Vector + Snapping
|
||||||
if(!(_vectorUp select 0 == 0) || !(_vectorUp select 1 == 0) || !(_vectorUp select 2 == 1)) then{
|
if(!(_vectorUp select 0 == 0) || !(_vectorUp select 1 == 0) || !(_vectorUp select 2 == 1)) then{
|
||||||
|
@ -19,8 +19,9 @@ if (!isNull _object && !(_class isEqualTo "")) then {
|
|||||||
|
|
||||||
switch (_method) do {
|
switch (_method) do {
|
||||||
case 0: {
|
case 0: {
|
||||||
_newObj setPosWorld _objectPos;
|
_newObj setposATL (getPosATL _object);
|
||||||
_newObj setVectorDirAndUp [vectordir _object, vectorup _object];
|
_newObj setDir (getDir _object);
|
||||||
|
_newObj setVectorDirAndUp [vectorDir _object, vectorUP _object];
|
||||||
};
|
};
|
||||||
case 1: {
|
case 1: {
|
||||||
_newObj attachTo [_object,[0,0,0]];
|
_newObj attachTo [_object,[0,0,0]];
|
||||||
@ -38,7 +39,7 @@ if (!isNull _object && !(_class isEqualTo "")) then {
|
|||||||
// force nearby players to reveal new object faster
|
// force nearby players to reveal new object faster
|
||||||
_playersNear = _newObj nearEntities[["Epoch_Male_F", "Epoch_Female_F"], 300];
|
_playersNear = _newObj nearEntities[["Epoch_Male_F", "Epoch_Female_F"], 300];
|
||||||
{
|
{
|
||||||
[_x, _newObj] remoteExec ['reveal',_x];
|
[_newObj, {player reveal _this}] remoteExec ["call", _x];
|
||||||
}forEach _playersNear;
|
}forEach _playersNear;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user