コード例 #1
0
void FActiveGameplayCueContainer::RemoveCue(const FGameplayTag& Tag)
{
	for (int32 idx=0; idx < GameplayCues.Num(); ++idx)
	{
		FActiveGameplayCue& Cue = GameplayCues[idx];

		if (Cue.GameplayCueTag == Tag)
		{
			GameplayCues.RemoveAt(idx);
			MarkArrayDirty();
			Owner->UpdateTagMap(Tag, -1);
			return;
		}
	}
}
コード例 #2
0
void FLobbyPlayerStateInfoArray::RemovePlayer(const FUniqueNetIdRepl& UniqueId)
{
	for (int32 PlayerIdx = 0; PlayerIdx < Players.Num(); PlayerIdx++)
	{
		FLobbyPlayerStateActorInfo& Player = Players[PlayerIdx];
		if (Player.LobbyPlayerState && Player.LobbyPlayerState->UniqueId == UniqueId)
		{
			if (Player.LobbyPlayerState->GetNetMode() < NM_Client)
			{
				// server calls "on rep" also
				Player.PreReplicatedRemove(*this);

				Player.LobbyPlayerState->Destroy();
				Player.LobbyPlayerState = nullptr;
				Players.RemoveAtSwap(PlayerIdx);
				MarkArrayDirty();
				break;
			}
		}
	}
}