1
This commit is contained in:
parent
046b9c4d91
commit
f8bff044ef
@ -520,6 +520,15 @@ void Room::ScatterDrop(const glm::vec3& center, int drop_id, bool no_adjust)
|
||||
const glm::vec3 pos = center;
|
||||
const mt::Equip* equip_meta = mt::Equip::GetById(std::get<0>(item));
|
||||
if (equip_meta) {
|
||||
#if 1
|
||||
DropItemEx(center,
|
||||
pos,
|
||||
std::get<0>(item),
|
||||
std::get<1>(item),
|
||||
std::get<2>(item),
|
||||
true,
|
||||
no_adjust);
|
||||
#else
|
||||
DropItemEx(center + dir * (5.0f + rand() % 50),
|
||||
pos,
|
||||
std::get<0>(item),
|
||||
@ -527,6 +536,7 @@ void Room::ScatterDrop(const glm::vec3& center, int drop_id, bool no_adjust)
|
||||
std::get<2>(item),
|
||||
true,
|
||||
no_adjust);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -596,12 +606,16 @@ int Room::CreateLoot(int equip_id, const glm::vec3& born_pos, const glm::vec3& p
|
||||
|
||||
int Room::CreateLootEx(int equip_id, const glm::vec3& born_pos, const glm::vec3& pos, int count, int equip_lv, bool show_anim, bool no_adjust)
|
||||
{
|
||||
glm::vec3 real_pos = pos;
|
||||
if (!no_adjust) {
|
||||
|
||||
}
|
||||
const mt::Equip* equip_meta = mt::Equip::GetById(equip_id);
|
||||
if (equip_meta) {
|
||||
Loot* entity = EntityFactory::Instance()->MakeLoot(AllocUniid());
|
||||
entity->room = this;
|
||||
entity->meta = equip_meta;
|
||||
entity->GetMutablePos().FromGlmVec3(pos);
|
||||
entity->GetMutablePos().FromGlmVec3(real_pos);
|
||||
entity->born_pos.FromGlmVec3(born_pos);
|
||||
entity->show_anim = show_anim;
|
||||
entity->create_frame_no = GetFrameNo();
|
||||
|
Loading…
x
Reference in New Issue
Block a user