Jump to content
  • 0

Teleport bug since new update


SkyDogs

Question

Recommended Posts

  • 0

The built in teleport system from player_spawn_2.sqf was fixed, I believe it was not even working before. I suspect the problem is the player has script lag and or desync really badly and has somehow traveled more than 400 meters between checks. These checks should execute about every 2 seconds so the distance traveled should be really low. Working on a fix now, only problem is that it is hard to reproduce.

Link to comment
Share on other sites

  • 0

Can you explain what's been changed as I need that fix now and is it in the client files? :o

Ok testing now on our dev server, have edited the dayz_code on server and my client....

 

Ok testing, first thing is the signature has changed so i've had to turn signature checking to "0" to get on

 

Doesn't seem to of fixed it.

_lastPos = getPosATL player;	
	if (!isNil "_mylastPos") then {
		if (player == vehicle player) then {
			if (_mylastPos distance _lastPos > 200) then {
				if (alive player) then {
					player setPosATL _mylastPos;
					diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
				};
			};
		} else {
			if (_mylastPos distance _lastPos > 800) then {
				if (alive player) then {
					player setPosATL _mylastPos;
					diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
				};
			};
		};
	};

^^ Is that the snippet of code which corrects it as if it is it's unchanged from the regular 1.0.2 files

_lastPos = getPosATL player;	
	if (!isNil "_mylastPos") then {
		if (player == vehicle player) then {
			if (_mylastPos distance _lastPos > 20000) then {
				if (alive player) then {
					player setPosATL _mylastPos;
					diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
				};
			};
		} else {
			if (_mylastPos distance _lastPos > 20000) then {
				if (alive player) then {
					player setPosATL _mylastPos;
					diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
				};
			};
		};
	};

Have changed mine to the 20000 and can confirm it fixes it. One of the problems is with vehicles with mounted guns and players on different sessions as some can get on the gunner seat and be left outside the vehicle, and the game will think they're too far away and eject them.

 

Edit, can confirm 100% fixed at 20000

Link to comment
Share on other sites

  • 0

The built in teleport system from player_spawn_2.sqf was fixed, I believe it was not even working before. I suspect the problem is the player has script lag and or desync really badly and has somehow traveled more than 400 meters between checks. These checks should execute about every 2 seconds so the distance traveled should be really low. Working on a fix now, only problem is that it is hard to reproduce.

Happens to me frequently due to cruddy internet, lots of desync. Latency hovers around 60ms, however, desync tends to spike up every now and again.

Will test again ASAP.

Link to comment
Share on other sites

  • 0

F35 at 800+km/h

Can confirm that changing both of those to 20000 works as that could cover the furthest distance across the map.

At 10000 there is still a good chance of it happening due to desync if in a fast vehicle such as MV22

 

Where is the log output? There's nothing being reported in the rpt.

Link to comment
Share on other sites

  • 0

The fix/problem is not that it would be the part I commented out

/* comment out to test if this is source of the issue
	if (!isNil "_mylastPos") then {
		_distance = _mylastPos distance _tempPos;
		if (_distance > 400) then {
			_randomSpot = false;
		};
	};
	*/
Link to comment
Share on other sites

  • 0

With that snipped commented out (assume I did it correctly) it's still happening at speeds of 800+ which would still cause players to be reverted if there was desync

