From bd65f5888673b4b201c5322796d4125213285269 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 20 Aug 2021 06:42:03 +0000 Subject: [PATCH] 1 --- server/gameserver/human.cc | 16 ++++++++++++++++ server/gameserver/roomobstacle.cc | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index d4810d1..14a5033 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -3577,6 +3577,22 @@ void Human::GMAddItem(int item_id, int item_num) DecInventory(item_meta->i->_inventory_slot(), add_num); } break; + case IS_C4: + case IS_SHIELD_WALL: + case IS_SINGAL_GUN: + case IS_OIL_BUCKET: + { + Weapon* weapon = &weapons[SPEC3_SLOT_BEGIN + + (item_meta->i->_inventory_slot() - SPEC3_IS_BEGIN) + ]; + weapon->weapon_id = item_id; + weapon->weapon_lv = 1; + weapon->ammo += item_num; + weapon->meta = item_meta; + weapon->Recalc(); + DecInventory(item_meta->i->_inventory_slot(), add_num); + } + break; default: { #if 0 diff --git a/server/gameserver/roomobstacle.cc b/server/gameserver/roomobstacle.cc index b70aad3..4e79e1b 100644 --- a/server/gameserver/roomobstacle.cc +++ b/server/gameserver/roomobstacle.cc @@ -444,7 +444,8 @@ void RoomObstacle::ActiveAirDrop() ); room->xtimer.AddDeadLineTimerAndAttach ( - meta->int_param2 / FRAME_RATE_MS * 1, + 0, + //meta->int_param2 / FRAME_RATE_MS * 1, a8::XParams() .SetSender(this), [] (const a8::XParams& param)