Fix code review issues: remove unused imports, update deprecated UE5 API

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-24 13:27:21 +00:00
parent b361c0d3c3
commit 59523f42e3
4 changed files with 5 additions and 9 deletions

View File

@@ -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);
}

View File

@@ -165,7 +165,8 @@ UProceduralMeshComponent* AArenaGeometryImporter::CreateMeshFromData(
TArray<FProcMeshTangent> Tangents;
TArray<FLinearColor> 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++)
{

View File

@@ -10,6 +10,3 @@ pytest-cov>=4.0.0
# For data processing
numpy>=1.21.0
# For file operations
dataclasses-json>=0.5.0

View File

@@ -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)"""