diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 32de309..17f1e15 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -226,53 +226,6 @@ void Human::Shot(a8::Vec2& target_dir) room->CreateBullet(this, curr_weapon, bullet_born_pos, attack_dir, fly_distance); } --curr_weapon->ammo; - #if 0 - int slot_id = curr_weapon->meta->i->_inventory_slot(); - switch (slot_id) { - case 5: - { - //手雷 - if (GetInventory(slot_id) > 0) { - DecInventory(slot_id, 1); - ++curr_weapon->ammo; - } else { - int weapon_idx = curr_weapon->weapon_idx; - *curr_weapon = Weapon(); - curr_weapon->weapon_idx = weapon_idx; - if (weapons[SMOKE_SLOT].weapon_id != 0) { - curr_weapon = &weapons[SMOKE_SLOT]; - } else { - curr_weapon = &weapons[0]; - } - AutoLoadingBullet(); - } - need_sync_active_player = true; - SyncAroundPlayers(); - } - break; - case 6: - { - //烟雾弹 - if (GetInventory(slot_id) > 0) { - DecInventory(slot_id, 1); - ++curr_weapon->ammo; - } else { - int weapon_idx = curr_weapon->weapon_idx; - *curr_weapon = Weapon(); - curr_weapon->weapon_idx = weapon_idx; - if (weapons[FRAG_SLOT].weapon_id != 0) { - curr_weapon = &weapons[FRAG_SLOT]; - } else { - curr_weapon = &weapons[0]; - } - AutoLoadingBullet(); - } - need_sync_active_player = true; - SyncAroundPlayers(); - } - break; - } - #endif last_shot_frameno_ = room->frame_no; need_sync_active_player = true; }