This commit is contained in:
aozhiwei 2023-03-02 13:57:11 +08:00
parent 077cc66182
commit 3e5db8026a

View File

@ -1602,6 +1602,12 @@ void Player::UpdateThrowBomb()
throw_bomb.reset();
return;
}
if (pending_throw_bomb.find(throw_bomb->throw_uniid()) !=
pending_throw_bomb.end() ||
!throw_bomb->throw_uniid()) {
throw_bomb.reset();
return;
}
const mt::Equip* equip_meta = mt::Equip::GetById(throw_bomb->weapon_id());
if (equip_meta && equip_meta->_inventory_slot() > 0) {
int slot_id = 0;
@ -1640,6 +1646,7 @@ void Player::UpdateThrowBomb()
weapon.ammo,
true
);
pending_throw_bomb[throw_bomb->throw_uniid()] = throw_bomb;
}
}
}