修复手雷 毒气弹衔接问题

This commit is contained in:
aozhiwei 2021-04-19 13:56:07 +08:00
parent abc9631ae2
commit a7218d9849

View File

@ -1463,7 +1463,7 @@ Weapon* Creature::ChooseNextWeapon(int curr_weapon_slot_id, int begin_slot_id, i
abort(); abort();
} }
Weapon* next_weapon = nullptr; Weapon* next_weapon = nullptr;
for (int i = 1; i <= (end_slot_id - begin_slot_id); ++i) { for (int i = 1; i <= (end_slot_id - begin_slot_id + 1); ++i) {
int slot_id = begin_slot_id + int slot_id = begin_slot_id +
(i + curr_weapon_slot_id - begin_slot_id) % (end_slot_id - begin_slot_id + 1); (i + curr_weapon_slot_id - begin_slot_id) % (end_slot_id - begin_slot_id + 1);
int idx = -1; int idx = -1;