lyra_game_ue/Source/LyraGame/Player/LyraDebugCameraController.cpp
Goran Lazarevski 3bcab085f8 Initial commit
2025-03-20 11:06:26 +01:00

26 lines
791 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "LyraDebugCameraController.h"
#include "LyraCheatManager.h"
#include UE_INLINE_GENERATED_CPP_BY_NAME(LyraDebugCameraController)
ALyraDebugCameraController::ALyraDebugCameraController(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
// Use the same cheat class as LyraPlayerController to allow toggling the debug camera through cheats.
CheatClass = ULyraCheatManager::StaticClass();
}
void ALyraDebugCameraController::AddCheats(bool bForce)
{
// Mirrors LyraPlayerController's AddCheats() to avoid the player becoming stuck in the debug camera.
#if USING_CHEAT_MANAGER
Super::AddCheats(true);
#else //#if USING_CHEAT_MANAGER
Super::AddCheats(bForce);
#endif // #else //#if USING_CHEAT_MANAGER
}