1
This commit is contained in:
parent
b901e454a7
commit
299d4da380
@ -2831,6 +2831,7 @@ void Human::DropWeapon(int weapon_idx, int num)
|
||||
return;
|
||||
}
|
||||
bool is_curr_weapon = weapon_idx == GetCurrWeapon()->weapon_idx;
|
||||
int stack_num = is_curr_weapon ? GetCompose()->GetNum() : 0;
|
||||
bool drop_ok = false;
|
||||
Weapon* weapon = &weapons[weapon_idx];
|
||||
int weapon_id = weapon->weapon_id;
|
||||
@ -2992,7 +2993,7 @@ void Human::DropWeapon(int weapon_idx, int num)
|
||||
weapon_idx == GUN_SLOT0 ||
|
||||
weapon_idx == GUN_SLOT1 ||
|
||||
weapon_idx == GUN_SLOT2) {
|
||||
int drop_num = 1;
|
||||
int drop_num = std::max(1, stack_num);
|
||||
for (int i = 0; i < drop_num; ++i) {
|
||||
glm::vec3 dir = GlmHelper::UP;
|
||||
GlmHelper::RotateY(dir, a8::RandAngle());
|
||||
|
Loading…
x
Reference in New Issue
Block a user