NicePack/sources/Weapons/Playable/Tools/NiceSyringeFire.uc
Shtoyan d6662b1bc6 Add NiceSyringe
And make heal distance 80 -> 120
2023-04-08 22:38:48 +04:00

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