From e153d666cef568ded373f3d23dc50cd796e898d3 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 6 Jan 2021 16:57:04 +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 760fc024..5c375f67 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -4244,6 +4244,9 @@ void Human::OnLand() 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; @@ -4251,17 +4254,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); } }