1
This commit is contained in:
parent
50c77d217e
commit
675d17f1bb
@ -316,7 +316,7 @@ Human* Room::FindEnemy(Human* hum)
|
|||||||
std::sort(enemys.begin(), enemys.end(),
|
std::sort(enemys.begin(), enemys.end(),
|
||||||
[hum] (Human* a, Human *b) -> bool
|
[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;
|
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);
|
MetaData::Equip* equip_meta = MetaMgr::Instance()->GetEquip(equip_id);
|
||||||
if (equip_meta) {
|
if (equip_meta) {
|
||||||
if (equip_meta->i->equip_type() == 2 &&
|
|
||||||
MetaMgr::Instance()->fighting_mode) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
Loot* entity = new Loot();
|
Loot* entity = new Loot();
|
||||||
entity->room = this;
|
entity->room = this;
|
||||||
entity->meta = equip_meta;
|
entity->meta = equip_meta;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user