1
This commit is contained in:
parent
f850905c0f
commit
5af1487982
@ -101,9 +101,15 @@ void MapInstance::Init()
|
||||
}
|
||||
map_service_ = std::make_shared<MapService>();
|
||||
grid_service_ = std::make_shared<GridService>();
|
||||
grid_service_->Init(map_meta_->map_width(),
|
||||
map_meta_->map_height(),
|
||||
mt::Param::s().map_cell_width);
|
||||
if (map_meta_->is_moba()) {
|
||||
grid_service_->Init(map_meta_->map_width(),
|
||||
map_meta_->map_height(),
|
||||
std::max(map_meta_->map_width(), map_meta_->map_height()) + 0);
|
||||
} else {
|
||||
grid_service_->Init(map_meta_->map_width(),
|
||||
map_meta_->map_height(),
|
||||
mt::Param::s().map_cell_width);
|
||||
}
|
||||
map_service_->Init(map_meta_->map_width() / MAP_GRID_WIDTH,
|
||||
map_meta_->map_height() / MAP_GRID_WIDTH,
|
||||
MAP_GRID_WIDTH);
|
||||
|
Loading…
x
Reference in New Issue
Block a user