From deeb99713e765cc7981b15cba0aa11b4aeca1ddd Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 10 Mar 2023 11:54:10 +0800 Subject: [PATCH] 1 --- server/gameserver/human.cc | 24 +++++++++++++++--------- server/gameserver/room.cc | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 8ff40bb7..30db11b7 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -1508,6 +1508,7 @@ void Human::DeadDrop() } if (!(HasBuffEffect(kBET_Become) && GetBuffByEffectId(kBET_Become)->FreezeOperate())) { #ifdef NEW_WEAPON_SYS +#else for (auto& weapon : weapons) { if (weapon.weapon_id != 0 && weapon.weapon_id != default_weapon.weapon_id @@ -1588,22 +1589,14 @@ void Human::DeadDrop() } } for (size_t slot = 0; slot < GetInventoryData().size(); ++slot) { - if (GetInventory(slot) > 0 && !mt::Param::s().fighting_mode) { + if (GetInventory(slot) > 0 && mt::Param::s().fighting_mode) { const mt::Equip* equip_meta = mt::Equip::GetByIdBySlotId(slot); if (equip_meta) { int drop_num = equip_meta->group_num(); - if (equip_meta->equip_type() == EQUIP_TYPE_BULLET) { switch (equip_meta->_inventory_slot()) { case IS_FRAG: case IS_SMOKE: - case IS_POSION_GAS_BOMB: case IS_MOLOTOR_COCKTAIL: - case IS_TRAP: - case IS_MINE: - case IS_C4: - case IS_SHIELD_WALL: - case IS_SINGAL_GUN: - case IS_OIL_BUCKET: { if (drop_num > 0) { Position drop_pos = GetPos(); @@ -1617,6 +1610,17 @@ void Human::DeadDrop() } } break; + case IS_POSION_GAS_BOMB: + case IS_TRAP: + case IS_MINE: + case IS_C4: + case IS_SHIELD_WALL: + case IS_SINGAL_GUN: + case IS_OIL_BUCKET: + { + + } + break; default: { if (drop_num > 0) { @@ -1638,10 +1642,12 @@ void Human::DeadDrop() } break; } +#if 0 } else { Position drop_pos = GetPos(); room->DropItem(drop_pos.ToGlmVec3(), equip_meta->id(), GetInventory(slot), 1); } + #endif } } } diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index b18c4d41..91aecc5d 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -3218,7 +3218,7 @@ int Room::GetOnlinePlayerNum() size_t Room::GetRoomMaxPlayerNum() { #ifdef MAP3D - return 40; + return 10; //return map_meta_->player(); #else if (pve_instance) {