Remove Unneeded comments for Cleanup

This commit is contained in:
Philip W 2024-01-09 14:50:09 +00:00
parent 1a3a8ec0d5
commit 52117f4ba3
3 changed files with 3 additions and 29 deletions

View File

@ -145,7 +145,7 @@ void UCMGameInstance::CloseServer(const FString& LobbyID)
Request->SetURL(LobbyAPI + "/lobbies/" + LobbyID);
Request->SetVerb("DELETE");
Request->SetHeader("Authorization", "Bearer " + JwtToken);
Request->SetHeader("Accept", "application/json");
Request->SetHeader("Accept", "application/json");D
Request->ProcessRequest();
}

View File

@ -30,15 +30,7 @@ ACorruptedMemoryCharacter::ACorruptedMemoryCharacter()
FirstPersonCameraComponent->SetupAttachment(GetCapsuleComponent());
FirstPersonCameraComponent->SetRelativeLocation(FVector(-10.f, 0.f, 60.f)); // Position the camera
FirstPersonCameraComponent->bUsePawnControlRotation = true;
// Create a mesh component that will be used when being viewed from a '1st person' view (when controlling this pawn)
// Mesh1P = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("CharacterMesh1P"));
// Mesh1P->SetOnlyOwnerSee(true);
// Mesh1P->SetupAttachment(FirstPersonCameraComponent);
// Mesh1P->bCastDynamicShadow = false;
// Mesh1P->CastShadow = false;
// //Mesh1P->SetRelativeRotation(FRotator(0.9f, -19.19f, 5.2f));
// Mesh1P->SetRelativeLocation(FVector(-30.f, 0.f, -150.f));
bReplicates = true;
PrimaryActorTick.bCanEverTick = true;
}
@ -93,7 +85,6 @@ void ACorruptedMemoryCharacter::SetupPlayerInputComponent(class UInputComponent*
void ACorruptedMemoryCharacter::Tick(float DeltaSeconds)
{
Super::Tick(DeltaSeconds);
//Get the current scan percentage based on the timer elapsed and scan time
ScanPercentage = GetWorldTimerManager().GetTimerElapsed(ScanTimerHandle) / ScanTime;
}
@ -174,10 +165,7 @@ void ACorruptedMemoryCharacter::ScanStart(const FInputActionValue& Value)
if (!IsValid(HitResult.GetActor())) return;
if (HitResult.GetActor()->Tags.Contains("StoreShelf") && Cast<ACM_Shelving>(HitResult.GetActor())->GameplayTags.Contains("Corrupted"))
{
//LastScannedShelf = Cast<ACM_Shelving>(HitResult.GetActor());
FString AccountName = Cast<UCMGameInstance>(GetWorld()->GetGameInstance())->AccountUsername;
//if (Cast<ACM_Shelving>(HitResult.GetActor())->GameplayTags.Contains(AccountName)) return;
//Cast<ACM_PlayerController>(GetWorld()->GetFirstPlayerController())->ServerAddGameplayTagToShelf(HitResult.GetActor(), AccountName);
if (GetWorldTimerManager().TimerExists(ScanTimerHandle))
{
GetWorldTimerManager().ClearTimer(ScanTimerHandle);
@ -188,7 +176,6 @@ void ACorruptedMemoryCharacter::ScanStart(const FInputActionValue& Value)
if (Cast<ACM_Shelving>(HitResult.GetActor())->GameplayTags.Contains("Scanned")) return;
Cast<ACM_PlayerController>(GetWorld()->GetFirstPlayerController())->ServerAddGameplayTagToShelf(HitResult.GetActor(), "Scanned");
ServerSuccessfulScan(AccountName);
LastScannedShelf = nullptr;
}, 3.f, false);
}
}
@ -198,11 +185,6 @@ void ACorruptedMemoryCharacter::ScanCancel(const FInputActionValue& Value)
const FString AccountName = Cast<UCMGameInstance>(GetWorld()->GetGameInstance())->AccountUsername;
GetWorldTimerManager().ClearTimer(ScanTimerHandle);
ScanPercentage = 0.f;
// if (IsValid(LastScannedShelf))
// {
// LastScannedShelf = nullptr;
// Cast<ACM_PlayerController>(GetWorld()->GetFirstPlayerController())->ServerRemoveGameplayTagToShelf(LastScannedShelf, AccountName);
// }
}
void ACorruptedMemoryCharacter::SetHasRifle(bool bNewHasRifle)

View File

@ -20,10 +20,7 @@ UCLASS(config=Game)
class ACorruptedMemoryCharacter : public ACharacter
{
GENERATED_BODY()
// /** Pawn mesh: 1st person view (arms; seen only by self) */
// UPROPERTY(VisibleDefaultsOnly, Category=Mesh)
// USkeletalMeshComponent* Mesh1P;
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnGameStart);
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnGameEnd);
@ -114,12 +111,7 @@ protected:
UPROPERTY()
FTimerHandle ScanTimerHandle;
ACM_Shelving* LastScannedShelf = nullptr;
public:
/** Returns Mesh1P subobject **/
// USkeletalMeshComponent* GetMesh1P() const { return Mesh1P; }
/** Returns FirstPersonCameraComponent subobject **/
UCameraComponent* GetFirstPersonCameraComponent() const { return FirstPersonCameraComponent; }
virtual void Tick(float DeltaSeconds) override;
UPROPERTY(EditDefaultsOnly)