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