This commit is contained in:
aozhiwei 2021-01-06 16:58:12 +08:00
parent 4e7ddfa237
commit 85b9e474f3

View File

@ -4140,6 +4140,9 @@ void Human::ProcReloadAction()
void Human::NextReload(int prev_weapon_id, int prev_weapon_idx)
{
if (action_type != AT_None) {
return;
}
Weapon* p_weapon = curr_weapon;
if (car_weapon.meta) {
p_weapon = &car_weapon;
@ -4147,17 +4150,6 @@ void Human::NextReload(int prev_weapon_id, int prev_weapon_idx)
if (p_weapon &&
p_weapon->weapon_id == prev_weapon_id &&
p_weapon->weapon_idx == prev_weapon_idx) {
if (p_weapon->weapon_idx != 0 &&
p_weapon->ammo < p_weapon->GetClipVolume()) {
MetaData::Equip* bullet_meta = MetaMgr::Instance()->GetEquip(p_weapon->meta->i->use_bullet());
if (bullet_meta) {
if (bullet_meta->i->_inventory_slot() >= 0 &&
bullet_meta->i->_inventory_slot() < IS_END) {
if (GetInventory(bullet_meta->i->_inventory_slot()) > 0) {
AutoLoadingBullet();
}
}
}
}
AutoLoadingBullet(true);
}
}