Merge pull request 'update10' (#30) from update10 into master

Reviewed-on: https://insultplayers.ru/git/dkanus/NicePack/pulls/30
This commit is contained in:
dkanus 2024-03-16 15:57:38 +03:00
commit 2ddd4a34f0
29 changed files with 117 additions and 40 deletions

View File

@ -1,4 +1,4 @@
class NiceDamTypeMedicDart extends NiceDamageTypeVetCommando class NiceDamTypeMedicDart extends NiceDamageTypeVetDemolitions
abstract; abstract;
defaultproperties defaultproperties
{ {

View File

@ -35,6 +35,16 @@ static function float GetMagCapacityMod(KFPlayerReplicationInfo KFPRI, KFWeapon
return class'NiceSkillCommandoLargerMags'.default.sizeBonus; return class'NiceSkillCommandoLargerMags'.default.sizeBonus;
return 1.0; return 1.0;
} }
// Change the cost of particular ammo
static function float GetAmmoCostScaling(KFPlayerReplicationInfo KFPRI, class<Pickup> Item)
{
local class<NiceWeaponPickup> pickupClass;
pickupClass = class<NiceWeaponPickup>(Item);
if(IsPerkedPickup(pickupClass) && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoLargerMags')) {
return class'NiceSkillCommandoLargerMags'.default.sizeBonus;
}
return 1.0;
}
static function float GetSyringeChargeRate(KFPlayerReplicationInfo KFPRI){ static function float GetSyringeChargeRate(KFPlayerReplicationInfo KFPRI){
return 1.5; return 1.5;
} }

View File

@ -39,12 +39,13 @@ static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured,
perkDamage = float(InDamage); perkDamage = float(InDamage);
if(DmgType == class'NiceDamTypeDemoExplosion') if(DmgType == class'NiceDamTypeDemoExplosion')
return 1.6 * perkDamage; return 1.6 * perkDamage;
if(IsPerkedPickup(pickupClass)) if(IsPerkedPickup(pickupClass) && class<NiceDamTypeDemoExplosion>(DmgType) != none)
perkDamage *= 1.25; perkDamage *= 1.25;
else if( pickupClass != none && pickupClass.default.weight <= class'NiceSkillDemoOffperk'.default.weightBound else if( pickupClass != none && pickupClass.default.weight <= class'NiceSkillDemoOffperk'.default.weightBound
&& HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOffperk') ) && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOffperk') )
perkDamage *= class'NiceSkillDemoOffperk'.default.damageBonus; perkDamage *= class'NiceSkillDemoOffperk'.default.damageBonus;
if( KFPRI != none && class<NiceDamTypeDemoBlunt>(DmgType) != none if( KFPRI != none && class<NiceDamTypeDemoExplosion>(DmgType) == none
&& IsPerkedPickup(pickupClass)
&& SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOnperk') ) && SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOnperk') )
perkDamage *= class'NiceSkillDemoOnperk'.default.damageBonus; perkDamage *= class'NiceSkillDemoOnperk'.default.damageBonus;
return perkDamage; return perkDamage;

View File

@ -38,6 +38,10 @@ var bool projAffectedByScream;
var bool bShouldStick; var bool bShouldStick;
var int resetTicks; var int resetTicks;
var float niceNextFireTime; var float niceNextFireTime;
var float minimalSpreadScale;
var float activeSpreadScale;
var float spreadGainedPerShot;
var float spreadLostPerSecond;
struct FireModeContext{ struct FireModeContext{
var bool bHipfire; var bool bHipfire;
var NiceWeapon sourceWeapon; var NiceWeapon sourceWeapon;
@ -152,9 +156,15 @@ simulated function int GetBurstLength(){
} }
return currentContext.burstLength; return currentContext.burstLength;
} }
simulated function ModeTick(float delta){ simulated function ModeTick(float delta){
local float headLevel; local float headLevel;
local NiceMonster currTarget; local NiceMonster currTarget;
if (spreadLostPerSecond > 0 && activeSpreadScale > minimalSpreadScale
&& niceNextFireTime + fireRate <= Level.TimeSeconds) {
activeSpreadScale -= spreadLostPerSecond * delta;
activeSpreadScale = FMax(minimalSpreadScale, activeSpreadScale);
}
if(currentContext.Instigator == none) if(currentContext.Instigator == none)
currentContext.Instigator = NiceHumanPawn(Instigator); currentContext.Instigator = NiceHumanPawn(Instigator);
if(currentContext.sourceWeapon == none) if(currentContext.sourceWeapon == none)
@ -548,7 +558,7 @@ function DoFireEffect(){
if(!Weapon.WeaponCentered() && !KFWeap.bAimingRifle) if(!Weapon.WeaponCentered() && !KFWeap.bAimingRifle)
StartProj = StartProj + Weapon.Hand * Y * ProjSpawnOffset.Y + Z * ProjSpawnOffset.Z; StartProj = StartProj + Weapon.Hand * Y * ProjSpawnOffset.Y + Z * ProjSpawnOffset.Z;
other = Weapon.Trace(HitLocation, HitNormal, StartProj, StartTrace, false); other = Weapon.Trace(HitLocation, HitNormal, StartProj, StartTrace, false);
activeSpread = fireShots[currentShot].spread; activeSpread = fireShots[currentShot].spread * activeSpreadScale;
if(class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerBombard')){ if(class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerBombard')){
bPinpoint = true; bPinpoint = true;
activeSpread *= class'NiceSkillEnforcerBombard'.default.spreadMult; activeSpread *= class'NiceSkillEnforcerBombard'.default.spreadMult;
@ -607,6 +617,15 @@ function DoFireEffect(){
else if(Instigator.Physics == PHYS_Falling && Instigator.PhysicsVolume.Gravity.Z > class'PhysicsVolume'.default.Gravity.Z) else if(Instigator.Physics == PHYS_Falling && Instigator.PhysicsVolume.Gravity.Z > class'PhysicsVolume'.default.Gravity.Z)
Instigator.AddVelocity((KickMomentum * LowGravKickMomentumScale) >> Instigator.GetViewRotation()); Instigator.AddVelocity((KickMomentum * LowGravKickMomentumScale) >> Instigator.GetViewRotation());
} }
if (activeSpreadScale < 1.0) {
if (KFWeap.bAimingRifle) {
activeSpreadScale += spreadGainedPerShot * 0.5;
}
else {
activeSpreadScale += spreadGainedPerShot;
}
activeSpreadScale = FMin(1.0, activeSpreadScale);
}
} }
simulated function float TraceZed(out NiceMonster tracedZed, optional out Vector hitLoc, optional out Vector hitNorm, simulated function float TraceZed(out NiceMonster tracedZed, optional out Vector hitLoc, optional out Vector hitNorm,
optional float hsMultiplier){ optional float hsMultiplier){
@ -721,4 +740,8 @@ defaultproperties
contBonusReset=True contBonusReset=True
maxBonusContLenght=1 maxBonusContLenght=1
AmmoPerFire=1 AmmoPerFire=1
minimalSpreadScale=1
activeSpreadScale=1
spreadGainedPerShot=0
spreadLostPerSecond=0
} }

View File

@ -3,7 +3,7 @@ defaultproperties
{ {
Weight=6.000000 Weight=6.000000
cost=750 cost=750
AmmoCost=19 AmmoCost=25
BuyClipSize=40 BuyClipSize=40
PowerValue=55 PowerValue=55
SpeedValue=80 SpeedValue=80

View File

@ -3,7 +3,7 @@ defaultproperties
{ {
Weight=6.000000 Weight=6.000000
cost=750 cost=750
AmmoCost=19 AmmoCost=26
BuyClipSize=30 BuyClipSize=30
PowerValue=40 PowerValue=40
SpeedValue=80 SpeedValue=80

View File

@ -3,7 +3,7 @@ defaultproperties
{ {
Weight=6.000000 Weight=6.000000
cost=750 cost=750
AmmoCost=22 AmmoCost=19
BuyClipSize=30 BuyClipSize=30
PowerValue=40 PowerValue=40
SpeedValue=85 SpeedValue=85

View File

@ -3,7 +3,7 @@ class NiceM41APickup extends NiceM41APrimaryPickup;
defaultproperties defaultproperties
{ {
crossPerkIndecies(0)=6 crossPerkIndecies(0)=6
AmmoCost=60 AmmoCost=12
BuyClipSize=1 BuyClipSize=1
SecondaryAmmoShortName="M41A Frag Grenades" SecondaryAmmoShortName="M41A Frag Grenades"
PrimaryWeaponPickup=class'NiceM41APrimaryPickup' PrimaryWeaponPickup=class'NiceM41APrimaryPickup'

View File

@ -1,6 +1,7 @@
class NiceDamTypeKrissM extends NiceDamageTypeVetCommando class NiceDamTypeKrissM extends NiceDamageTypeVetDemolitions
abstract; abstract;
defaultproperties defaultproperties
{ {
HeadShotDamageMult=2.000000
WeaponClass=class'NiceKrissMMedicGun' WeaponClass=class'NiceKrissMMedicGun'
} }

View File

@ -27,4 +27,8 @@ defaultproperties
FlashEmitterClass=Class'ROEffects.MuzzleFlash1stMP' FlashEmitterClass=Class'ROEffects.MuzzleFlash1stMP'
Spread=500.0 Spread=500.0
SpreadStyle=SS_Random SpreadStyle=SS_Random
minimalSpreadScale=0.0
activeSpreadScale=0.0
spreadGainedPerShot=0.125
spreadLostPerSecond=0.5
} }

View File

@ -17,7 +17,7 @@ defaultproperties
AmmoItemName="45. ACP Ammo" AmmoItemName="45. ACP Ammo"
AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo' AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo'
EquipmentCategoryID=3 EquipmentCategoryID=3
CorrespondingPerkIndex=3 CorrespondingPerkIndex=6
InventoryType=class'NiceKrissMMedicGun' InventoryType=class'NiceKrissMMedicGun'
PickupMessage="You got the KRISS Vector Medic Gun" PickupMessage="You got the KRISS Vector Medic Gun"
PickupSound=Sound'KF_KrissSND.Handling.KF_WEP_KRISS_Handling_Pickup' PickupSound=Sound'KF_KrissSND.Handling.KF_WEP_KRISS_Handling_Pickup'

View File

@ -1,4 +1,4 @@
class NiceDamTypeM7A3M extends NiceDamageTypeVetCommando class NiceDamTypeM7A3M extends NiceDamageTypeVetDemolitions
abstract; abstract;
defaultproperties defaultproperties
{ {

View File

@ -3,8 +3,8 @@ defaultproperties
{ {
WeaponPickupClass=class'NiceM7A3MPickup' WeaponPickupClass=class'NiceM7A3MPickup'
AmmoPickupAmount=30 AmmoPickupAmount=30
MaxAmmo=180 MaxAmmo=160
InitialAmount=45 InitialAmount=40
PickupClass=class'NiceM7A3MAmmoPickup' PickupClass=class'NiceM7A3MAmmoPickup'
IconMaterial=Texture'KillingFloorHUD.Generic.HUD' IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
IconCoords=(X1=336,Y1=82,X2=382,Y2=125) IconCoords=(X1=336,Y1=82,X2=382,Y2=125)

View File

@ -1,7 +1,7 @@
class NiceM7A3MAmmoPickup extends NiceAmmoPickup; class NiceM7A3MAmmoPickup extends NiceAmmoPickup;
defaultproperties defaultproperties
{ {
AmmoAmount=15 AmmoAmount=30
InventoryType=class'NiceM7A3MAmmo' InventoryType=class'NiceM7A3MAmmo'
PickupMessage="Rounds 7.6x40mm" PickupMessage="Rounds 7.6x40mm"
StaticMesh=StaticMesh'KillingFloorStatics.L85Ammo' StaticMesh=StaticMesh'KillingFloorStatics.L85Ammo'

View File

@ -34,4 +34,8 @@ defaultproperties
aimerror=42.000000 aimerror=42.000000
Spread=500.0 Spread=500.0
SpreadStyle=SS_Random SpreadStyle=SS_Random
minimalSpreadScale=0.0
activeSpreadScale=0.0
spreadGainedPerShot=0.25
spreadLostPerSecond=0.5
} }

View File

@ -3,7 +3,7 @@ defaultproperties
{ {
Weight=5.000000 Weight=5.000000
cost=1250 cost=1250
AmmoCost=33 AmmoCost=50
BuyClipSize=30 BuyClipSize=30
PowerValue=45 PowerValue=45
SpeedValue=60 SpeedValue=60
@ -14,7 +14,7 @@ defaultproperties
AmmoItemName="7.6x40mm Ammo" AmmoItemName="7.6x40mm Ammo"
AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo' AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo'
EquipmentCategoryID=3 EquipmentCategoryID=3
CorrespondingPerkIndex=3 CorrespondingPerkIndex=6
InventoryType=class'NiceM7A3MMedicGun' InventoryType=class'NiceM7A3MMedicGun'
PickupMessage="You got the M7A3 Medic Gun" PickupMessage="You got the M7A3 Medic Gun"
PickupSound=Sound'KF_M7A3Snd.M7A3_Pickup' PickupSound=Sound'KF_M7A3Snd.M7A3_Pickup'

View File

@ -1,4 +1,4 @@
class NiceDamTypeMP5M extends NiceDamageTypeVetCommando class NiceDamTypeMP5M extends NiceDamageTypeVetDemolitions
abstract; abstract;
defaultproperties defaultproperties
{ {

View File

@ -17,6 +17,10 @@ defaultproperties
DamageMax=35 DamageMax=35
Spread=500.0 Spread=500.0
SpreadStyle=SS_Random SpreadStyle=SS_Random
minimalSpreadScale=0.0
activeSpreadScale=0.0
spreadGainedPerShot=0.25
spreadLostPerSecond=1.0
Momentum=5500.000000 Momentum=5500.000000
FireRate=0.075000 FireRate=0.075000
AmmoClass=class'NiceMP5MAmmo' AmmoClass=class'NiceMP5MAmmo'

View File

@ -14,7 +14,7 @@ defaultproperties
AmmoItemName="9x19mm Ammo" AmmoItemName="9x19mm Ammo"
AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo' AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo'
EquipmentCategoryID=3 EquipmentCategoryID=3
CorrespondingPerkIndex=3 CorrespondingPerkIndex=6
VariantClasses(0)=Class'KFMod.CamoMP5MPickup' VariantClasses(0)=Class'KFMod.CamoMP5MPickup'
InventoryType=class'NiceMP5MMedicGun' InventoryType=class'NiceMP5MMedicGun'
PickupMessage="You got the MP5M Medic Gun" PickupMessage="You got the MP5M Medic Gun"

View File

@ -1,4 +1,4 @@
class NiceDamTypeMP7M extends NiceDamageTypeVetCommando class NiceDamTypeMP7M extends NiceDamageTypeVetDemolitions
abstract; abstract;
defaultproperties defaultproperties
{ {

View File

@ -27,4 +27,8 @@ defaultproperties
FlashEmitterClass=Class'ROEffects.MuzzleFlash1stMP' FlashEmitterClass=Class'ROEffects.MuzzleFlash1stMP'
Spread=500.0 Spread=500.0
SpreadStyle=SS_Random SpreadStyle=SS_Random
minimalSpreadScale=0.0
activeSpreadScale=0.0
spreadGainedPerShot=0.1
spreadLostPerSecond=0.5
} }

View File

@ -15,7 +15,7 @@ defaultproperties
AmmoItemName="4.6x30mm Ammo" AmmoItemName="4.6x30mm Ammo"
AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo' AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo'
EquipmentCategoryID=3 EquipmentCategoryID=3
CorrespondingPerkIndex=3 CorrespondingPerkIndex=6
InventoryType=class'NiceMP7MMedicGun' InventoryType=class'NiceMP7MMedicGun'
PickupMessage="You got the MP7M Medic Gun" PickupMessage="You got the MP7M Medic Gun"
PickupSound=Sound'KF_MP7Snd.MP7_Pickup' PickupSound=Sound'KF_MP7Snd.MP7_Pickup'

View File

@ -10,7 +10,7 @@ defaultproperties
reloadMagStartFrame=0.278000 reloadMagStartFrame=0.278000
reloadChargeStartFrame=-1.000000 reloadChargeStartFrame=-1.000000
FirstPersonFlashlightOffset=(X=-20.000000,Y=-22.000000,Z=8.000000) FirstPersonFlashlightOffset=(X=-20.000000,Y=-22.000000,Z=8.000000)
MagCapacity=28 MagCapacity=42
ReloadRate=2.600000 ReloadRate=2.600000
ReloadAnim="Reload" ReloadAnim="Reload"
ReloadAnimRate=1.000000 ReloadAnimRate=1.000000

View File

@ -3,6 +3,9 @@ defaultproperties
{ {
bCanFireIncomplete=True bCanFireIncomplete=True
ProjectileSpeed=3500.000000 ProjectileSpeed=3500.000000
maxVerticalRecoilAngle=1250
maxHorizontalRecoilAngle=750
FireRate=0.600000
DamageType=class'NiceDamTypeNailGunWeak' DamageType=class'NiceDamTypeNailGunWeak'
AmmoPerFire=7 AmmoPerFire=7
SpreadStyle=SS_Random SpreadStyle=SS_Random

View File

@ -3,8 +3,8 @@ class NiceNailGunAmmo extends NiceAmmo;
defaultproperties defaultproperties
{ {
WeaponPickupClass=class'NiceNailGunPickup' WeaponPickupClass=class'NiceNailGunPickup'
AmmoPickupAmount=28 AmmoPickupAmount=42
MaxAmmo=168 MaxAmmo=336
InitialAmount=84 InitialAmount=84
IconMaterial=Texture'KillingFloorHUD.Generic.HUD' IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
IconCoords=(X1=451,Y1=445,X2=510,Y2=500) IconCoords=(X1=451,Y1=445,X2=510,Y2=500)

View File

@ -10,8 +10,8 @@ defaultproperties
bShouldBounce=True bShouldBounce=True
bCausePain=True bCausePain=True
bulletClass=class'NiceNail' bulletClass=class'NiceNail'
maxVerticalRecoilAngle=1250 maxVerticalRecoilAngle=0
maxHorizontalRecoilAngle=750 maxHorizontalRecoilAngle=0
bRandomPitchFireSound=True bRandomPitchFireSound=True
FireSoundRef="KF_NailShotgun.NailShotgun_Fire_Single_M" FireSoundRef="KF_NailShotgun.NailShotgun_Fire_Single_M"
StereoFireSoundRef="KF_NailShotgun.NailShotgun_Fire_Single_S" StereoFireSoundRef="KF_NailShotgun.NailShotgun_Fire_Single_S"
@ -19,7 +19,7 @@ defaultproperties
DamageType=class'NiceDamTypeNailGun' DamageType=class'NiceDamTypeNailGun'
DamageMax=66 DamageMax=66
FireAnimRate=1.250000 FireAnimRate=1.250000
FireRate=0.400000 FireRate=0.300000
AmmoClass=class'NiceNailGunAmmo' AmmoClass=class'NiceNailGunAmmo'
ShakeRotTime=3.000000 ShakeRotTime=3.000000
ShakeOffsetTime=2.000000 ShakeOffsetTime=2.000000

View File

@ -4,7 +4,7 @@ defaultproperties
Weight=8.000000 Weight=8.000000
cost=250 cost=250
AmmoCost=17 AmmoCost=17
BuyClipSize=28 BuyClipSize=42
PowerValue=70 PowerValue=70
SpeedValue=55 SpeedValue=55
RangeValue=25 RangeValue=25

View File

@ -6,7 +6,7 @@ defaultproperties
{ {
Weight=6.000000 Weight=6.000000
cost=750 cost=750
AmmoCost=34 AmmoCost=22
BuyClipSize=5 BuyClipSize=5
PowerValue=55 PowerValue=55
SpeedValue=42 SpeedValue=42

View File

@ -139,6 +139,25 @@ var float lastHeatTick;
// resulting in a loss of potential damage // resulting in a loss of potential damage
var bool bFrugalFuelUsage; var bool bFrugalFuelUsage;
//==============================================================================
//==============================================================================
// > Speed system
// Manages speed modifications from weapon attacks and other effects.
//
// This variable stores with how much stopping power zed was affected.
// Is a value from 0.0 to 1.0 and `1 - stoppingEffect` acts as speed multiplier
// for the zed
var float stoppingEffect;
// (Absolute) Point in time at which recovery would start, updated when zeds
// receives another stopping effect from somewhere
var float stoppingRecoveryStartTime;
// How much stopping effect would be rcovred in a second
var float stoppingRecoveryRate;
// Maximum stopping effect this zed can tank
var float maxStoppingEffect;
// Minimal stopping threshold for the zed (supposed to be subtracted from
// incoming effects' strenght).
var float minStoppingThreshold;
//============================================================================== //==============================================================================
//============================================================================== //==============================================================================
// > Miscellaneous variables // > Miscellaneous variables
@ -2216,7 +2235,11 @@ defaultproperties
DamageToMonsterScale=5.000000 DamageToMonsterScale=5.000000
RagdollLifeSpan=120.000000 RagdollLifeSpan=120.000000
ControllerClass=class'NiceMonsterController' ControllerClass=class'NiceMonsterController'
stoppingEffect=0.0
stoppingRecoveryStartTime=2.0
stoppingRecoveryRate=0.5
maxStoppingEffect=0.5
minStoppingThreshold=0.0
Begin Object Class=KarmaParamsSkel Name=KarmaParamsSkelN Begin Object Class=KarmaParamsSkel Name=KarmaParamsSkelN
KConvulseSpacing=(Max=2.200000) KConvulseSpacing=(Max=2.200000)
KLinearDamping=0.150000 KLinearDamping=0.150000