This commit is contained in:
aozhiwei 2023-03-10 11:54:10 +08:00
parent dbe014eec0
commit deeb99713e
2 changed files with 16 additions and 10 deletions

View File

@ -1508,6 +1508,7 @@ void Human::DeadDrop()
} }
if (!(HasBuffEffect(kBET_Become) && GetBuffByEffectId(kBET_Become)->FreezeOperate())) { if (!(HasBuffEffect(kBET_Become) && GetBuffByEffectId(kBET_Become)->FreezeOperate())) {
#ifdef NEW_WEAPON_SYS #ifdef NEW_WEAPON_SYS
#else
for (auto& weapon : weapons) { for (auto& weapon : weapons) {
if (weapon.weapon_id != 0 && if (weapon.weapon_id != 0 &&
weapon.weapon_id != default_weapon.weapon_id weapon.weapon_id != default_weapon.weapon_id
@ -1588,22 +1589,14 @@ void Human::DeadDrop()
} }
} }
for (size_t slot = 0; slot < GetInventoryData().size(); ++slot) { 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); const mt::Equip* equip_meta = mt::Equip::GetByIdBySlotId(slot);
if (equip_meta) { if (equip_meta) {
int drop_num = equip_meta->group_num(); int drop_num = equip_meta->group_num();
if (equip_meta->equip_type() == EQUIP_TYPE_BULLET) {
switch (equip_meta->_inventory_slot()) { switch (equip_meta->_inventory_slot()) {
case IS_FRAG: case IS_FRAG:
case IS_SMOKE: case IS_SMOKE:
case IS_POSION_GAS_BOMB:
case IS_MOLOTOR_COCKTAIL: 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) { if (drop_num > 0) {
Position drop_pos = GetPos(); Position drop_pos = GetPos();
@ -1617,6 +1610,17 @@ void Human::DeadDrop()
} }
} }
break; 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: default:
{ {
if (drop_num > 0) { if (drop_num > 0) {
@ -1638,10 +1642,12 @@ void Human::DeadDrop()
} }
break; break;
} }
#if 0
} else { } else {
Position drop_pos = GetPos(); Position drop_pos = GetPos();
room->DropItem(drop_pos.ToGlmVec3(), equip_meta->id(), GetInventory(slot), 1); room->DropItem(drop_pos.ToGlmVec3(), equip_meta->id(), GetInventory(slot), 1);
} }
#endif
} }
} }
} }

View File

@ -3218,7 +3218,7 @@ int Room::GetOnlinePlayerNum()
size_t Room::GetRoomMaxPlayerNum() size_t Room::GetRoomMaxPlayerNum()
{ {
#ifdef MAP3D #ifdef MAP3D
return 40; return 10;
//return map_meta_->player(); //return map_meta_->player();
#else #else
if (pve_instance) { if (pve_instance) {