This commit is contained in:
aozhiwei 2024-09-10 13:41:00 +08:00
parent 054b78f9e1
commit 501cbb8f03
3 changed files with 6 additions and 2 deletions

View File

@ -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<glm::vec3> GetClientCurrPos() { return nullptr;};
protected:
virtual void OnBuffRemove(Buff& buff);

View File

@ -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<glm::vec3> 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<int, long long> attacker_hash_;
std::shared_ptr<glm::vec3> current_pos_;
friend class PBUtils;
};

View File

@ -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<int> last_interaction_objids_;