Potential error in MQ's Location routine...

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

NealThorpayt
Developer
Developer
Posts: 66
Joined: Thu Mar 13, 2003 2:14 pm
Location: Miskatonic University
Contact:

Potential error in MQ's Location routine...

Post by NealThorpayt » Thu Apr 24, 2003 7:05 pm

Greetings Constructs,

I have found what appears to be an error in the Location function in EQLib.cpp. The X and Y coordinates are transposed.

The line is question is:

Code: Select all

	sprintf(szMsg,"Your Location is %3.2f, %3.2f, %3.2f, and are heading %s.", pChar->Y, pChar->X, pChar->Z, szHeading[Angle]);
I believe it should be:

Code: Select all

	sprintf(szMsg,"Your Location is %3.2f, %3.2f, %3.2f, and are heading %s.", pChar->X, pChar->Y, pChar->Z, szHeading[Angle]);
End of line...
By the pricking of my thumb, something wicked this way comes...

kaz
a ghoul
a ghoul
Posts: 103
Joined: Tue Jan 14, 2003 4:09 am

Post by kaz » Thu Apr 24, 2003 7:37 pm

it is actually correct, eq transposes the Y and X coordinates internally before displaying them to the user interface (like with the eqversion of loc)

NealThorpayt
Developer
Developer
Posts: 66
Joined: Thu Mar 13, 2003 2:14 pm
Location: Miskatonic University
Contact:

Post by NealThorpayt » Thu Apr 24, 2003 8:09 pm

Greetings Constructs,

Well, I would assume that the X axis is the East-West axis and the Y axis is the North-South axis. I don't believe there is any way of telling if the programmers intended the structure locations to be X or Y in that there is no debugging information. So, assuming my axis are correct, then the current struct for _SPAWNINFO needs to have the Location function changed as I specified.

End of line...
By the pricking of my thumb, something wicked this way comes...