/* comment out to test if this is source of the issue
	//if (!isNil "_mylastPos") then {
		_distance = _mylastPos distance _tempPos;
		if (_distance > 400) then {
			_randomSpot = false;
		};
	};
Link to comment
Share on other sites

  • 0

Have introduced artificial desync to my client and exactly the same thing happens.

The problem is more prevalent on Venoms, HMMVV's and SUV with mounted guns, this due to the gunners ghost character being left standing at the location where they got in the vehicle in the gunner position, even though they are physically in the vehicle, the game thinks they're not and will eject them out and revert them to where they got in. My fix of editing those other values to 20000 stops that without commenting out the section as you've suggested.

Link to comment
Share on other sites

  • 0

 

With that snipped commented out (assume I did it correctly) it's still happening at speeds of 800+ which would still cause players to be reverted if there was desync

/* comment out to test if this is source of the issue
	//if (!isNil "_mylastPos") then {
		_distance = _mylastPos distance _tempPos;
		if (_distance > 400) then {
			_randomSpot = false;
		};
	};

Just to make sure can you double check using the the exact contents of this file? https://raw.github.com/vbawol/DayZ-Epoch/e6399d740f5a578def5d322d29a5983ddfaf0ff7/SQF/dayz_code/system/player_spawn_2.sqf

Link to comment
Share on other sites

  • 0

Doing it the way you have it will break the teleporting of players out of debug and [0,0,0].

 

Yes I can see that, I tried to comment out the whole block and it still happens.

/* comment out to test if this is source of the issue
	//if (!isNil "_mylastPos") then {
		//_distance = _mylastPos distance _tempPos;
		//if (_distance > 400) then {
			//_randomSpot = false;
		//};
	//};

With the original values as below, if the game reads that a player is more than 800m away from where they should be, i.e mounted gunner or desync (also teleporter) then it will revert them, and 200m if not in a vehicle. I can only assume that this code wasn't being called prior to Epoch 1.0.2? The code is great for preventing ind tp'ing and mass tp'ing of players, but with desync and glitched vehicles, it currently breaks the game. A guy was helping Lewis earlier with supplies in a heli and it happened, causing the player to be reverted to a position, the heli to crash and the purchased base building gear to be lost - Rage ensued ;)

_lastPos = getPosATL player;	
	if (!isNil "_mylastPos") then {
		if (player == vehicle player) then {
			if (_mylastPos distance _lastPos > 200) then {
				if (alive player) then {
					player setPosATL _mylastPos;
					diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
				};
			};
		} else {
			if (_mylastPos distance _lastPos > 800) then {
				if (alive player) then {
					player setPosATL _mylastPos;
					diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
				};
			};
		};
	};

Would this be a more feasable change:-

_lastPos = getPosATL player;	
	if (!isNil "_mylastPos") then {
		if (player == vehicle player) then {
			if (_mylastPos distance _lastPos > 200) then {
				if (alive player) then {
					player setPosATL _mylastPos;
					diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
				};
			};
		} else {
			if (_mylastPos distance _lastPos > 20000) then {
				if (alive player) then {
					player setPosATL _mylastPos;
					diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
				};
			};
		};
	};

As it wouldn't break tp'ing from debug and 0,0,0 because it would change only the distance parameters for vehicle bound players, or would it include players in vehicles?

Link to comment
Share on other sites

  • 0

The problem is player desync causing a mismatch in reported positions and the player being reverted when in a vehicle.

Right! Working on 30 minutes of sleep, kind of skimming through the posts.

I applied this to a server, and have not had problems in an MV22 when setting the vehicle position to 1600m. Have not tried it with stress-tests, but have tried it with 15fps and frequent stutter, if that helps.

Link to comment
Share on other sites

  • 0

 

Yes I can see that, I tried to comment out the whole block and it still happens.

/* comment out to test if this is source of the issue
	//if (!isNil "_mylastPos") then {
		//_distance = _mylastPos distance _tempPos;
		//if (_distance > 400) then {
			//_randomSpot = false;
		//};
	//};

With the original values as below, if the game reads that a player is more than 800m away from where they should be, i.e mounted gunner or desync (also teleporter) then it will revert them, and 200m if not in a vehicle. I can only assume that this code wasn't being called prior to Epoch 1.0.2? The code is great for preventing ind tp'ing and mass tp'ing of players, but with desync and glitched vehicles, it currently breaks the game. A guy was helping Lewis earlier with supplies in a heli and it happened, causing the player to be reverted to a position, the heli to crash and the purchased base building gear to be lost - Rage ensued ;)

_lastPos = getPosATL player;	
	if (!isNil "_mylastPos") then {
		if (player == vehicle player) then {
			if (_mylastPos distance _lastPos > 200) then {
				if (alive player) then {
					player setPosATL _mylastPos;
					diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
				};
			};
		} else {
			if (_mylastPos distance _lastPos > 800) then {
				if (alive player) then {
					player setPosATL _mylastPos;
					diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
				};
			};
		};
	};

Would this be a more feasable change:-

_lastPos = getPosATL player;	
	if (!isNil "_mylastPos") then {
		if (player == vehicle player) then {
			if (_mylastPos distance _lastPos > 200) then {
				if (alive player) then {
					player setPosATL _mylastPos;
					diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
				};
			};
		} else {
			if (_mylastPos distance _lastPos > 20000) then {
				if (alive player) then {
					player setPosATL _mylastPos;
					diag_log ("Player Teleport Revert : "+ str(_mylastPos distance _lastPos));
				};
			};
		};
	};

As it wouldn't break tp'ing from debug and 0,0,0 because it would change only the distance parameters for vehicle bound players, or would it include players in vehicles?

 

Just checking you didn't miss this on the previous page Awol.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...