只有手雷和烟雾弹会掉落

This commit is contained in:
aozhiwei 2020-06-15 14:54:32 +08:00
parent 59ecd8e1c7
commit 8dc52d28e7

View File

@ -1105,10 +1105,14 @@ void Player::UpdateDropWeapon()
a8::Vec2 drop_dir = a8::Vec2::UP;
drop_dir.Rotate(a8::RandAngle());
a8::Vec2 drop_pos = GetPos() + drop_dir * (25 + rand() % 50);
if (bullet_meta->i->_inventory_slot() == IS_FRAG ||
bullet_meta->i->_inventory_slot() == IS_SMOKE) {
//只有手雷和烟雾弹会掉落
room->DropItem(drop_pos, bullet_meta->i->id(), drop_num, 1);
}
}
}
}
need_sync_active_player = true;
SyncAroundPlayers(__FILE__, __LINE__, __func__);
}