修复手榴弹问题
This commit is contained in:
parent
72def7cf5e
commit
173b825763
@ -369,6 +369,7 @@ void Player::Shot()
|
||||
case 5:
|
||||
{
|
||||
//手雷
|
||||
if (curr_weapon->ammo <= 0) {
|
||||
if (GetInventory(slot_id) > 0) {
|
||||
DecInventory(slot_id, 1);
|
||||
++curr_weapon->ammo;
|
||||
@ -383,6 +384,7 @@ void Player::Shot()
|
||||
}
|
||||
AutoLoadingBullet();
|
||||
}
|
||||
}
|
||||
need_sync_active_player = true;
|
||||
SyncAroundPlayers();
|
||||
}
|
||||
@ -390,6 +392,7 @@ void Player::Shot()
|
||||
case 6:
|
||||
{
|
||||
//烟雾弹
|
||||
if (curr_weapon->ammo <= 0) {
|
||||
if (GetInventory(slot_id) > 0) {
|
||||
DecInventory(slot_id, 1);
|
||||
++curr_weapon->ammo;
|
||||
@ -404,6 +407,7 @@ void Player::Shot()
|
||||
}
|
||||
AutoLoadingBullet();
|
||||
}
|
||||
}
|
||||
need_sync_active_player = true;
|
||||
SyncAroundPlayers();
|
||||
}
|
||||
|
@ -356,6 +356,9 @@ void Room::FillSMMapInfo(cs::SMMapInfo& map_info)
|
||||
|
||||
void Room::DropItem(Vector2D pos, int item_id, int item_count, int item_lv)
|
||||
{
|
||||
#if 0
|
||||
item_id = 12301 + rand() % 2;
|
||||
#endif
|
||||
MetaData::Equip* equip_meta = MetaMgr::Instance()->GetEquip(item_id);
|
||||
if (equip_meta && equip_meta->i->group_num() > 0 && item_count > 0) {
|
||||
int total_count = item_count;
|
||||
|
Loading…
x
Reference in New Issue
Block a user