This commit is contained in:
aozhiwei 2023-01-01 15:08:12 +08:00
parent 11f92cbd3a
commit 4937c702fd

View File

@ -1634,13 +1634,11 @@ void Human::ProcLootSkin(AddItemDTO& dto)
Skin* old_skin = GetSkinByIdx(kSkinSlot_HAT);
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();
@ -2868,7 +2866,7 @@ void Human::DropWeapon(int weapon_idx, int num)
MarkSyncActivePlayer(__FILE__, __LINE__, __func__);
glm::vec3 drop_dir = GlmHelper::UP;
Glmhelper::RotateY(drop_dir, a8::RandAngle());
GlmHelper::RotateY(drop_dir, a8::RandAngle());
Position drop_pos = GetPos();
drop_pos.AddGlmVec3(drop_dir * (25.0f + rand() % 50));
room->DropItem(drop_pos, item_meta->id(), num, 1);