Jump to content
  • 0

[TUTORIAL] Fix DistanceFoot value in hive


Swordfish

Question

Hi! I had a problem with DistanceFoot value in the database being extremely high when you spawn in, a value of like 30 000+

This is because the hive measuring the distance from the debug-spawn place out in the sea west of Kamenka to your spawn point.

 

Here is the problem:

https://github.com/thevisad/DayZ-Private-master/issues/77

 

To fix this issue:

 

In the file dayz_server.pbo --> Compile ---> server_updatePlayer.sqf

Find the line: (for me it was row 69,70,71)

if (count _lastPos > 2 and count _charPos > 2) then {
    if (!_isInVehicle) then {
        _distanceFoot = round(_charPos distance _lastPos);

AFTER that, add:

if ( _distanceFoot > 2000 ) then 
 {
  _distanceFoot = 0;
 };
 diag_log ("debug _distanceFoot = " + str(_distanceFoot));

This fix so you spawn in with value 0 in distanceFoot.

 

The value in the database is feet i think, to convert that value to meters, take it and multiply by 0.3048.

 

// Swordfish

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...