void Client::OnPacket(MOVE& pks) { if (pc->GetFSMState() != FieldObjectFSM::MOVE) { pc->ChangeFSM(FieldObjectFSM::MOVE); } pc->velocity.x = pks.x(); pc->velocity.y = pks.y(); pc->velocity.z = pks.z(); if ((pc->velocity.x == 0 && pc->velocity.y == 0 && pc->velocity.z == 0) == false) { pc->velocity = glm::normalize(pc->velocity); } }
gex::Point2 moveToPoint(const MOVE& _move) { return gex::Point2(_move.x(),_move.y()); }