This commit is contained in:
aozhiwei 2020-07-14 15:35:19 +08:00
parent 9c7bcc4db0
commit 338f483f60
2 changed files with 4 additions and 0 deletions

View File

@ -761,6 +761,9 @@ void Human::AutoLoadingBullet(bool manual)
bullet_meta->i->_inventory_slot() < (int)inventory_.size()
) {
if (GetInventory(bullet_meta->i->_inventory_slot()) > 0) {
if (on_loading_bullet) {
on_loading_bullet();
}
StartAction(AT_Reload,
curr_weapon->meta->i->reload_time(),
curr_weapon->weapon_id,

View File

@ -53,6 +53,7 @@ class Human : public MoveableEntity
a8::Vec2 move_dir;
a8::Vec2 attack_dir;
std::function<void ()> on_loading_bullet;
std::string name;
std::string avatar_url;