Jump to content
  • 0

all player built walls rotate to same angle on server restart...


tawnik

Question

OK so i just got the server a few days ago and have managed to get plenty of things working correctly on it so far but in doing so i have managed to break something when it comes to base building.  when a player builds some walls or whatever they want it all seems to rotate to the same exact angle on server restart.  all the pieces are still in the correct positions they are simply all rotated from whatever angles they were all at originally  to the same angle so that everything is parallel to each other...  

 

i know you cant simply tell me what i did  (atleast i dont think you can since i have so much crap added) BUT i was hoping someone would have an idea of what i should be looking for.  possibly a variable name or something that has to do with player built structures where the rotation is possibly being overwritten or atleast tell me how the walls position is formatted in the code.

 

i should also mention that when i check out the individual pieces of walls in the database they all seem to still have the correct values for each so i am assuming this is just some line of code somewhere forcefully changing their rotation on server restart. so any help with what file i should be looking in or what sorts of things i should be looking for would be great, thanks!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Look in the database -- are they being saved at the same angle?

 

If so it could be something you edited in a build script.

 

If they are saved fine but loading wrong then check anything you added to server_monitor.sqf around these lines:

      
            _object setdir _dir;
            _object setposATL _pos;
            _object setDamage _damage;
           

if that doesn't work then slowly remove scripts until you find what's causing it.

Link to comment
Share on other sites

  • 0

ohh awesome thankyou for a response as far as i can tell they are all being saved correctly in the database none of the values in the "worldspace" are the same between the buildables so i figured there was a line of code somewhere that is doing it.  just for my knowledge what order are the variables in the worldspace of the database? for example if the world space for a wall is: [106.158,[13872.1,11741.6,0.006]]  im assuming it is [Rotation,[XPos, YPos, Zpos]] am i correct or are they in a different order?

Link to comment
Share on other sites

  • 0

ohh awesome thankyou for a response as far as i can tell they are all being saved correctly in the database none of the values in the "worldspace" are the same between the buildables so i figured there was a line of code somewhere that is doing it.  just for my knowledge what order are the variables in the worldspace of the database? for example if the world space for a wall is: [106.158,[13872.1,11741.6,0.006]]  im assuming it is [Rotation,[XPos, YPos, Zpos]] am i correct or are they in a different order?

 

yes, that's correct.  so if they are saved correctly then either

 

a. your server monitor is not positioning them correctly (see above)

 

b. another script is rotating the objects after they load in

Link to comment
Share on other sites

  • 0

alright i have a few backups of my server and mission pbo's ill just cycle through a few of them until i figure out where the change happened... thankyou very much for the direction!

 

You could use github or winmerge to compare your server_monitor.sqf to the default one and see the line changes to see if something in there is causing it.

 

You could do that with your whole project to a set of default files if you really wanted.

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...