This commit is contained in:
aozhiwei 2023-01-01 14:58:30 +08:00
parent 7e7e7b11da
commit c9deadfcec

View File

@ -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__);