Partway done with refactor to lx Player Controller

This commit is contained in:
2026-03-03 17:44:04 -05:00
parent 0b014f9390
commit ad6540a6b1
6 changed files with 128 additions and 105 deletions

View File

@@ -3,7 +3,6 @@
#pragma once
#include "CoreMinimal.h"
#include "Engine/HitResult.h"
#include "GameFramework/GameModeBase.h"
#include "LuprexSockets.h"
#include "BreakToDebugger.h"
@@ -37,32 +36,6 @@ public:
UFUNCTION(BlueprintCallable, Category = "Luprex|Miscellaneous")
int64 GetPlayerId();
UFUNCTION(BlueprintCallable, meta = (WorldContext = "Context"), Category = "Luprex|Look-At Detection")
static void SetLookAt(const UObject *Context, const FHitResult &HitResult);
UFUNCTION(BlueprintPure, meta = (WorldContext = "Context"),Category = "Luprex|Look-At Detection")
static const FHitResult &GetLookAt(const UObject *Context) { return FromContext(Context)->CurrentLookAt; }
UFUNCTION(BlueprintPure, meta = (WorldContext = "Context"),Category = "Luprex|Look-At Detection")
static const AActor *GetLookAtActor(const UObject *Context) { return FromContext(Context)->CurrentLookAt.GetActor(); }
UFUNCTION(BlueprintPure, meta = (WorldContext = "Context"),Category = "Luprex|Look-At Detection")
static FVector2D GetLookAtPixel(const UObject *Context);
UFUNCTION(BlueprintCallable, meta = (WorldContext = "Context"), Category = "Luprex|Look-At Detection")
static void SetLookAtChanged(const UObject* Context);
//
// Look-At Related Events
//
UFUNCTION(BlueprintImplementableEvent, Category = "Luprex|Look-At Detection")
void CalculateLookAt(APlayerController *PlayerController);
UFUNCTION(BlueprintImplementableEvent, Category = "Luprex|Look-At Detection")
void LookAtChanged();
// Transfer console output from the Luprex engine to unreal.
void UpdateConsoleOutput();
@@ -75,10 +48,6 @@ public:
// Tell the player controller to possess that tangible.
void UpdatePossessedTangible();
// Call 'CalculateLookAt', but only if everything is valid.
// It is up to the blueprint code to actually determine what we're looking at.
void UpdateLookAt();
// If the engine wants a new copy of the lua source code,
// provide it.
void UpdateLuaSourceCode();
@@ -94,12 +63,6 @@ public:
// Get the current Luprex Game Mode Base, given a Context object.
static ALuprexGameModeBase *FromContext(const UObject *Context);
// The actor that the player is looking at, current frame.
UPROPERTY()
FHitResult CurrentLookAt;
bool MustCallLookAtChanged = false;
// The sensitivity level at which a log message triggers a debugger breakpoint.
UPROPERTY(EditAnywhere, Category="Debugging Tools")
ElxBreakToDebuggerThreshold BreakToDebuggerLogVerbosity;