Fix frontend input release and vegetation proxies
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "AgrarianMvpFrontendWidget.h"
|
||||
|
||||
#include "AgrarianGamePlayerController.h"
|
||||
#include "Blueprint/WidgetTree.h"
|
||||
#include "Components/Border.h"
|
||||
#include "Components/Button.h"
|
||||
@@ -205,18 +206,24 @@ void UAgrarianMvpFrontendWidget::CompleteFrontendFlow()
|
||||
{
|
||||
if (APlayerController* PlayerController = GetOwningPlayer())
|
||||
{
|
||||
if (ActiveScreen == EAgrarianMvpFrontendScreen::CharacterSelection || ActiveScreen == EAgrarianMvpFrontendScreen::Loading)
|
||||
if (AAgrarianGamePlayerController* AgrarianPlayerController = Cast<AAgrarianGamePlayerController>(PlayerController))
|
||||
{
|
||||
PlayerController->ConsoleCommand(SelectedCharacterArchetype == EAgrarianMvpCharacterArchetype::YoungAdultFemale
|
||||
? TEXT("AgrarianSelectCharacter female")
|
||||
: TEXT("AgrarianSelectCharacter male"));
|
||||
}
|
||||
if (ActiveScreen == EAgrarianMvpFrontendScreen::CharacterSelection || ActiveScreen == EAgrarianMvpFrontendScreen::Loading)
|
||||
{
|
||||
AgrarianPlayerController->AgrarianSelectCharacter(SelectedCharacterArchetype == EAgrarianMvpCharacterArchetype::YoungAdultFemale
|
||||
? TEXT("female")
|
||||
: TEXT("male"));
|
||||
}
|
||||
|
||||
PlayerController->ConsoleCommand(TEXT("AgrarianCompleteFrontend"));
|
||||
PlayerController->SetInputMode(FInputModeGameOnly());
|
||||
PlayerController->bShowMouseCursor = false;
|
||||
PlayerController->SetIgnoreMoveInput(false);
|
||||
PlayerController->SetIgnoreLookInput(false);
|
||||
AgrarianPlayerController->AgrarianCompleteFrontend();
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerController->SetInputMode(FInputModeGameOnly());
|
||||
PlayerController->bShowMouseCursor = false;
|
||||
PlayerController->ResetIgnoreMoveInput();
|
||||
PlayerController->ResetIgnoreLookInput();
|
||||
}
|
||||
}
|
||||
|
||||
RemoveFromParent();
|
||||
|
||||
Reference in New Issue
Block a user