This commit is contained in:
aozhiwei 2023-01-01 15:04:28 +08:00
parent 0908e15951
commit 11f92cbd3a

View File

@ -1656,13 +1656,11 @@ void Human::ProcLootSkin(AddItemDTO& dto)
Skin* old_skin = GetSkinByIdx(kSkinSlot_CLOTH);
if (old_skin) {
if (old_skin->skin_id != 0) {
a8::Vec2 dir = a8::Vec2::UP;
dir.Rotate(a8::RandAngle());
// 999
#if 1
#else
room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1);
#endif
glm::vec3 dir = GlmHelper::UP;
GlmHelper::RotateY(dir, a8::RandAngle());
Position drop_pos = GetPos();
drop_pos.AddGlmVec3(dir * (40.0f + rand() % 50));
room->CreateLoot(old_skin->skin_id, drop_pos, 1, 1);
}
*old_skin = Skin();
@ -2869,14 +2867,10 @@ void Human::DropWeapon(int weapon_idx, int num)
DecInventory(slot_id, num);
MarkSyncActivePlayer(__FILE__, __LINE__, __func__);
a8::Vec2 drop_dir = a8::Vec2::UP;
drop_dir.Rotate(a8::RandAngle());
// 999
#if 1
glm::vec3 drop_dir = GlmHelper::UP;
Glmhelper::RotateY(drop_dir, a8::RandAngle());
Position drop_pos = GetPos();
#else
a8::Vec2 drop_pos = GetPos() + drop_dir * (25 + rand() % 50);
#endif
drop_pos.AddGlmVec3(drop_dir * (25.0f + rand() % 50));
room->DropItem(drop_pos, item_meta->id(), num, 1);
}
}