1
This commit is contained in:
parent
99970f916a
commit
801e833591
@ -2581,6 +2581,7 @@ void Human::ProcLootWeapon(AddItemDTO& dto)
|
||||
if (FreezeOperate()) {
|
||||
return;
|
||||
}
|
||||
bool droped = false;
|
||||
if (weapons[GUN_SLOT1].weapon_id != 0 && weapons[GUN_SLOT2].weapon_id != 0) {
|
||||
if (GetCurrWeapon() == &weapons[GUN_SLOT1]) {
|
||||
if (mt::Param::s().pickup_weapon_replace_type) {
|
||||
@ -2595,6 +2596,7 @@ void Human::ProcLootWeapon(AddItemDTO& dto)
|
||||
DropWeapon(GUN_SLOT2, 1);
|
||||
}
|
||||
}
|
||||
droped = true;
|
||||
}
|
||||
bool switch_gun = false;
|
||||
Weapon* weapon = TakeonWeapon(dto.item_meta);
|
||||
@ -2606,6 +2608,9 @@ void Human::ProcLootWeapon(AddItemDTO& dto)
|
||||
if (!weapon) {
|
||||
return;
|
||||
}
|
||||
if (droped && !mt::Param::s().pickup_weapon_replace_type) {
|
||||
switch_gun = true;
|
||||
}
|
||||
weapon->weapon_id = dto.item_id;
|
||||
weapon->meta = dto.item_meta;
|
||||
weapon->ammo = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user