mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 04:11:30 +00:00
parent
aac0dd2993
commit
990729fe21
@ -13720,10 +13720,22 @@ void command_globalview(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void command_distance(Client *c, const Seperator *sep) {
|
void command_distance(Client *c, const Seperator *sep) {
|
||||||
if(c && c->GetTarget()) {
|
if (c->GetTarget()) {
|
||||||
Mob* target = c->GetTarget();
|
Mob* target = c->GetTarget();
|
||||||
|
if (c != target) {
|
||||||
c->Message(Chat::White, "Your target, %s, is %1.1f units from you.", c->GetTarget()->GetName(), Distance(c->GetPosition(), target->GetPosition()));
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"{} ({}) is {:.2f} units from you.",
|
||||||
|
target->GetCleanName(),
|
||||||
|
target->GetID(),
|
||||||
|
Distance(
|
||||||
|
c->GetPosition(),
|
||||||
|
target->GetPosition()
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user