This commit is contained in:
aozhiwei 2019-03-28 11:04:24 +08:00
parent 7d9d38aee9
commit b9f5fda891
3 changed files with 25 additions and 4 deletions

View File

@ -34,6 +34,13 @@ void Building::RecalcSelfCollider()
obj.y() + obj.height()/2.0 - meta->i->tileheight()/2.0); obj.y() + obj.height()/2.0 - meta->i->tileheight()/2.0);
colliders.push_back(collider); colliders.push_back(collider);
} }
for (auto& obj : meta->doors) {
#if 0
MetaData::MapThing* thing = MetaMgr::Instance()->GetMapThing(obj.id());
if (thing) {
}
#endif
}
for (auto& obj : meta->i->lootobj()) { for (auto& obj : meta->i->lootobj()) {
MetaData::MapThing* thing = MetaMgr::Instance()->GetMapThing(obj.id()); MetaData::MapThing* thing = MetaMgr::Instance()->GetMapThing(obj.id());
if (thing) { if (thing) {

View File

@ -42,7 +42,17 @@ namespace MetaData
struct Building struct Building
{ {
struct Door
{
int door_id = 0;
const metatable::DoorObjJson* state0 = nullptr;
const metatable::DoorObjJson* state1 = nullptr;
const metatable::DoorObjJson* state2 = nullptr;
};
const metatable::BuildingJson* i = nullptr; const metatable::BuildingJson* i = nullptr;
std::vector<Door> doors;
}; };
struct Drop struct Drop

View File

@ -170,9 +170,13 @@ message MFObstacleFull
optional bool dead_at_thisframe = 9; //() optional bool dead_at_thisframe = 9; //()
optional bool is_door = 20; // optional bool is_door = 20; //
optional int32 door_relative_ori = 21; // //is_door==ture时以下字段才有意义
optional bool door_can_use = 22; // // 0: 1: door_old_state != door_new_state时播动画/
optional int32 door_seq = 23; optional int32 door_id = 22; //id
optional int32 door_old_state = 23; //
optional int32 door_new_state = 24; //
optional int32 door_house_uniid = 25; //id
} }
//- //-
@ -496,7 +500,7 @@ message CMMove
//use_scope视野 //use_scope视野
optional bool interaction = 9; // optional bool interaction = 9; //
optional int32 interaction_objid = 23; //id repeated int32 interaction_objids = 23; //id列表
} }
// //