Remove Unneeded comments for Cleanup
This commit is contained in:
parent
1a3a8ec0d5
commit
52117f4ba3
@ -145,7 +145,7 @@ void UCMGameInstance::CloseServer(const FString& LobbyID)
|
|||||||
Request->SetURL(LobbyAPI + "/lobbies/" + LobbyID);
|
Request->SetURL(LobbyAPI + "/lobbies/" + LobbyID);
|
||||||
Request->SetVerb("DELETE");
|
Request->SetVerb("DELETE");
|
||||||
Request->SetHeader("Authorization", "Bearer " + JwtToken);
|
Request->SetHeader("Authorization", "Bearer " + JwtToken);
|
||||||
Request->SetHeader("Accept", "application/json");
|
Request->SetHeader("Accept", "application/json");D
|
||||||
Request->ProcessRequest();
|
Request->ProcessRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,15 +30,7 @@ ACorruptedMemoryCharacter::ACorruptedMemoryCharacter()
|
|||||||
FirstPersonCameraComponent->SetupAttachment(GetCapsuleComponent());
|
FirstPersonCameraComponent->SetupAttachment(GetCapsuleComponent());
|
||||||
FirstPersonCameraComponent->SetRelativeLocation(FVector(-10.f, 0.f, 60.f)); // Position the camera
|
FirstPersonCameraComponent->SetRelativeLocation(FVector(-10.f, 0.f, 60.f)); // Position the camera
|
||||||
FirstPersonCameraComponent->bUsePawnControlRotation = true;
|
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;
|
bReplicates = true;
|
||||||
PrimaryActorTick.bCanEverTick = true;
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
}
|
}
|
||||||
@ -93,7 +85,6 @@ void ACorruptedMemoryCharacter::SetupPlayerInputComponent(class UInputComponent*
|
|||||||
void ACorruptedMemoryCharacter::Tick(float DeltaSeconds)
|
void ACorruptedMemoryCharacter::Tick(float DeltaSeconds)
|
||||||
{
|
{
|
||||||
Super::Tick(DeltaSeconds);
|
Super::Tick(DeltaSeconds);
|
||||||
//Get the current scan percentage based on the timer elapsed and scan time
|
|
||||||
ScanPercentage = GetWorldTimerManager().GetTimerElapsed(ScanTimerHandle) / ScanTime;
|
ScanPercentage = GetWorldTimerManager().GetTimerElapsed(ScanTimerHandle) / ScanTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,10 +165,7 @@ void ACorruptedMemoryCharacter::ScanStart(const FInputActionValue& Value)
|
|||||||
if (!IsValid(HitResult.GetActor())) return;
|
if (!IsValid(HitResult.GetActor())) return;
|
||||||
if (HitResult.GetActor()->Tags.Contains("StoreShelf") && Cast<ACM_Shelving>(HitResult.GetActor())->GameplayTags.Contains("Corrupted"))
|
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;
|
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))
|
if (GetWorldTimerManager().TimerExists(ScanTimerHandle))
|
||||||
{
|
{
|
||||||
GetWorldTimerManager().ClearTimer(ScanTimerHandle);
|
GetWorldTimerManager().ClearTimer(ScanTimerHandle);
|
||||||
@ -188,7 +176,6 @@ void ACorruptedMemoryCharacter::ScanStart(const FInputActionValue& Value)
|
|||||||
if (Cast<ACM_Shelving>(HitResult.GetActor())->GameplayTags.Contains("Scanned")) return;
|
if (Cast<ACM_Shelving>(HitResult.GetActor())->GameplayTags.Contains("Scanned")) return;
|
||||||
Cast<ACM_PlayerController>(GetWorld()->GetFirstPlayerController())->ServerAddGameplayTagToShelf(HitResult.GetActor(), "Scanned");
|
Cast<ACM_PlayerController>(GetWorld()->GetFirstPlayerController())->ServerAddGameplayTagToShelf(HitResult.GetActor(), "Scanned");
|
||||||
ServerSuccessfulScan(AccountName);
|
ServerSuccessfulScan(AccountName);
|
||||||
LastScannedShelf = nullptr;
|
|
||||||
}, 3.f, false);
|
}, 3.f, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -198,11 +185,6 @@ void ACorruptedMemoryCharacter::ScanCancel(const FInputActionValue& Value)
|
|||||||
const FString AccountName = Cast<UCMGameInstance>(GetWorld()->GetGameInstance())->AccountUsername;
|
const FString AccountName = Cast<UCMGameInstance>(GetWorld()->GetGameInstance())->AccountUsername;
|
||||||
GetWorldTimerManager().ClearTimer(ScanTimerHandle);
|
GetWorldTimerManager().ClearTimer(ScanTimerHandle);
|
||||||
ScanPercentage = 0.f;
|
ScanPercentage = 0.f;
|
||||||
// if (IsValid(LastScannedShelf))
|
|
||||||
// {
|
|
||||||
// LastScannedShelf = nullptr;
|
|
||||||
// Cast<ACM_PlayerController>(GetWorld()->GetFirstPlayerController())->ServerRemoveGameplayTagToShelf(LastScannedShelf, AccountName);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ACorruptedMemoryCharacter::SetHasRifle(bool bNewHasRifle)
|
void ACorruptedMemoryCharacter::SetHasRifle(bool bNewHasRifle)
|
||||||
|
@ -20,10 +20,7 @@ UCLASS(config=Game)
|
|||||||
class ACorruptedMemoryCharacter : public ACharacter
|
class ACorruptedMemoryCharacter : public ACharacter
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
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(FOnGameStart);
|
||||||
|
|
||||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnGameEnd);
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnGameEnd);
|
||||||
@ -114,12 +111,7 @@ protected:
|
|||||||
UPROPERTY()
|
UPROPERTY()
|
||||||
FTimerHandle ScanTimerHandle;
|
FTimerHandle ScanTimerHandle;
|
||||||
|
|
||||||
ACM_Shelving* LastScannedShelf = nullptr;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** Returns Mesh1P subobject **/
|
|
||||||
// USkeletalMeshComponent* GetMesh1P() const { return Mesh1P; }
|
|
||||||
/** Returns FirstPersonCameraComponent subobject **/
|
|
||||||
UCameraComponent* GetFirstPersonCameraComponent() const { return FirstPersonCameraComponent; }
|
UCameraComponent* GetFirstPersonCameraComponent() const { return FirstPersonCameraComponent; }
|
||||||
virtual void Tick(float DeltaSeconds) override;
|
virtual void Tick(float DeltaSeconds) override;
|
||||||
UPROPERTY(EditDefaultsOnly)
|
UPROPERTY(EditDefaultsOnly)
|
||||||
|
Loading…
Reference in New Issue
Block a user