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