1
This commit is contained in:
parent
a4288cdb9b
commit
52b0391258
@ -882,5 +882,5 @@ bool MapInstance::SceneRaycast(const glm::vec3& orig,
|
|||||||
float max_distance,
|
float max_distance,
|
||||||
glm::vec3& hit_pos)
|
glm::vec3& hit_pos)
|
||||||
{
|
{
|
||||||
|
int raycast_index = MapMgr::Instance()->IncCurrRaycastIndex();
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ void MapMgr::Init()
|
|||||||
map_instance->map_id = map_meta->map_id();
|
map_instance->map_id = map_meta->map_id();
|
||||||
map_instance->Init();
|
map_instance->Init();
|
||||||
instance_hash_[map_instance->map_id] = map_instance;
|
instance_hash_[map_instance->map_id] = map_instance;
|
||||||
|
instance_list_.push_back(map_instance);
|
||||||
{
|
{
|
||||||
auto itr = mode_hash_.find(map_meta->map_mode());
|
auto itr = mode_hash_.find(map_meta->map_mode());
|
||||||
if (itr != mode_hash_.end()) {
|
if (itr != mode_hash_.end()) {
|
||||||
|
@ -17,11 +17,14 @@ public:
|
|||||||
|
|
||||||
void AttachRoom(Room* room, RoomInitInfo& init_info);
|
void AttachRoom(Room* room, RoomInitInfo& init_info);
|
||||||
std::shared_ptr<MapInstance> GetMapInstance(int map_id);
|
std::shared_ptr<MapInstance> GetMapInstance(int map_id);
|
||||||
|
int IncCurrRaycastIndex() { return ++curr_raycast_index_; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<MapInstance> RandMapInstance(int map_mode);
|
std::shared_ptr<MapInstance> RandMapInstance(int map_mode);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
int curr_raycast_index_ = 1000;
|
||||||
|
std::vector<std::shared_ptr<MapInstance>> instance_list_;
|
||||||
std::map<int, std::shared_ptr<MapInstance>> instance_hash_;
|
std::map<int, std::shared_ptr<MapInstance>> instance_hash_;
|
||||||
std::map<int, std::vector<std::shared_ptr<MapInstance>>> mode_hash_;
|
std::map<int, std::vector<std::shared_ptr<MapInstance>>> mode_hash_;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user