Fix frontend input release and vegetation proxies

This commit is contained in:
2026-05-21 20:44:02 +00:00
parent 03dbcbc5f8
commit 3f27be7f88
16 changed files with 120 additions and 46 deletions
@@ -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();