From c6f871d42b4c442fdbc3b7b86e0b95fb124af877 Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Fri, 27 May 2022 15:25:57 -0500 Subject: [PATCH] only make teams for minigames if we have more than one participant --- .../dComponents/ScriptedActivityComponent.cpp | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/dGame/dComponents/ScriptedActivityComponent.cpp b/dGame/dComponents/ScriptedActivityComponent.cpp index 026fafce..4d62fb0b 100644 --- a/dGame/dComponents/ScriptedActivityComponent.cpp +++ b/dGame/dComponents/ScriptedActivityComponent.cpp @@ -487,22 +487,24 @@ void ActivityInstance::StartZone() { return; auto* leader = participants[0]; - - CBITSTREAM; - PacketUtils::WriteHeader(bitStream, CHAT_INTERNAL, MSG_CHAT_INTERNAL_CREATE_TEAM); - - bitStream.Write(leader->GetObjectID()); - bitStream.Write(m_Participants.size()); - - for (const auto& participant : m_Participants) { - bitStream.Write(participant); - } - LWOZONEID zoneId = LWOZONEID(m_ActivityInfo.instanceMapID, 0, leader->GetCharacter()->GetPropertyCloneID()); - bitStream.Write(zoneId); + // only make a team if we have more than one participant + if (participants.size() > 1){ + CBITSTREAM; + PacketUtils::WriteHeader(bitStream, CHAT_INTERNAL, MSG_CHAT_INTERNAL_CREATE_TEAM); - Game::chatServer->Send(&bitStream, SYSTEM_PRIORITY, RELIABLE, 0, Game::chatSysAddr, false); + bitStream.Write(leader->GetObjectID()); + bitStream.Write(m_Participants.size()); + + for (const auto& participant : m_Participants) { + bitStream.Write(participant); + } + + bitStream.Write(zoneId); + + Game::chatServer->Send(&bitStream, SYSTEM_PRIORITY, RELIABLE, 0, Game::chatSysAddr, false); + } const auto cloneId = GeneralUtils::GenerateRandomNumber(1, UINT32_MAX); for (Entity* player : participants) {