Add NiceSyringe
And make heal distance 80 -> 120
This commit is contained in:
parent
33ce2f5ef5
commit
d6662b1bc6
5 changed files with 49 additions and 11 deletions
8
sources/Weapons/Playable/Tools/NiceSyringe.uc
Normal file
8
sources/Weapons/Playable/Tools/NiceSyringe.uc
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
class NiceSyringe extends ScrnSyringe;
|
||||
|
||||
defaultproperties {
|
||||
ItemName="Nice Med-Syringe"
|
||||
FireModeClass(0)=class'NiceSyringeFire'
|
||||
FireModeClass(1)=class'NiceSyringeAltFire'
|
||||
PickupClass=class'NiceSyringePickup'
|
||||
}
|
||||
1
sources/Weapons/Playable/Tools/NiceSyringeAltFire.uc
Normal file
1
sources/Weapons/Playable/Tools/NiceSyringeAltFire.uc
Normal file
|
|
@ -0,0 +1 @@
|
|||
class NiceSyringeAltFire extends ScrnSyringeAltFire;
|
||||
23
sources/Weapons/Playable/Tools/NiceSyringeFire.uc
Normal file
23
sources/Weapons/Playable/Tools/NiceSyringeFire.uc
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
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;
|
||||
}
|
||||
6
sources/Weapons/Playable/Tools/NiceSyringePickup.uc
Normal file
6
sources/Weapons/Playable/Tools/NiceSyringePickup.uc
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSyringePickup extends ScrnSyringePickup;
|
||||
|
||||
defaultproperties {
|
||||
ItemName="Nice Med-Syringe"
|
||||
InventoryType=class'NiceSyringe'
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue