Jump to content
  • 0

Safe lock/unlock issue


lordgeorge

Question

Hey guys

 

I am currently having a issue with safes, where when unlocking or locking a safe. It turns to the right then moves it up 3ft.

There is no logs in either client/server relating to this and makes purely no sense.

 

The issue at this moment is random and not found the trigger to the reason.

I have found that locking the safe or unlocking it to the opposite state moves it back.

 

Also server restart moves the item back to where it should be.

The only weird thing i have seen is when locking a safe it briefly disappears before completing as a locked safe.

 

 

cheers guys

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hey guys

 

I am currently having a issue with safes, where when unlocking or locking a safe. It turns to the right then moves it up 3ft.

There is no logs in either client/server relating to this and makes purely no sense.

 

The issue at this moment is random and not found the trigger to the reason.

I have found that locking the safe or unlocking it to the opposite state moves it back.

 

 

 

Does everyone see the same thing?  If you were to lock/unlock a safe, and you had a friend a few meters away.. would he see what you see?

Link to comment
Share on other sites

  • 0

I have no issues with safes on my server so it is not the same on all servers.

 

Based on the current GitHub code (I suspect may be a work in progress)...

 

The process to lock safes is not changing the state of a safe but it is in fact creating a new object (vault locked),  setting the new safes position to match the unlocked safes position, placing the safe (overlaying it over the unlocked safe) and making it visiable. 

 

Strangely the unlocked safe is not destroyed and the unlocked safes gear is not copied in to the locked safe.  I would have thought the same process would be followed for the unlocking of the safe as detailed below.

 

On unlocking a safe, the locked safes details are copied (position, direction, gear) and the new unlocked safe is placed.  The locked safe is then destroyed and the gear it used to have is copied to the new unlocked safe.

 

It seems it cannot place the new locked safe, possibly due to collision issues with the original unlocked safe so moves it to a position where no conflict exists.  Check the dayz_code/compile/player_lockvault.sqf matches the one on GitHub, especially that the createvehicle line (line 51) has the "CAN_COLLIDE" variable set.

 

For reference, the unlock sqf is dayz_code/compile/player_unlockvault.sqf and the GitHub version is here.

Link to comment
Share on other sites

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
  • Discord

×
×
  • Create New...