From 85b9e474f37919211f08a1ce047cd94578b014b8 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 6 Jan 2021 16:58:12 +0800 Subject: [PATCH] 1 --- server/gameserver/human.cc | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index ab39bb2..553ffa1 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -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); } }