This commit is contained in:
aozhiwei 2021-08-02 07:05:12 +00:00
parent c4aa0c1a97
commit e0561d5bfd

View File

@ -2046,6 +2046,16 @@ void Creature::SetCurrWeapon(Weapon* weapon)
}
#endif
if (curr_weapon_ != weapon) {
if (GetActionType() == AT_Reload) {
CancelAction();
if (weapon->weapon_idx != 0 &&
weapon->ammo <= 0) {
if (weapon->weapon_idx == GUN_SLOT1 |
weapon->weapon_idx == GUN_SLOT2) {
AutoLoadingBullet();
}
}
}
GetTrigger()->TakeonWeapon(curr_weapon_, weapon);
}
curr_weapon_ = weapon;