mirror of
https://github.com/johndoe6345789/ArenaFPS.git
synced 2026-04-24 13:44:57 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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++)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,3 @@ pytest-cov>=4.0.0
|
||||
|
||||
# For data processing
|
||||
numpy>=1.21.0
|
||||
|
||||
# For file operations
|
||||
dataclasses-json>=0.5.0
|
||||
|
||||
@@ -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)"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user