Add NiceSyringe #26

Merged
dkanus merged 1 commits from syringe into dev 2023-04-10 09:28:25 +03:00
5 changed files with 49 additions and 11 deletions
Showing only changes of commit d6662b1bc6 - Show all commits

View File

@ -69,7 +69,7 @@ function ReplaceRequiredEquipment()
RequiredEquipment[0] = string(class'NiceMachete');
RequiredEquipment[1] = string(class'Nice9mmPlus');
RequiredEquipment[2] = string(class'ScrnFrag');
RequiredEquipment[3] = string(class'ScrnSyringe');
RequiredEquipment[3] = string(class'NiceSyringe');
RequiredEquipment[4] = string(class'KFMod.Welder');
}
@ -420,10 +420,10 @@ function ServerBuyWeapon(class<Weapon> WClass, float ItemWeight){
Price = WP.Default.Cost;
if(KFPlayerReplicationInfo(PlayerReplicationInfo).ClientVeteranSkill != none){
Price *= KFPlayerReplicationInfo(PlayerReplicationInfo).ClientVeteranSkill.static.GetCostScaling(KFPlayerReplicationInfo(PlayerReplicationInfo), WP);
if(class'ScrnBalance'.default.Mut.bBuyPerkedWeaponsOnly
&& WP.default.CorrespondingPerkIndex != 7
if(class'ScrnBalance'.default.Mut.bBuyPerkedWeaponsOnly
&& WP.default.CorrespondingPerkIndex != 7
&& WP.default.CorrespondingPerkIndex != KFPlayerReplicationInfo(PlayerReplicationInfo).ClientVeteranSkill.default.PerkIndex )
return;
return;
}
SellValue = Price * 0.75;
Price = int(Price);
@ -507,11 +507,11 @@ function bool AddInventory(inventory NewItem){
if(weap != none){
if(Dualies(weap) != none){
if((DualDeagle(weap) != none || Dual44Magnum(weap) != none || DualMK23Pistol(weap) != none)
&& weap.InventoryGroup != 4 ) {
&& weap.InventoryGroup != 4 ) {
if(KFPRI != none &&
ClassIsChildOf(KFPRI.ClientVeteranSkill, class'ScrnVetGunslinger'))
weap.InventoryGroup = 3;
else
else
weap.InventoryGroup = 2;
GroupChanged = true;
}
@ -521,7 +521,7 @@ function bool AddInventory(inventory NewItem){
}
weap.bIsTier3Weapon = true;
}
if(GroupChanged)
if(GroupChanged)
ClientSetInventoryGroup(NewItem.class, NewItem.InventoryGroup);
if(super(SRHumanPawn).AddInventory(NewItem)){
if(weap != none && weap.bTorchEnabled)
@ -568,7 +568,7 @@ simulated function ThrowGrenade()
super.ThrowGrenade();
return;
}
if(playerGrenade == none)
playerGrenade = FindPlayerGrenade();
if(playerGrenade != none && playerGrenade.HasAmmo()){
@ -650,7 +650,7 @@ simulated function ApplyWeaponStats(Weapon NewWeapon){
InventorySpeedModifier += default.GroundSpeed * (8 - weaponWeight) * 0.025;
// ScrN Armor can slow down players (or even boost) -- PooSH
InventorySpeedModifier -= default.GroundSpeed * GetCurrentVestClass().default.SpeedModifier;
}
}
}
simulated function ModifyVelocity(float DeltaTime, vector OldVelocity){
local NicePack NicePackMutator;
@ -699,7 +699,7 @@ simulated function ModifyVelocity(float DeltaTime, vector OldVelocity){
GroundSpeed = StoryInv.ForcedGroundSpeed;
return;
}
}
}
if(bTraderSpeedBoost && !KFGameReplicationInfo(Level.GRI).bWaveInProgress)
MovementMod *= TraderSpeedBoost;
if(Health < HealthMax && medicAdrenaliteTime > 0){
@ -846,7 +846,7 @@ function VeterancyChanged(){
nicePlayer.TriggerSelectEventOnPerkChange(nicePrevPerkClass,
class<NiceVeterancyTypes>(KFPRI.ClientVeteranSkill));
}
super.VeterancyChanged();
}
simulated function AltFire(optional float F){

View 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'
}

View File

@ -0,0 +1 @@
class NiceSyringeAltFire extends ScrnSyringeAltFire;

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

View File

@ -0,0 +1,6 @@
class NiceSyringePickup extends ScrnSyringePickup;
defaultproperties {
ItemName="Nice Med-Syringe"
InventoryType=class'NiceSyringe'
}