修复最后一个毒圈无伤害问题

This commit is contained in:
aozhiwei 2019-04-10 15:40:36 +08:00
parent 0c2d2fe0bf
commit 047b93a50e
2 changed files with 5 additions and 1 deletions

View File

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

View File

@ -630,7 +630,11 @@ void Room::UpdateGas()
continue;
}
bool b1 = CircleContainCircle(gas_data.pos_old,
#if 1
gas_data.gas_progress,
#else
gas_data.rad_old,
#endif
pair.second->pos,
pair.second->GetRadius()
);