Skip to content

Commit

Permalink
new client whitespace, checking client name too much...
Browse files Browse the repository at this point in the history
  • Loading branch information
bnlrnz committed Oct 15, 2020
1 parent d174521 commit d28f395
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Source/xsite_ue/CaveControllerActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ void ACaveControllerActor::LoadWallScreenConfig()
{
UE_LOG(LogCave, Display, TEXT("Found Client %s-%d for wall %s"), *Client.name, Client.id, *Wall.name);

if (CaveGameInstance != nullptr && !CaveGameInstance->GetComputerName().ToLower().Equals(Client.name.ToLower()))
// Check if we are on the correct client
if (CaveGameInstance != nullptr &&
!CaveGameInstance->GetComputerName().ToLower().Equals(Client.name.ToLower()) &&
!Client.name.Equals(FString("AllClients")) &&
!Client.name.Equals("*"))
{
UE_LOG(LogCave, Display, TEXT("Skipping Client... not my business"));
continue;
Expand Down
6 changes: 5 additions & 1 deletion Source/xsite_ue/MultiViewportCameraActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ void AMultiViewportCameraActor::PreInitializeComponents()
// Called when the game starts or when spawned
void AMultiViewportCameraActor::BeginPlay()
{
// This shouldn't be reached in the first place if we are on the wrong client/computer
// check whether we should spawn this screen on the current machine
// AMultiViewportCameraActor should only be spawned on the correct clients,
// Look at CaveController.cpp, there is almost the same statement
bEnabledScreen =
CaveGameInstance->GetComputerName().ToLower().Equals(this->ClientName.ToLower()) || this->ClientName.Equals("AllClients") ||
CaveGameInstance->GetComputerName().ToLower().Equals(this->ClientName.ToLower()) ||
this->ClientName.Equals(FString("AllClients")) ||
this->ClientName.Equals("*");

// remove screen mesh from scene, we dont need it anymore
Expand Down

0 comments on commit d28f395

Please sign in to comment.