From df680570a95ffdde1d7eaf6e873af7b1043bb9e2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 24 Mar 2023 12:50:01 +0800 Subject: [PATCH] 1 --- server/gameserver/creature.cc | 11 +++++++++++ server/gameserver/creature.h | 1 + 2 files changed, 12 insertions(+) diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index 2399415e..0e2f8643 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -2428,6 +2428,9 @@ void Creature::UpdateMove() } } room->grid_service->MoveCreature(this); + if (room->IsPveRoom() && IsEntityType(ET_Hero)) { + + } } } @@ -3031,3 +3034,11 @@ float Creature::GetSkillRaycastDistance() void Creature::NetInitOk() { } + +bool Creature::IsNearGas() +{ + #if 0 + float distance = GetPos().Distance(room->GetGasData().pos_new); + return distance + GetRadius() * 2 + 20 > room->GetGasData().rad_new; + #endif +} diff --git a/server/gameserver/creature.h b/server/gameserver/creature.h index 1e3fcbda..ed5167d3 100644 --- a/server/gameserver/creature.h +++ b/server/gameserver/creature.h @@ -337,6 +337,7 @@ class Creature : public MoveableEntity void ShortFindPath(); float GetSkillRaycastDistance(); virtual void NetInitOk(); + bool IsNearGas(); protected: virtual void OnBuffRemove(Buff& buff);