/face not working as expected

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

ctaylor22
a lesser mummy
a lesser mummy
Posts: 30
Joined: Thu Feb 13, 2014 9:23 am

/face not working as expected

Post by ctaylor22 » Tue Jul 04, 2017 10:04 pm

If in the water and target a mob below you and do /face it faces the target properly, but using /face loc ${Target.Y},${Target.X},${Target.Z} always faces in the direction of the target but in the positive direction of the Z access. When trying to /face my camp location using the /face loc Y,X,Z if Z is a negative value the /face loc will always treat Z as a positive value and not /face down, but up...

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: /face not working as expected

Post by SwiftyMUSE » Wed Jul 05, 2017 2:36 pm

/face loc does not apply the Z setting. It only looks for Y,X settings.

I'll work on adding the behavior.
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: /face not working as expected

Post by SwiftyMUSE » Wed Jul 05, 2017 2:40 pm

Try changing /face loc (in mq2commands.cpp) from:

Code: Select all

			pSpawnClosest = &LocSpawn;
			strcpy_s(LocSpawn.Name, "location");
			if ((szFilter[0] == 0) || (!strstr(szFilter, ","))) {
				MacroError("Face: loc specified but <y>,<x> not found.");
				return;
			}
			pSpawnClosest->Y = (FLOAT)atof(szFilter);
			while ((szFilter[0] != ',') && (szFilter[0] != 0)) szFilter++;
			if (szFilter[0] == 0) {
				MacroError("Face: loc specified but <y>,<x> not found.");
				return;
			}
			szFilter++;
			pSpawnClosest->X = (FLOAT)atof(szFilter);
to:

Code: Select all

			pSpawnClosest = &LocSpawn;
			strcpy_s(LocSpawn.Name, "location");
			if ((szFilter[0] == 0) || (!strstr(szFilter, ","))) {
				MacroError("Face: loc specified but <y>,<x> not found.");
				return;
			}
			pSpawnClosest->Y = (FLOAT)atof(szFilter);
			while ((szFilter[0] != ',') && (szFilter[0] != 0)) szFilter++;
			if (szFilter[0] == 0) {
				MacroError("Face: loc specified but <y>,<x> not found.");
				return;
			}
			szFilter++;
			pSpawnClosest->X = (FLOAT)atof(szFilter);
			while ((szFilter[0] != ',') && (szFilter[0] != 0)) szFilter++;
			if (szFilter[0] != 0) {
				szFilter++;
				pSpawnClosest->Z = (FLOAT)atof(szFilter);
			}
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...

User avatar
MacQ
Macro Author
Macro Author
Posts: 674
Joined: Sat Apr 02, 2005 2:39 pm

Re: /face not working as expected

Post by MacQ » Wed Jul 05, 2017 3:20 pm

This looks to be a nice addition to MQ, hope to see it in a future release.

ctaylor22
a lesser mummy
a lesser mummy
Posts: 30
Joined: Thu Feb 13, 2014 9:23 am

Re: /face not working as expected

Post by ctaylor22 » Wed Jul 05, 2017 8:12 pm

Underwater camps will now be manageable..

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: /face not working as expected

Post by SwiftyMUSE » Wed Jul 05, 2017 9:27 pm

MacQ wrote:This looks to be a nice addition to MQ, hope to see it in a future release.
It will if someone can test it for me.
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...

ctaylor22
a lesser mummy
a lesser mummy
Posts: 30
Joined: Thu Feb 13, 2014 9:23 am

Re: /face not working as expected

Post by ctaylor22 » Tue Jul 11, 2017 6:03 pm

OK I tested it and it worked.. Thanks for the help.

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: /face not working as expected

Post by SwiftyMUSE » Wed Jul 12, 2017 10:46 am

Updated to be included in next zip.
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...