This commit is contained in:
aozhiwei 2020-05-29 20:02:12 +08:00
parent 50c77d217e
commit 675d17f1bb

View File

@ -316,7 +316,7 @@ Human* Room::FindEnemy(Human* hum)
std::sort(enemys.begin(), enemys.end(),
[hum] (Human* a, Human *b) -> bool
{
return (hum->GetPos() - a->GetPos()).Norm() < (hum->GetPos() - b->GetPos()).Norm();
return (hum->GetPos()-a->GetPos()).Norm() < (hum->GetPos()-b->GetPos()).Norm();
});
return !enemys.empty() ? enemys[0] : nullptr;
}
@ -380,10 +380,6 @@ int Room::CreateLoot(int equip_id, a8::Vec2 pos, int count, int equip_lv)
{
MetaData::Equip* equip_meta = MetaMgr::Instance()->GetEquip(equip_id);
if (equip_meta) {
if (equip_meta->i->equip_type() == 2 &&
MetaMgr::Instance()->fighting_mode) {
return 0;
}
Loot* entity = new Loot();
entity->room = this;
entity->meta = equip_meta;