diff --git a/server/gameserver/constant.h b/server/gameserver/constant.h index db90db7..c8fd89a 100755 --- a/server/gameserver/constant.h +++ b/server/gameserver/constant.h @@ -250,8 +250,8 @@ const int GUN_SLOT2 = 2; const int FRAG_SLOT = 3; const int SMOKE_SLOT = 4; -const int MAP_HEIGHT = 2560; -const int MAP_WIDTH = 2560; +const int MAP_HEIGHT = 32*75; +const int MAP_WIDTH = 32*65; const int MAP_CELL_WIDTH = 64 * 8; const int MAP_GRID_WIDTH = 64; diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 408a8a8..bbde143 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -360,15 +360,11 @@ void Room::CreateThings() assert(thing_meta); #endif if (thing_meta) { - #if 1 - CreateObstacle(thing_id, thing_tpl.i->x(), thing_tpl.i->y()); - #else if (thing_meta->i->is_house()) { CreateBuilding(thing_id, thing_tpl.i->x(), thing_tpl.i->y()); } else { CreateObstacle(thing_id, thing_tpl.i->x(), thing_tpl.i->y()); } - #endif } } } @@ -397,7 +393,6 @@ void Room::DropItem(a8::Vec2 pos, int item_id, int item_count, int item_lv) void Room::CreateBuilding(int thing_id, float building_x, float building_y) { - #if 0 MetaData::MapThing* thing_meta = MetaMgr::Instance()->GetMapThing(thing_id); if (!thing_meta) { return; @@ -460,7 +455,6 @@ void Room::CreateBuilding(int thing_id, float building_x, float building_y) ); } } - #endif } Obstacle* Room::CreateObstacle(int id, float x, float y) diff --git a/server/tools/protobuild/metatable.proto b/server/tools/protobuild/metatable.proto index 03f5677..8596564 100755 --- a/server/tools/protobuild/metatable.proto +++ b/server/tools/protobuild/metatable.proto @@ -37,6 +37,8 @@ message MapThing required float damage_dia = 7; //伤害半径 required int32 drop = 8; //掉落 required int32 attack_type = 9; //是否可攻击 0:不可破坏对象 1:可破坏对象 2:可穿透对象 + required int32 is_house = 10; + required int32 house_id = 11; } message SafeArea