From f0f3e82cfae54585f89f5bcb94e0613fec8703c0 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 29 Aug 2024 19:35:36 +0800 Subject: [PATCH] 1 --- server/gameserver/incubator.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/gameserver/incubator.cc b/server/gameserver/incubator.cc index 63c6c284..40110a47 100644 --- a/server/gameserver/incubator.cc +++ b/server/gameserver/incubator.cc @@ -712,6 +712,12 @@ void Incubator::StartNewBattleMode() break; } } + if (!killer && !invisable_teammates.empty()) { + std::shuffle(invisable_teammates.begin(), + invisable_teammates.end(), + std::default_random_engine(a8::XGetTickCount())); + killer = invisable_teammates.at(0); + } } } },