Jump to content

GameObject Bug

By Simple_spectr
in Serverside

Recommended Posts

Due to loss of internet connection I couldn't finish my answer to you, otherwise it would have been here for a few days already.

There are 2 orientation systems for gameobjects in gameobject table at the moment. You can do basically two things. Either:

  1. Spawn a gameobject.
  2. Turn it with .gob turn command (TC admin is great for this).
  3. Done.

Or you can:

  1. Spawn gamobjects.
  2. Execute following SQL query on your world database: UPDATE `gameobject` SET `rotation0`=0, `rotation1`=0, `rotation2`=SIN(`orientation`/2), `rotation3`=COS(`orientation`/2);
  3. Restart your server.
  4. Done.

The 2nd method will rotate all your gameobjects to the way they should be oriented (so on-spawn orientation will be used).

The biggest issue of the 1st method is that (at least on my a little bit outdated revision of TC) gameobject turn command doesn't change old orientation value which is no longer used, only the  2nd, new orientation values. The biggest issue of the 2nd method is that, apart from need of restarting server and not-seeing results immediately, it collides with the 1st method (objects turned by gameobject turn command will get turned again to orientation spawner was in when he spawned a gamobject). A (partial) solution to this would be:
UPDATE `gameobject` SET `rotation0`=0, `rotation1`=0, `rotation2`=SIN(`orientation`/2), `rotation3`=COS(`orientation`/2) WHERE (`rotation2`=0 OR `rotation3`=0);

 

Now, guys, tell me. Anyone. Why the actual FUCK is TrinityCore doing this. Releasing unfinished, malfunctional things. Redoing things which were WORKING. Fixnig things which WERE NOT broken. Its overengineering and utterly stupid in my opinion, and its not for the first time TC has done something similiar.

English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

I am now completely retired from modding. I am still reading PMs and reacting to them, however, I am not keeping up to date with what is going on in the community and my ability to help you is becoming very limited - I no longer remember some things, I don't have tools installed anymore, and I don't know what is up to date nowadays.

Link to comment
Share on other sites

12 hours ago, Amaroth said:

Now, guys, tell me. Anyone. Why the actual FUCK is TrinityCore doing this. Releasing unfinished, malfunctional things. Redoing things which were WORKING. Fixnig things which WERE NOT broken. Its overengineering and utterly stupid in my opinion, and its not for the first time TC has done something similiar.

Iirc there actually were some problems with the game object rotation, but i can't remember what it was anymore. Pretty sure there is/was a ticket in their GitHub issues about this.

EDIT: Searched it, not sure if it was this problem or another, but there are tickets about wrong game object rotation. https://github.com/TrinityCore/TrinityCore/issues/4543

Link to comment
Share on other sites

×
×
  • Create New...