|
|
@ -68,11 +68,19 @@ public function Vector GetTracingEnd() |
|
|
|
return endPosition; |
|
|
|
return endPosition; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final function bool IsActorVisible(Actor actorToCheck) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (actorToCheck == none) return false; |
|
|
|
|
|
|
|
if (actorToCheck.bHidden && !actorToCheck.bWorldGeometry) return false; |
|
|
|
|
|
|
|
if (actorToCheck.drawType == DT_None) return false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Does actual tracing, but only once per iterator's lifecycle. |
|
|
|
// Does actual tracing, but only once per iterator's lifecycle. |
|
|
|
// Assumes `initialized` is `true`. |
|
|
|
// Assumes `initialized` is `true`. |
|
|
|
private final function TryTracing() |
|
|
|
private final function TryTracing() |
|
|
|
{ |
|
|
|
{ |
|
|
|
local bool isVisible; |
|
|
|
|
|
|
|
local Pawn nextPawn; |
|
|
|
local Pawn nextPawn; |
|
|
|
local Actor nextActor; |
|
|
|
local Actor nextActor; |
|
|
|
local class<Actor> targetClass; |
|
|
|
local class<Actor> targetClass; |
|
|
@ -92,21 +100,16 @@ private final function TryTracing() |
|
|
|
targetClass = class'Actor'; |
|
|
|
targetClass = class'Actor'; |
|
|
|
} |
|
|
|
} |
|
|
|
core = ServerLevelCore(class'ServerLevelCore'.static.GetInstance()); |
|
|
|
core = ServerLevelCore(class'ServerLevelCore'.static.GetInstance()); |
|
|
|
foreach core.TraceActors(class'Actor', |
|
|
|
foreach core.TraceActors(targetClass, |
|
|
|
nextActor, |
|
|
|
nextActor, |
|
|
|
nextHitLocation, |
|
|
|
nextHitLocation, |
|
|
|
nextHitNormal, |
|
|
|
nextHitNormal, |
|
|
|
endPosition, |
|
|
|
endPosition, |
|
|
|
startPosition) |
|
|
|
startPosition) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (onlyVisible) |
|
|
|
if (onlyVisible && !IsActorVisible(nextActor)) { |
|
|
|
{ |
|
|
|
|
|
|
|
isVisible = (!nextActor.bHidden || nextActor.bWorldGeometry); |
|
|
|
|
|
|
|
isVisible = isVisible && (nextActor.drawType != DT_None); |
|
|
|
|
|
|
|
if (!isVisible) { |
|
|
|
|
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
hitLocations[hitLocations.length] = nextHitLocation; |
|
|
|
hitLocations[hitLocations.length] = nextHitLocation; |
|
|
|
hitNormals[hitNormals.length] = nextHitNormal; |
|
|
|
hitNormals[hitNormals.length] = nextHitNormal; |
|
|
|
nextPawn = Pawn(nextActor); |
|
|
|
nextPawn = Pawn(nextActor); |
|
|
|