diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 0b9fa4bb..d53f080d 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -3054,13 +3054,11 @@ void Human::DropWeapon(int weapon_idx, int num) weapon_idx == GUN_SLOT0 || weapon_idx == GUN_SLOT1 || weapon_idx == GUN_SLOT2) { - a8::Vec2 dir = a8::Vec2::UP; - dir.Rotate(a8::RandAngle()); - // 999 - #if 1 - #else - room->CreateLoot(weapon_id, GetPos() + dir * (40 + rand() % 50), 1, 1); - #endif + glm::vec3 dir = GlmHelper::UP; + GlmHelper::RotateY(dir, a8::RandAngle()); + Position pos = GetPos(); + pos.FromGlmVec3(GetPos().ToGlmVec3() + dir * (40.0f + rand() % 50)); + room->CreateLoot(weapon_id, pos, 1, 1); } MarkSyncActivePlayer(__FILE__, __LINE__, __func__); SyncAroundPlayers(__FILE__, __LINE__, __func__);