Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
Bugfixes for spectator, reset and tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-Pearson committed May 8, 2018
1 parent 2e9d35b commit 89a22cc
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 12 deletions.
4 changes: 3 additions & 1 deletion ParkourGame/Config/DefaultGame.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ bSkipEditorContent=False
bNativizeBlueprintAssets=False
bNativizeOnlySelectedBlueprints=False


[/Script/Engine.GameSession]
MaxPlayers=64
MaxSpectators=64
Git LFS file not shown
4 changes: 2 additions & 2 deletions ParkourGame/Content/ThirdPersonCPP/Maps/arena_ballgame.umap
Git LFS file not shown
4 changes: 2 additions & 2 deletions ParkourGame/Content/ThirdPersonCPP/Maps/arena_base.umap
Git LFS file not shown
Git LFS file not shown
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,11 @@ void AParkourGameCharacter::EndVaultAnim() {
isVaulting = false;
}

bool AParkourGameCharacter::IsAutonomousProxy() const
{
return Role == ROLE_AutonomousProxy;
}

void AParkourGameCharacter::UpdateVault(EHandSideEnum Hand) {
FGripData& Data = m_GripData[(int32)Hand];

Expand Down Expand Up @@ -1552,10 +1557,10 @@ void AParkourGameCharacter::CapsuleToRagdoll()
UCapsuleComponent* Capsule = GetCapsuleComponent();

FHitResult OutHit;
FVector Start = (SocketLocation); //(Capsule->GetComponentLocation());
FVector Start = SocketLocation; //(Capsule->GetComponentLocation());

FVector DownVector = (Capsule->GetUpVector()) * -1;
FVector End = ((DownVector * 1000.f) + Start);
FVector End = ((DownVector * 100.f) + Start);
FCollisionQueryParams CollisionParams;

bool bFoundFloor;
Expand Down
3 changes: 3 additions & 0 deletions ParkourGame/Source/ParkourGame/Private/ParkourGameCharacter.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ class AParkourGameCharacter : public ACharacter
UFUNCTION(BlueprintCallable, Category = "Physics")
void EndVaultAnim();

UFUNCTION(BlueprintPure, Category = "Role")
bool IsAutonomousProxy() const;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Physics")
float BodyMass = 75.0f;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ void ASpectatorCameraActor::Tick(float DeltaSeconds)
const FVector TargetLoc = TargetPtr->GetActorLocation();
const FVector CameraLoc = GetActorLocation();

if (const AParkourGameCharacter* Char = Cast<AParkourGameCharacter>(TargetPtr))
{
// dont follow glitchy ragdoll capsule
if (Char->IsFullRagdoll()) return;
}

SetActorRotation(UKismetMathLibrary::FindLookAtRotation(CameraLoc, TargetLoc));

const float Dist = (CameraLoc - TargetLoc).Size();
Expand Down
2 changes: 1 addition & 1 deletion ParkourGame/Source/ParkourGame/Private/Utils/GameVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#define GAME_VERSION_MAJOR 0
#define GAME_VERSION_MINOR 11
#define GAME_VERSION_PATCH 0
#define GAME_VERSION_PATCH 1

USTRUCT(BlueprintType)
struct FGameVersion
Expand Down

0 comments on commit 89a22cc

Please sign in to comment.