23 lines
667 B
Ucode
23 lines
667 B
Ucode
class NiceSyringeFire extends ScrnSyringeFire;
|
|
|
|
// default == 80
|
|
const SEARCH_RADIUS=120.0;
|
|
|
|
function KFHumanPawn GetHealee() {
|
|
local KFHumanPawn KFHP, BestKFHP;
|
|
local vector Dir;
|
|
local float TempDot, BestDot;
|
|
|
|
Dir = vector(Instigator.GetViewRotation());
|
|
|
|
foreach Instigator.VisibleCollidingActors(class'KFHumanPawn', KFHP, SEARCH_RADIUS) {
|
|
if (KFHP.Health < KFHP.HealthMax && KFHP.Health > 0) {
|
|
TempDot = Dir dot (KFHP.Location - Instigator.Location);
|
|
if (TempDot > 0.7 && TempDot > BestDot) {
|
|
BestKFHP = KFHP;
|
|
BestDot = TempDot;
|
|
}
|
|
}
|
|
}
|
|
return BestKFHP;
|
|
} |