PDA

View Full Version : Changes to Heading -- Breaking Changes


demonstar55
02-16-2018, 04:46 PM
Heading was wrong. So I fixed it. Sadly this means quests and DB have to be fixed.

The required SQL included (2018_02_13_Heading.sql) will fix spawn2 and gird heading entries.

Quests can be fixed with running eqemu_server.pl. Some headings that the script finds fishy will be remarked with "needs_heading_validation" and will require manual intervention.

If you wish to manually fix headings in your quests you will have to look at calls to quest::spawn2, eq.spawn2, eq.unique_spawn, quest::unique_spawn, GMMove, MovePCInstance, MovePC, and moveto. Doubling the current heading values will result in new correct headings. Anything that references a heading from say another mob don't need to be modified.

If you go on to official servers and use MQ2 to get headings you can do /echo ${Math.Calc[${Target.Heading.Degrees}*512/360]} to convert it to correct "EQ degrees"

Scorpious2k
06-10-2018, 03:19 PM
How was it wrong? For how long?

demonstar55
06-11-2018, 12:10 AM
So basically back in the day heading was packed by heading / 2, so we assumed EQ had 256 based heading. This was never the case and it was actually 512 (packed heading * 2 to unpack it)

So this basically worked out fine, until they changed how it was packed, which is now based on / 4.

Or something like that, I remembered all the details when I made the change.

But the main reason to do the change was so we could use their sin/cos LUTs for some physics stuff and to make stuff work better.

Scorpious2k
06-11-2018, 10:51 AM
Thanks for the clarification.

Nice work.