This commit is contained in:
aozhiwei 2023-01-01 15:00:55 +08:00
parent c9deadfcec
commit 0908e15951

View File

@ -3026,14 +3026,10 @@ void Human::DropWeapon(int weapon_idx, int num)
int drop_num = weapon_ammo - add_inventory;
#endif
if (drop_num > 0) {
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.FromGlmVec3(GetPos().ToGlmVec3() + drop_dir * (25.0f + rand() % 50));
#if 1
{
room->DropItem(drop_pos, bullet_meta->id(), drop_num, 1);