diff --git a/Content/Character/Allium/BP_Allium.uasset b/Content/Character/Allium/BP_Allium.uasset index 8af03e5..9122094 100644 --- a/Content/Character/Allium/BP_Allium.uasset +++ b/Content/Character/Allium/BP_Allium.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fcb784f0cb24a64149aec72d17cb4247ead004a0b33e9a3b4e35b5df4979ad06 -size 136354 +oid sha256:f2170a5f1bef59fe201c622cace975291f9352897ca17b186c05cacd41e8709a +size 130328 diff --git a/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset b/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset new file mode 100644 index 0000000..c02ef1e --- /dev/null +++ b/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:724dccb566fa7e134412ca13ea575939f52f9cd2298c3e6443adce92ec831911 +size 60911 diff --git a/Content/Character/Lb/Animation/ABP_Lb.uasset b/Content/Character/Lb/Animation/ABP_Lb.uasset index 493f3af..7f8c503 100644 --- a/Content/Character/Lb/Animation/ABP_Lb.uasset +++ b/Content/Character/Lb/Animation/ABP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb1f2e4bdb532036b4d1ba7dbf6a4286fd471a53369c1f1eb9f0bb785c8800b6 -size 303416 +oid sha256:60a91a0ac26b8c4b06b74e612bbf7601fd7ed5d0a3a0fe32db06ba96a33c4da9 +size 313020 diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index d792c0a..857598b 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61108077174897cc7abf4008171a6ab3d96f6cf80dde836ebb645cdcedd3378e -size 179764 +oid sha256:af8ae252c9b8cd47cafe54310152a948f91a319908354e647ac01ff55eda5742 +size 191286 diff --git a/Content/Character/Lb/LB_Bolla_Throw.uasset b/Content/Character/Lb/LB_Bolla_Throw.uasset index 8328842..3b7df4e 100644 --- a/Content/Character/Lb/LB_Bolla_Throw.uasset +++ b/Content/Character/Lb/LB_Bolla_Throw.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fb47290031b302262dc6571fe6ff9eaf99f70ad2af232f572e3f711235e94727 -size 31160 +oid sha256:aa351e49248ba6f14c769b7aca332443bbcaaf6e57cbc0fd4da26c1dad4b6d41 +size 55944 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index 8d398db..35371fd 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3391b09e0fe249eefa23c146088dae77f17837c30ce0cb5facd2f9c910a5f98 +oid sha256:c9889eedfae41ca443b755b6901e83b884f1af7e3cbc98899ebd58f8b4bf40d2 size 115131 diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index c34de91..7bebdfe 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -252,9 +252,10 @@ void ADefaultPlayerController::Skill1() FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); + Server_StopMove(); + Multicast_StopMove(); + Multicast_SetRotation(GetMouseHitLocation()); Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill1")); @@ -267,9 +268,10 @@ void ADefaultPlayerController::Skill2() FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); + Server_StopMove(); + Multicast_StopMove(); + Multicast_SetRotation(GetMouseHitLocation()); Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill2")); @@ -282,9 +284,10 @@ void ADefaultPlayerController::Skill3() FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); + Server_StopMove(); + Multicast_StopMove(); + Multicast_SetRotation(GetMouseHitLocation()); Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill3")); @@ -297,9 +300,10 @@ void ADefaultPlayerController::Skill4Triggered() FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); + Server_StopMove(); + Multicast_StopMove(); + Multicast_SetRotation(GetMouseHitLocation()); Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill4 Triggered")); @@ -312,9 +316,10 @@ void ADefaultPlayerController::Skill4Completed() FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); + Server_StopMove(); + Multicast_StopMove(); + Multicast_SetRotation(GetMouseHitLocation()); Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill4 Completed")); @@ -388,6 +393,23 @@ void ADefaultPlayerController::Server_SetRotation_Implementation(FVector MouseHi Multicast_SetRotation(MouseHitLocation); } +void ADefaultPlayerController::Server_StopMove_Implementation() +{ + Multicast_StopMove(); +} + +void ADefaultPlayerController::Multicast_StopMove_Implementation() +{ + UPathFollowingComponent* PFollowComp = this->FindComponentByClass(); + if (!PFollowComp) return; + + PFollowComp->OnRequestFinished.Clear(); + + PFollowComp->RequestMoveWithImmediateFinish(EPathFollowingResult::Success); + + PFollowComp->OnRequestFinished.AddUObject(this, &ADefaultPlayerController::OnMoveCompleted); +} + FVector ADefaultPlayerController::GetMouseHitLocation() { FHitResult HitResult; diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.h b/Source/Promether/PlayerGeneric/DefaultPlayerController.h index ae1142e..2c90b72 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.h @@ -46,6 +46,11 @@ public: UFUNCTION(Server, Reliable) void MoveToLocation(FVector Location); + UFUNCTION(Server, Reliable) + void Server_StopMove(); + UFUNCTION(NetMulticast, Reliable) + void Multicast_StopMove(); + UFUNCTION(NetMulticast, Reliable) void Multicast_SetRotation(FVector MouseHitLocation);