mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 15:22:53 +03:00
test to fix teleporting
This commit is contained in:
@@ -35,19 +35,24 @@ while {true} do {
|
|||||||
if (_distance < 500) then {
|
if (_distance < 500) then {
|
||||||
_randomSpot = false;
|
_randomSpot = false;
|
||||||
};
|
};
|
||||||
|
/* comment out to test if this is source of the issue
|
||||||
if (!isNil "_mylastPos") then {
|
if (!isNil "_mylastPos") then {
|
||||||
_distance = _mylastPos distance _tempPos;
|
_distance = _mylastPos distance _tempPos;
|
||||||
if (_distance > 400) then {
|
if (_distance > 400) then {
|
||||||
_randomSpot = false;
|
_randomSpot = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
if (_randomSpot) then {
|
if (_randomSpot) then {
|
||||||
_mylastPos = _tempPos;
|
_mylastPos = _tempPos;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* not used
|
||||||
if (!isNil "_mylastPos") then {
|
if (!isNil "_mylastPos") then {
|
||||||
dayz_mylastPos = _mylastPos;
|
dayz_mylastPos = _mylastPos;
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
dayz_areaAffect = _size;
|
dayz_areaAffect = _size;
|
||||||
|
|
||||||
if (_speed > 0.1) then {
|
if (_speed > 0.1) then {
|
||||||
@@ -278,12 +283,14 @@ while {true} do {
|
|||||||
if (_mylastPos distance _lastPos > 200) then {
|
if (_mylastPos distance _lastPos > 200) then {
|
||||||
if (alive player) then {
|
if (alive player) then {
|
||||||
player setPosATL _mylastPos;
|
player setPosATL _mylastPos;
|
||||||
|
diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
if (_mylastPos distance _lastPos > 800) then {
|
if (_mylastPos distance _lastPos > 800) then {
|
||||||
if (alive player) then {
|
if (alive player) then {
|
||||||
player setPosATL _mylastPos;
|
player setPosATL _mylastPos;
|
||||||
|
diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user