diff --git a/server/gameserver/creature.h b/server/gameserver/creature.h index f182554f..0043181d 100644 --- a/server/gameserver/creature.h +++ b/server/gameserver/creature.h @@ -419,6 +419,8 @@ class Creature : public MoveableEntity bool IsOb(); bool HaveBallingEnemy(); virtual void SyncServerPos(int reason); + virtual bool IsClientMove() { return false;}; + virtual std::shared_ptr GetClientCurrPos() { return nullptr;}; protected: virtual void OnBuffRemove(Buff& buff); diff --git a/server/gameserver/human.h b/server/gameserver/human.h index f78b8452..c2172de1 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -299,6 +299,8 @@ class Human : public Creature void SetIpSaddr(long ip_saddr); int GetHeroQuality(); void SetHeroQuality(int quality); + virtual bool IsClientMove() override { return is_client_move;}; + virtual std::shared_ptr GetClientCurrPos() override { return current_pos_;}; protected: void ProcLootWeapon(AddItemDTO& dto); @@ -402,6 +404,7 @@ private: long long jump_frameno_ = 0; float old_sync_speed = 0; std::map attacker_hash_; + std::shared_ptr current_pos_; friend class PBUtils; }; diff --git a/server/gameserver/player.h b/server/gameserver/player.h index acf2d279..89bad1f6 100644 --- a/server/gameserver/player.h +++ b/server/gameserver/player.h @@ -151,7 +151,7 @@ class Player : public Human void _CMMobaBattleData(f8::MsgHdr* hdr, const cs::CMMobaBattleData& msg); virtual void SetAttackDir(const glm::vec3& attack_dir) override; void AsyncRequestWatchWar(bool send_rsp_msg); - void SyncServerPos(int reason) override; + virtual void SyncServerPos(int reason) override; protected: Player(); @@ -168,7 +168,6 @@ private: a8::XTimerWp watch_war_req_timer_; glm::vec3 move_target_pos_ = GlmHelper::ZERO; - glm::vec3 current_pos_ = GlmHelper::ZERO; #ifdef MYDEBUG std::vector last_interaction_objids_;