This commit is contained in:
aozhiwei 2023-03-23 11:03:51 +08:00
parent 2bb416f30e
commit cf73bd80a6

View File

@ -1129,7 +1129,10 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg)
int obj_uniid = a8::XValue(cmds[1]); int obj_uniid = a8::XValue(cmds[1]);
Entity* e = room->GetEntityByUniId(obj_uniid); Entity* e = room->GetEntityByUniId(obj_uniid);
if (e && e->IsEntityType(ET_Player)) { if (e && e->IsEntityType(ET_Player)) {
Human* hum = (Human*)e;
hum->GetMovement()->ClearPath();
hum->GetMutablePos().FromGlmVec3(GetPos().ToGlmVec3());
room->grid_service->MoveCreature(hum);
} }
} else if (cmd == "getattr" && cmds.size() >= 2) { } else if (cmd == "getattr" && cmds.size() >= 2) {
int attr_id = a8::XValue(cmds[1]); int attr_id = a8::XValue(cmds[1]);