This commit is contained in:
aozhiwei 2023-01-04 19:20:25 +08:00
parent 5134533e6f
commit 225f9e6c29
2 changed files with 2 additions and 2 deletions

View File

@ -945,9 +945,8 @@ void Bullet::Raycast()
sender.Get()->room->map_instance->Scale(end);
bool ret = sender.Get()->room->map_instance->Raycast(0, start, end, hit_point, hit_result);
if (ret) {
raycast_hited = true;
sender.Get()->room->map_instance->UnScale(hit_point);
raycast_len_ = GlmHelper::Norm(hit_point - born_pos.ToGlmVec3());
} else {
raycast_len_ = 0.0f;
}
}

View File

@ -90,6 +90,7 @@ private:
bool strengthened_ = false;
std::list<int> buff_list_;
bool raycasted_ = false;
bool raycast_hited = false;
float raycast_len_ = 0.0f;
friend class EntityFactory;