Page 1 of 1
/face not working as expected
Posted: Tue Jul 04, 2017 10:04 pm
by ctaylor22
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...
Re: /face not working as expected
Posted: Wed Jul 05, 2017 2:36 pm
by SwiftyMUSE
/face loc does not apply the Z setting. It only looks for Y,X settings.
I'll work on adding the behavior.
Re: /face not working as expected
Posted: Wed Jul 05, 2017 2:40 pm
by SwiftyMUSE
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);
}
Re: /face not working as expected
Posted: Wed Jul 05, 2017 3:20 pm
by MacQ
This looks to be a nice addition to MQ, hope to see it in a future release.
Re: /face not working as expected
Posted: Wed Jul 05, 2017 8:12 pm
by ctaylor22
Underwater camps will now be manageable..
Re: /face not working as expected
Posted: Wed Jul 05, 2017 9:27 pm
by SwiftyMUSE
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.
Re: /face not working as expected
Posted: Tue Jul 11, 2017 6:03 pm
by ctaylor22
OK I tested it and it worked.. Thanks for the help.
Re: /face not working as expected
Posted: Wed Jul 12, 2017 10:46 am
by SwiftyMUSE
Updated to be included in next zip.