use item ok

This commit is contained in:
aozhiwei 2019-04-08 13:52:22 +08:00
parent 2a2620b516
commit 715310d137
3 changed files with 4 additions and 3 deletions

View File

@ -35,7 +35,7 @@ void Building::RecalcSelfCollider()
colliders.push_back(collider); colliders.push_back(collider);
} }
for (auto& obj : meta->doors) { for (auto& obj : meta->doors) {
MetaData::MapThing* thing = MetaMgr::Instance()->GetMapThing(61018); MetaData::MapThing* thing = MetaMgr::Instance()->GetMapThing(61701);
if (thing) { if (thing) {
Obstacle* entity = new Obstacle(); Obstacle* entity = new Obstacle();
entity->room = room; entity->room = room;

View File

@ -190,8 +190,9 @@ void Player::UpdateAction()
if (inventory[item_meta->i->_inventory_slot()] > 0) { if (inventory[item_meta->i->_inventory_slot()] > 0) {
health += item_meta->i->heal(); health += item_meta->i->heal();
health = std::max(100.0f, health); health = std::max(100.0f, health);
++inventory[item_meta->i->_inventory_slot()]; --inventory[item_meta->i->_inventory_slot()];
need_sync_active_player = true; need_sync_active_player = true;
SyncAroundPlayers();
} }
} }
} }

View File

@ -222,7 +222,7 @@ void Room::ShuaObstacle(Human* hum)
void Room::ShuaBuilding(Human* hum) void Room::ShuaBuilding(Human* hum)
{ {
MetaData::Building* a_building = MetaMgr::Instance()->GetBuilding(0); MetaData::Building* a_building = MetaMgr::Instance()->GetBuilding(1);
if (!a_building) { if (!a_building) {
return; return;
} }