diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index b9b29f48..abdc8727 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -2366,7 +2366,18 @@ void Creature::UpdateMove() } } room->grid_service->MoveCreature(this); - if (room->IsPveRoom() && IsEntityType(ET_Hero) && IsNearGas()) { + if (a8::HasBitFlag(status, CS_CrazeMode) && IsNearGas()) { + GetMutablePos() = old_pos; + GetMovement()->ClearPath(); + glm::vec3 dir = GetPos().ToGlmVec3() - old_pos.ToGlmVec3(); + if (std::abs(dir.x) > FLT_EPSILON || + std::abs(dir.y) > FLT_EPSILON || + std::abs(dir.z) > FLT_EPSILON + ) { + GlmHelper::Normalize(dir); + SetMoveDir(dir); + } + } else if (room->IsPveRoom() && IsEntityType(ET_Hero) && IsNearGas()) { GetMutablePos() = old_pos; GetMovement()->ClearPath(); glm::vec3 dir = GetPos().ToGlmVec3() - old_pos.ToGlmVec3();