From d110245ba7cd0dec145f0971535b913c94b81ba3 Mon Sep 17 00:00:00 2001 From: eyakm1 Date: Mon, 20 Mar 2023 15:31:13 +0300 Subject: [PATCH] PlayerStart Choosing finally works! --- Config/DefaultEngine.ini | 2 +- Content/BP_MyGameMode.uasset | Bin 0 -> 18154 bytes Content/BattleField/BattleFieldMap.umap | Bin 634260 -> 634586 bytes Source/TurnBasedTutorial/MyGameMode.cpp | 27 ++++++----- Source/TurnBasedTutorial/MyGameMode.h | 4 +- Source/TurnBasedTutorial/MyPawn.cpp | 58 ++++++++++++------------ Source/TurnBasedTutorial/MyPawn.h | 32 ++++++------- 7 files changed, 63 insertions(+), 60 deletions(-) create mode 100644 Content/BP_MyGameMode.uasset diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index 50c64f0..ac3dc22 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -12,7 +12,7 @@ bOffsetPlayerGamepadIds=False GameInstanceClass=/Script/Engine.GameInstance GameDefaultMap=/Game/MainMenu/MainMenuLevel.MainMenuLevel ServerDefaultMap=/Engine/Maps/Entry.Entry -GlobalDefaultGameMode=/Script/TurnBasedTutorial.MyGameMode +GlobalDefaultGameMode=/Script/Engine.GameMode GlobalDefaultServerGameMode=None [/Script/HardwareTargeting.HardwareTargetingSettings] diff --git a/Content/BP_MyGameMode.uasset b/Content/BP_MyGameMode.uasset new file mode 100644 index 0000000000000000000000000000000000000000..f27bd1b2d733160e79d404e4f376b282e1491a0e GIT binary patch literal 18154 zcmeHP3w%`7nLmR;9)&itCR`InMVS_ z-Tig<`l)< z?HRlBYf~TH{=)a~S^8<+Xo6j29DQMje~<6=@i*U^ai2Y52EpF#-1FvP@2(HO@Qdnu z8XgZ;o=dQFjS#~rZ`M;9WhEj-zq?#Qlu=$=9cZWxRQqac>godxHD1p`&-{8{gSV#6 zQ(afT+Ie=%;wWEIb*p2f>1b^_x)4LBI*!oJj zx9p|A-sB42e&Z{_lAFJ`7xLZD_comvvx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KiGjvQ|brNgOA94ETvH|t>hhoA$jIS$HDvMf8r zycgF{UNvjh=uz%jWF7lcNw;~_dXAgEW^~gx-%$-KF8au{C*_Xv$M_k!R*UIwov_kw z`ua25T`5T|rnQ^q#)A(xxjW`gq})FGrwoQ>J;kxsZNRUh7fNQrc+*D?_049Js)yY2 zShtpu2i=2d;?bk0H&#i9S9a2&88c;od2%#54sGO40zG=V62r1Mx<%d!jKg^=0Bloa z$|xW3pOE0ISESr!xU+vc%Tvt;)`rzu&tTi>E>wxV-(*!8SNRN;o10G1q3?9%4R3NW zmT@_$ur-yJs=VMTz2eSeKi_rn`~D{@M)vI7SLIo(8szMISPrL_YZWr@Ss@7$PXf~X d*xihhVEe&SLBtA$$P_HQfr^v$e)=yr{{^)y%!L2| literal 0 HcmV?d00001 diff --git a/Content/BattleField/BattleFieldMap.umap b/Content/BattleField/BattleFieldMap.umap index a8e5f1e27d3e1fe06ace28d80e7abc3939b81045..9b153aac0008f65f162dc5f7b659586ba632929a 100644 GIT binary patch delta 13912 zcmeHNd3aStmcKV7Aqj~l`m($S8t5z}Av*yAPi2Wq-4nRwe7#QmbFTNh3@8O{}i1u9#DuSCU^mNCGr%;n4^aFxU@4 z{bZW4ythCl`vy&WZ>vF5e>*8PSBjnbiCzw(72Hx$S6wh-!j!QKP#arcRjplUnp`P9 z4Rf}y44V+15>F@}{**GU_dT`MBH_m5_Aevf50i+StEX1Xt!*@A+%f#%pW2T{zZ2;i z|3FQ3WusO-`g6TIiKhODOyYVgm;RWOUBJ9f7+4a?Uk)vo zOs{lydOC-5!ylBwbSUJs!TiXAIdBEcagq~=@ff|7pxr@1zL;mafWhno2lJH!%t0PM zz(g55oBagJ=eoaz3Yku3>@2gv6fylP!W0L=$nl3T0~+1v2a4u4`LaxV33EHwl|sQV zbGv|0RcyrD44pZqZ%HG62J9LgVL#VCggg;D+#3Ny~Iq9^3+$9KWh6T5(^vc(wwr(yOu zVvs^ zR98nZhmBPFW*dx(8XVJxeZ5Yt7N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O04K- diff --git a/Source/TurnBasedTutorial/MyGameMode.cpp b/Source/TurnBasedTutorial/MyGameMode.cpp index d354852..9dc7afe 100644 --- a/Source/TurnBasedTutorial/MyGameMode.cpp +++ b/Source/TurnBasedTutorial/MyGameMode.cpp @@ -15,27 +15,30 @@ AMyGameMode::AMyGameMode() : Super() AActor* AMyGameMode::ChoosePlayerStart_Implementation(AController* Player) { UE_LOG(LogTemp, Warning, TEXT("GameMode ChoosePlayerStart %d"), GetNumPlayers()); - InitializeSpawnPointsIfNeeded(); + InitializeSpawnPointsIfNeeded(Player); auto ptr = *SpawnPoints.Find(GetNumPlayers()); UE_LOG(LogTemp, Warning, TEXT("GameMode ChoosePlayerStart end %d"), ptr->GetPlayerIndex()); return ptr; } -void AMyGameMode::InitializeSpawnPointsIfNeeded() +void AMyGameMode::InitializeSpawnPointsIfNeeded(AController* Player) { if (SpawnPoints.Num() != 0) { return; } - for (TActorIterator PlayerStartIterator(GetWorld()); PlayerStartIterator; ++PlayerStartIterator) { - UE_LOG(LogTemp, Warning, TEXT("PlayerStart iterator %d"), PlayerStartIterator->GetPlayerIndex()); - SpawnPoints.Add(PlayerStartIterator->GetPlayerIndex(), *PlayerStartIterator); + auto World = GetWorld(); + for (TActorIterator PlayerStartIterator(GetWorld()); PlayerStartIterator; ++PlayerStartIterator) + { + auto PlayerStart = *PlayerStartIterator; + UClass* PawnClass = GetDefaultPawnClassForController(Player); + APawn* PawnToFit = PawnClass ? PawnClass->GetDefaultObject() : nullptr; + FVector ActorLocation = PlayerStart->GetActorLocation(); + const FRotator ActorRotation = PlayerStart->GetActorRotation(); + if (!World->EncroachingBlockingGeometry(PawnToFit, ActorLocation, ActorRotation)) + { + SpawnPoints.Add(PlayerStartIterator->GetPlayerIndex(), *PlayerStartIterator); + UE_LOG(LogTemp, Warning, TEXT("PlayerStart unoccupied iterator %d"), PlayerStartIterator->GetPlayerIndex()); + } } - // TArray MyPlayerStartObjects; - // UGameplayStatics::GetAllActorsOfClass(GetWorld(), AMyPlayerStart::StaticClass(), MyPlayerStartObjects); - // for (const auto& PlayerStart : MyPlayerStartObjects) - // { - // SpawnPoints.Add(dynamic_cast(PlayerStart)->GetPlayerIndex(), - // dynamic_cast(PlayerStart)); - // } } diff --git a/Source/TurnBasedTutorial/MyGameMode.h b/Source/TurnBasedTutorial/MyGameMode.h index 9eafea1..a0bb877 100644 --- a/Source/TurnBasedTutorial/MyGameMode.h +++ b/Source/TurnBasedTutorial/MyGameMode.h @@ -20,10 +20,10 @@ class TURNBASEDTUTORIAL_API AMyGameMode : public AGameMode public: AMyGameMode(); - AActor* ChoosePlayerStart_Implementation(AController* Player); + virtual AActor* ChoosePlayerStart_Implementation(AController* Player) override; private: - void InitializeSpawnPointsIfNeeded(); + void InitializeSpawnPointsIfNeeded(AController *Player); TMap SpawnPoints; }; diff --git a/Source/TurnBasedTutorial/MyPawn.cpp b/Source/TurnBasedTutorial/MyPawn.cpp index 640053e..b250cbe 100644 --- a/Source/TurnBasedTutorial/MyPawn.cpp +++ b/Source/TurnBasedTutorial/MyPawn.cpp @@ -4,32 +4,32 @@ #include "MyPawn.h" -// Sets default values -AMyPawn::AMyPawn() -{ - // Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don't need it. - PrimaryActorTick.bCanEverTick = true; - -} - -// Called when the game starts or when spawned -void AMyPawn::BeginPlay() -{ - Super::BeginPlay(); - -} - -// Called every frame -void AMyPawn::Tick(float DeltaTime) -{ - Super::Tick(DeltaTime); - -} - -// Called to bind functionality to input -void AMyPawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) -{ - Super::SetupPlayerInputComponent(PlayerInputComponent); - -} - +// // Sets default values +// AMyPawn::AMyPawn() +// { +// // Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don't need it. +// PrimaryActorTick.bCanEverTick = true; +// +// } +// +// // Called when the game starts or when spawned +// void AMyPawn::BeginPlay() +// { +// Super::BeginPlay(); +// +// } +// +// // Called every frame +// void AMyPawn::Tick(float DeltaTime) +// { +// Super::Tick(DeltaTime); +// +// } +// +// // Called to bind functionality to input +// void AMyPawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) +// { +// Super::SetupPlayerInputComponent(PlayerInputComponent); +// +// } +// diff --git a/Source/TurnBasedTutorial/MyPawn.h b/Source/TurnBasedTutorial/MyPawn.h index 40953df..2049c14 100644 --- a/Source/TurnBasedTutorial/MyPawn.h +++ b/Source/TurnBasedTutorial/MyPawn.h @@ -11,21 +11,21 @@ class TURNBASEDTUTORIAL_API AMyPawn : public APawn { GENERATED_BODY() -public: - // Sets default values for this pawn's properties - AMyPawn(); - -protected: - // Called when the game starts or when spawned - virtual void BeginPlay() override; - -public: - // Called every frame - virtual void Tick(float DeltaTime) override; - - // Called to bind functionality to input - virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; - - +// public: +// // Sets default values for this pawn's properties +// AMyPawn(); +// +// protected: +// // Called when the game starts or when spawned +// virtual void BeginPlay() override; +// +// public: +// // Called every frame +// virtual void Tick(float DeltaTime) override; +// +// // Called to bind functionality to input +// virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; +// +// };