From 59523f42e32ed6f8eba3ca5c568cb78fd1b3d80b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 24 Dec 2025 13:27:21 +0000 Subject: [PATCH] Fix code review issues: remove unused imports, update deprecated UE5 API Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- .../ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaBot.cpp | 6 +++--- .../ArenaFPSRuntime/Private/ArenaGeometryImporter.cpp | 3 ++- Tools/ProceduralGeneration/requirements.txt | 3 --- Tools/ProceduralGeneration/weapon_generator.py | 2 -- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaBot.cpp b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaBot.cpp index fc6033a3..1da438db 100644 --- a/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaBot.cpp +++ b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaBot.cpp @@ -59,7 +59,7 @@ void AArenaBot::UpdateBehavior() case EBotState::Combat: // Combat logic - if (CurrentTarget && !CurrentTarget->IsPendingKill()) + if (CurrentTarget && IsValid(CurrentTarget)) { MoveToTarget(CurrentTarget); // Aim and shoot logic would go here @@ -73,7 +73,7 @@ void AArenaBot::UpdateBehavior() case EBotState::SeekingWeapon: // Move to weapon pickup - if (CurrentTarget && !CurrentTarget->IsPendingKill()) + if (CurrentTarget && IsValid(CurrentTarget)) { MoveToTarget(CurrentTarget); } @@ -86,7 +86,7 @@ void AArenaBot::UpdateBehavior() case EBotState::SeekingHealth: // Move to health pickup - if (CurrentTarget && !CurrentTarget->IsPendingKill()) + if (CurrentTarget && IsValid(CurrentTarget)) { MoveToTarget(CurrentTarget); } diff --git a/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaGeometryImporter.cpp b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaGeometryImporter.cpp index 6798e022..0519301a 100644 --- a/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaGeometryImporter.cpp +++ b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaGeometryImporter.cpp @@ -165,7 +165,8 @@ UProceduralMeshComponent* AArenaGeometryImporter::CreateMeshFromData( TArray Tangents; TArray VertexColors; - // Simple normal calculation (can be improved) + // TODO: Calculate proper normals from triangle faces for correct lighting + // Currently using simple up normals as a placeholder Normals.SetNum(Vertices.Num()); for (int32 i = 0; i < Normals.Num(); i++) { diff --git a/Tools/ProceduralGeneration/requirements.txt b/Tools/ProceduralGeneration/requirements.txt index 229a0dbd..99e5929a 100644 --- a/Tools/ProceduralGeneration/requirements.txt +++ b/Tools/ProceduralGeneration/requirements.txt @@ -10,6 +10,3 @@ pytest-cov>=4.0.0 # For data processing numpy>=1.21.0 - -# For file operations -dataclasses-json>=0.5.0 diff --git a/Tools/ProceduralGeneration/weapon_generator.py b/Tools/ProceduralGeneration/weapon_generator.py index 5a9e63b6..4b6cd918 100644 --- a/Tools/ProceduralGeneration/weapon_generator.py +++ b/Tools/ProceduralGeneration/weapon_generator.py @@ -7,7 +7,6 @@ Generates simple weapon meshes that can be imported into Unreal Engine import json import math from typing import List, Tuple -from dataclasses import dataclass from arena_generator import Vector3, Mesh @@ -141,7 +140,6 @@ class WeaponGenerator: print(f"Exported {len(self.meshes)} weapons to {filename}") -@dataclass class PickupGenerator: """Generates pickup item meshes (health, armor, ammo)"""