添加视野配置读取
This commit is contained in:
parent
6cead934aa
commit
0c7ea381ec
@ -145,6 +145,7 @@ public:
|
|||||||
MetaMgr::Instance()->niube_win_times = MetaMgr::Instance()->GetSysParamAsInt("niube_win_times", 1);
|
MetaMgr::Instance()->niube_win_times = MetaMgr::Instance()->GetSysParamAsInt("niube_win_times", 1);
|
||||||
MetaMgr::Instance()->newbie_fill_interval = MetaMgr::Instance()->GetSysParamAsInt("newbie_fill_interval", 5000);
|
MetaMgr::Instance()->newbie_fill_interval = MetaMgr::Instance()->GetSysParamAsInt("newbie_fill_interval", 5000);
|
||||||
MetaMgr::Instance()->other_fill_interval = MetaMgr::Instance()->GetSysParamAsInt("other_fill_interval", 2000);
|
MetaMgr::Instance()->other_fill_interval = MetaMgr::Instance()->GetSysParamAsInt("other_fill_interval", 2000);
|
||||||
|
MetaMgr::Instance()->map_cell_width = MetaMgr::Instance()->GetSysParamAsInt("map_cell_width", 64 * 8);
|
||||||
if (MetaMgr::Instance()->K < 0.01f) {
|
if (MetaMgr::Instance()->K < 0.01f) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@ class MetaMgr : public a8::Singleton<MetaMgr>
|
|||||||
float android_attack_range = 0;
|
float android_attack_range = 0;
|
||||||
float android_pursuit_range = 0;
|
float android_pursuit_range = 0;
|
||||||
float android_patrol_range = 0;
|
float android_patrol_range = 0;
|
||||||
|
int map_cell_width = 64 * 8;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MetaDataLoader* loader_ = nullptr;
|
MetaDataLoader* loader_ = nullptr;
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include "gamelog.h"
|
#include "gamelog.h"
|
||||||
#include "typeconvert.h"
|
#include "typeconvert.h"
|
||||||
|
|
||||||
const int MAP_CELL_WIDTH = 64 * 8;
|
|
||||||
const int MAP_GRID_WIDTH = 64;
|
const int MAP_GRID_WIDTH = 64;
|
||||||
const int ROOM_MAX_PLAYER_NUM = 40;
|
const int ROOM_MAX_PLAYER_NUM = 40;
|
||||||
|
|
||||||
@ -52,7 +51,7 @@ void Room::Init()
|
|||||||
xtimer_attacher.xtimer = &xtimer;
|
xtimer_attacher.xtimer = &xtimer;
|
||||||
grid_service.Init(map_meta->i->map_width(),
|
grid_service.Init(map_meta->i->map_width(),
|
||||||
map_meta->i->map_height(),
|
map_meta->i->map_height(),
|
||||||
MAP_CELL_WIDTH);
|
MetaMgr::Instance()->map_cell_width);
|
||||||
map_service.Init(map_meta->i->map_width() / MAP_GRID_WIDTH,
|
map_service.Init(map_meta->i->map_width() / MAP_GRID_WIDTH,
|
||||||
map_meta->i->map_height() / MAP_GRID_WIDTH,
|
map_meta->i->map_height() / MAP_GRID_WIDTH,
|
||||||
MAP_GRID_WIDTH);
|
MAP_GRID_WIDTH);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user