Fix new line symbol issues

This commit is contained in:
Anton Tarasenko 2020-04-19 00:44:48 +07:00
parent 51bb9add5b
commit d66d86b2b1
846 changed files with 33896 additions and 12983 deletions

View File

@ -1,4 +1,8 @@
class NiceBlockHitEmitter extends MetalHitEmitter; class NiceBlockHitEmitter extends MetalHitEmitter;
defaultproperties defaultproperties
{ ImpactSounds(0)=None ImpactSounds(1)=None ImpactSounds(2)=None RemoteRole=ROLE_SimulatedProxy {
} ImpactSounds(0)=None
ImpactSounds(1)=None
ImpactSounds(2)=None
RemoteRole=ROLE_SimulatedProxy
}

View File

@ -1,5 +1,6 @@
// ScrN copy // ScrN copy
class NiceFreezeParticlesBase extends Emitter; class NiceFreezeParticlesBase extends Emitter;
defaultproperties defaultproperties
{ bNoDelete=False {
} bNoDelete=False
}

View File

@ -1,8 +1,11 @@
// ScrN copy // ScrN copy
class NiceFreezeParticlesDirectional extends NiceFreezeParticlesBase; class NiceFreezeParticlesDirectional extends NiceFreezeParticlesBase;
simulated function Trigger(Actor other, Pawn eventInstigator){ simulated function Trigger(Actor other, Pawn eventInstigator){
emitters[0].SpawnParticle(1); emitters[0].SpawnParticle(1);
} }
defaultproperties defaultproperties
{ Style=STY_Additive bHardAttach=True bDirectional=True {
} Style=STY_Additive
bHardAttach=True
bDirectional=True
}

View File

@ -1,21 +1,348 @@
class NiceIceChunkEmitter extends Emitter; class NiceIceChunkEmitter extends Emitter;
var() array<Sound> ImpactSounds; var() array<Sound> ImpactSounds;
simulated function PostBeginPlay(){ simulated function PostBeginPlay(){
if(ImpactSounds.Length > 0) if(ImpactSounds.Length > 0)
PlaySound(ImpactSounds[Rand(ImpactSounds.Length)]); PlaySound(ImpactSounds[Rand(ImpactSounds.Length)]);
} }
// NICETODO: change linksfrom HTeac_A to NicePackSM (and change that file) // NICETODO: change linksfrom HTeac_A to NicePackSM (and change that file)
defaultproperties defaultproperties
{ ImpactSounds(0)=Sound'KFWeaponSound.bullethitglass' ImpactSounds(1)=Sound'KFWeaponSound.bullethitglass2' Begin Object Class=MeshEmitter Name=MeshEmitter0 StaticMesh=StaticMesh'HTec_A.IceChunk1' UseCollision=True RespawnDeadParticles=False SpinParticles=True DampRotation=True UniformSize=True AutomaticInitialSpawning=False Acceleration=(Z=-1000.000000) DampingFactorRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=0.200000,Max=0.200000)) ColorScale(0)=(Color=(B=255,G=255,R=255,A=255)) ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255)) MaxParticles=5 SpinsPerSecondRange=(X=(Max=1.000000),Y=(Max=1.000000),Z=(Max=1.000000)) StartSpinRange=(X=(Min=-1.000000,Max=1.000000),Y=(Min=-1.000000,Max=1.000000),Z=(Min=-1.000000,Max=1.000000)) RotationDampingFactorRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=0.200000,Max=0.200000)) StartSizeRange=(X=(Min=5.000000,Max=8.000000),Y=(Min=5.000000,Max=8.000000),Z=(Min=5.000000,Max=8.000000)) InitialParticlesPerSecond=10000.000000 StartVelocityRange=(X=(Min=-75.000000,Max=75.000000),Y=(Min=-75.000000,Max=75.000000),Z=(Min=-100.000000,Max=300.000000)) End Object Emitters(0)=MeshEmitter'NicePack.NiceIceChunkEmitter.MeshEmitter0' {
Begin Object Class=MeshEmitter Name=MeshEmitter2 StaticMesh=StaticMesh'HTec_A.IceChunk2' UseCollision=True RespawnDeadParticles=False SpinParticles=True DampRotation=True UniformSize=True AutomaticInitialSpawning=False Acceleration=(Z=-1000.000000) DampingFactorRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=0.200000,Max=0.200000)) ColorScale(0)=(Color=(B=255,G=255,R=255,A=255)) ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255)) MaxParticles=8 DetailMode=DM_High SpinsPerSecondRange=(X=(Max=1.000000),Y=(Max=1.000000),Z=(Max=1.000000)) StartSpinRange=(X=(Min=-1.000000,Max=1.000000),Y=(Min=-1.000000,Max=1.000000),Z=(Min=-1.000000,Max=1.000000)) RotationDampingFactorRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=0.200000,Max=0.200000)) StartSizeRange=(X=(Min=3.000000,Max=6.000000),Y=(Min=3.000000,Max=6.000000),Z=(Min=3.000000,Max=6.000000)) InitialParticlesPerSecond=10000.000000 StartVelocityRange=(X=(Min=-150.000000,Max=150.000000),Y=(Min=-150.000000,Max=150.000000),Z=(Min=-100.000000,Max=500.000000)) End Object Emitters(1)=MeshEmitter'NicePack.NiceIceChunkEmitter.MeshEmitter2' ImpactSounds(0)=Sound'KFWeaponSound.bullethitglass'
Begin Object Class=MeshEmitter Name=MeshEmitter3 StaticMesh=StaticMesh'HTec_A.IceChunk3' UseCollision=True RespawnDeadParticles=False SpinParticles=True DampRotation=True UniformSize=True AutomaticInitialSpawning=False Acceleration=(Z=-1000.000000) DampingFactorRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=0.200000,Max=0.200000)) ColorScale(0)=(Color=(B=255,G=255,R=255,A=255)) ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255)) MaxParticles=12 DetailMode=DM_High SpinsPerSecondRange=(X=(Max=1.000000),Y=(Max=1.000000),Z=(Max=1.000000)) StartSpinRange=(X=(Min=-1.000000,Max=1.000000),Y=(Min=-1.000000,Max=1.000000),Z=(Min=-1.000000,Max=1.000000)) RotationDampingFactorRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=0.200000,Max=0.200000)) StartSizeRange=(X=(Min=2.000000,Max=5.000000),Y=(Min=2.000000,Max=5.000000),Z=(Min=2.000000,Max=5.000000)) InitialParticlesPerSecond=10000.000000 StartVelocityRange=(X=(Min=-200.000000,Max=200.000000),Y=(Min=-200.000000,Max=200.000000),Z=(Min=-100.000000,Max=500.000000)) End Object Emitters(2)=MeshEmitter'NicePack.NiceIceChunkEmitter.MeshEmitter3' ImpactSounds(1)=Sound'KFWeaponSound.bullethitglass2'
Begin Object Class=SpriteEmitter Name=SpriteEmitter8 UseCollision=True FadeOut=True FadeIn=True RespawnDeadParticles=False UniformSize=True AutomaticInitialSpawning=False UseRandomSubdivision=True Acceleration=(Z=-1000.000000) ExtentMultiplier=(X=0.000000,Y=0.000000,Z=0.000000) DampingFactorRange=(X=(Min=0.250000,Max=0.250000),Y=(Min=0.250000,Max=0.250000),Z=(Min=0.250000,Max=0.250000)) ColorScale(0)=(Color=(B=255,G=255,R=255,A=255)) ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255)) FadeOutStartTime=0.500000 MaxParticles=55 DetailMode=DM_SuperHigh UseRotationFrom=PTRS_Actor StartSizeRange=(X=(Min=0.700000,Max=1.700000)) InitialParticlesPerSecond=10000.000000 DrawStyle=PTDS_AlphaBlend Texture=Texture'Effects_Tex.BulletHits.snowchunksfinal' TextureUSubdivisions=2 TextureVSubdivisions=2 LifetimeRange=(Min=1.400000,Max=1.400000) StartVelocityRange=(X=(Min=-200.000000,Max=200.000000),Y=(Min=-200.000000,Max=200.000000),Z=(Min=-300.000000,Max=350.000000)) End Object Emitters(3)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter8' Begin Object Class=MeshEmitter Name=MeshEmitter0
Begin Object Class=SpriteEmitter Name=SpriteEmitter9 ProjectionNormal=(Y=1.000000,Z=0.000000) FadeOut=True FadeIn=True RespawnDeadParticles=False SpinParticles=True UseSizeScale=True UseRegularSizeScale=False UniformSize=True AutomaticInitialSpawning=False Acceleration=(Z=-1000.000000) ColorScale(0)=(Color=(B=255,G=255,R=255,A=255)) ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255)) Opacity=0.500000 FadeOutStartTime=0.442500 FadeInEndTime=0.007500 MaxParticles=25 DetailMode=DM_High UseRotationFrom=PTRS_Actor SpinCCWorCW=(X=0.000000) SpinsPerSecondRange=(X=(Max=0.300000)) StartSpinRange=(X=(Min=-0.300000,Max=0.300000)) SizeScale(0)=(RelativeSize=0.400000) SizeScale(1)=(RelativeTime=0.500000,RelativeSize=0.700000) SizeScale(2)=(RelativeTime=1.000000,RelativeSize=1.300000) StartSizeRange=(X=(Min=20.000000,Max=40.000000),Y=(Min=20.000000,Max=40.000000),Z=(Min=20.000000,Max=40.000000)) InitialParticlesPerSecond=10000.000000 DrawStyle=PTDS_AlphaBlend Texture=Texture'Effects_Tex.BulletHits.watersplatter2' TextureUSubdivisions=2 TextureVSubdivisions=2 LifetimeRange=(Min=0.750000,Max=0.750000) StartVelocityRange=(X=(Min=-150.000000,Max=150.000000),Y=(Min=-150.000000,Max=150.000000),Z=(Min=-25.000000,Max=300.000000)) End Object Emitters(4)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter9' StaticMesh=StaticMesh'HTec_A.IceChunk1'
Begin Object Class=SpriteEmitter Name=SpriteEmitter10 ProjectionNormal=(Y=1.000000,Z=0.000000) FadeOut=True RespawnDeadParticles=False SpinParticles=True UseSizeScale=True UseRegularSizeScale=False UniformSize=True Acceleration=(Z=-15.000000) ColorScale(0)=(Color=(B=255,G=255,R=255,A=255)) ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255)) Opacity=0.250000 FadeOutStartTime=0.175000 MaxParticles=5 StartLocationRange=(X=(Min=10.000000,Max=10.000000)) AddLocationFromOtherEmitter=0 UseRotationFrom=PTRS_Actor SpinCCWorCW=(X=0.000000) SpinsPerSecondRange=(X=(Max=0.200000)) StartSpinRange=(X=(Min=-0.300000,Max=0.300000)) SizeScale(0)=(RelativeSize=0.400000) SizeScale(1)=(RelativeTime=0.560000,RelativeSize=1.000000) StartSizeRange=(X=(Min=6.000000,Max=60.000000),Y=(Min=6.000000,Max=60.000000),Z=(Min=6.000000,Max=60.000000)) InitialParticlesPerSecond=1.000000 DrawStyle=PTDS_AlphaBlend Texture=Texture'kf_fx_trip_t.Misc.smoke_animated' TextureUSubdivisions=8 TextureVSubdivisions=8 LifetimeRange=(Min=0.350000,Max=0.350000) End Object Emitters(5)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter10' UseCollision=True
Begin Object Class=SpriteEmitter Name=SpriteEmitter11 ProjectionNormal=(Y=1.000000,Z=0.000000) FadeOut=True RespawnDeadParticles=False SpinParticles=True UseSizeScale=True UseRegularSizeScale=False UniformSize=True Acceleration=(Z=-15.000000) ColorScale(0)=(Color=(B=255,G=255,R=255,A=255)) ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255)) Opacity=0.250000 FadeOutStartTime=0.175000 MaxParticles=8 StartLocationRange=(X=(Min=10.000000,Max=10.000000)) AddLocationFromOtherEmitter=1 UseRotationFrom=PTRS_Actor SpinCCWorCW=(X=0.000000) SpinsPerSecondRange=(X=(Max=0.200000)) StartSpinRange=(X=(Min=-0.300000,Max=0.300000)) SizeScale(0)=(RelativeSize=0.400000) SizeScale(1)=(RelativeTime=0.560000,RelativeSize=1.000000) StartSizeRange=(X=(Min=6.000000,Max=60.000000),Y=(Min=6.000000,Max=60.000000),Z=(Min=6.000000,Max=60.000000)) InitialParticlesPerSecond=1.000000 DrawStyle=PTDS_AlphaBlend Texture=Texture'kf_fx_trip_t.Misc.smoke_animated' TextureUSubdivisions=8 TextureVSubdivisions=8 LifetimeRange=(Min=0.350000,Max=0.350000) End Object Emitters(6)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter11' RespawnDeadParticles=False
Begin Object Class=SpriteEmitter Name=SpriteEmitter12 ProjectionNormal=(Y=1.000000,Z=0.000000) FadeOut=True RespawnDeadParticles=False SpinParticles=True UseSizeScale=True UseRegularSizeScale=False UniformSize=True Acceleration=(Z=-15.000000) ColorScale(0)=(Color=(B=255,G=255,R=255,A=255)) ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255)) Opacity=0.250000 FadeOutStartTime=0.175000 MaxParticles=12 DetailMode=DM_High StartLocationRange=(X=(Min=10.000000,Max=10.000000)) AddLocationFromOtherEmitter=2 UseRotationFrom=PTRS_Actor SpinCCWorCW=(X=0.000000) SpinsPerSecondRange=(X=(Max=0.200000)) StartSpinRange=(X=(Min=-0.300000,Max=0.300000)) SizeScale(0)=(RelativeSize=0.400000) SizeScale(1)=(RelativeTime=0.560000,RelativeSize=1.000000) StartSizeRange=(X=(Min=6.000000,Max=60.000000),Y=(Min=6.000000,Max=60.000000),Z=(Min=6.000000,Max=60.000000)) InitialParticlesPerSecond=1.000000 DrawStyle=PTDS_AlphaBlend Texture=Texture'kf_fx_trip_t.Misc.smoke_animated' TextureUSubdivisions=8 TextureVSubdivisions=8 LifetimeRange=(Min=0.350000,Max=0.350000) End Object Emitters(7)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter12' SpinParticles=True
Begin Object Class=SpriteEmitter Name=SpriteEmitter13 ProjectionNormal=(Y=1.000000,Z=0.000000) FadeOut=True FadeIn=True RespawnDeadParticles=False SpinParticles=True UseSizeScale=True UseRegularSizeScale=False UniformSize=True AutomaticInitialSpawning=False Acceleration=(Z=-1000.000000) ColorScale(0)=(Color=(B=255,G=255,R=255,A=255)) ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255)) Opacity=0.250000 FadeOutStartTime=0.442500 FadeInEndTime=0.007500 MaxParticles=12 StartLocationRange=(X=(Min=20.000000,Max=20.000000)) UseRotationFrom=PTRS_Actor SpinCCWorCW=(X=0.000000) SpinsPerSecondRange=(X=(Max=0.300000)) StartSpinRange=(X=(Min=-0.300000,Max=0.300000)) SizeScale(0)=(RelativeSize=0.400000) SizeScale(1)=(RelativeTime=0.500000,RelativeSize=0.900000) SizeScale(2)=(RelativeTime=1.000000,RelativeSize=1.300000) StartSizeRange=(X=(Min=25.000000,Max=45.000000),Y=(Min=25.000000,Max=45.000000),Z=(Min=25.000000,Max=45.000000)) InitialParticlesPerSecond=10000.000000 DrawStyle=PTDS_AlphaBlend Texture=Texture'Effects_Tex.BulletHits.watersplashcloud' TextureUSubdivisions=1 TextureVSubdivisions=1 LifetimeRange=(Min=0.750000,Max=0.750000) StartVelocityRange=(X=(Min=-150.000000,Max=150.000000),Y=(Min=-150.000000,Max=150.000000),Z=(Min=-5.000000,Max=150.000000)) End Object Emitters(8)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter13' DampRotation=True
Begin Object Class=SpriteEmitter Name=SpriteEmitter14 ProjectionNormal=(Y=1.000000,Z=0.000000) FadeOut=True RespawnDeadParticles=False SpinParticles=True UseSizeScale=True UseRegularSizeScale=False UniformSize=True AutomaticInitialSpawning=False Acceleration=(Z=-22.000000) DampingFactorRange=(X=(Min=0.250000,Max=0.250000),Y=(Min=0.250000,Max=0.250000),Z=(Min=0.250000,Max=0.250000)) ColorScale(0)=(Color=(B=255,G=255,R=255,A=255)) ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255)) Opacity=0.500000 FadeOutStartTime=2.720000 MaxParticles=25 DetailMode=DM_High StartLocationRange=(X=(Min=-10.000000,Max=10.000000),Y=(Min=-10.000000,Max=10.000000),Z=(Min=-10.000000,Max=10.000000)) UseRotationFrom=PTRS_Actor SpinCCWorCW=(X=0.000000) SpinsPerSecondRange=(X=(Max=0.150000)) StartSpinRange=(X=(Min=-1.000000,Max=1.000000)) SizeScale(0)=(RelativeSize=2.200000) SizeScale(1)=(RelativeTime=0.500000,RelativeSize=3.200000) SizeScale(2)=(RelativeTime=1.000000,RelativeSize=4.000000) StartSizeRange=(X=(Min=1.000000,Max=20.000000),Y=(Min=1.000000,Max=20.000000),Z=(Min=1.000000,Max=20.000000)) InitialParticlesPerSecond=10000.000000 DrawStyle=PTDS_AlphaBlend Texture=Texture'Effects_Tex.explosions.DSmoke_2' TextureUSubdivisions=1 TextureVSubdivisions=1 StartVelocityRange=(X=(Min=-350.000000,Max=350.000000),Y=(Min=-350.000000,Max=350.000000),Z=(Min=-5.000000,Max=50.000000)) VelocityLossRange=(X=(Min=3.000000,Max=3.000000),Y=(Min=3.000000,Max=3.000000)) End Object Emitters(9)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter14' UniformSize=True
Begin Object Class=SpriteEmitter Name=SpriteEmitter15 UseCollision=True UseColorScale=True FadeOut=True FadeIn=True RespawnDeadParticles=False UniformSize=True AutomaticInitialSpawning=False UseRandomSubdivision=True Acceleration=(Z=-1000.000000) ExtentMultiplier=(X=0.000000,Y=0.000000,Z=0.000000) DampingFactorRange=(X=(Min=0.250000,Max=0.250000),Y=(Min=0.250000,Max=0.250000),Z=(Min=0.250000,Max=0.250000)) ColorScale(0)=(Color=(B=174,G=174,R=205,A=255)) ColorScale(1)=(RelativeTime=1.000000,Color=(B=174,G=174,R=205,A=255)) FadeOutStartTime=0.500000 MaxParticles=15 UseRotationFrom=PTRS_Actor StartSizeRange=(X=(Min=0.700000,Max=1.700000)) InitialParticlesPerSecond=10000.000000 DrawStyle=PTDS_AlphaBlend Texture=Texture'Effects_Tex.BulletHits.snowchunksfinal' TextureUSubdivisions=2 TextureVSubdivisions=2 LifetimeRange=(Min=1.400000,Max=1.400000) StartVelocityRange=(X=(Min=-200.000000,Max=200.000000),Y=(Min=-200.000000,Max=200.000000),Z=(Min=-300.000000,Max=350.000000)) End Object Emitters(10)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter15' AutomaticInitialSpawning=False
AutoDestroy=True bNoDelete=False bNetTemporary=True RemoteRole=ROLE_SimulatedProxy LifeSpan=5.000000 TransientSoundVolume=150.000000 TransientSoundRadius=80.000000 Acceleration=(Z=-1000.000000)
} DampingFactorRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=0.200000,Max=0.200000))
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
MaxParticles=5
SpinsPerSecondRange=(X=(Max=1.000000),Y=(Max=1.000000),Z=(Max=1.000000))
StartSpinRange=(X=(Min=-1.000000,Max=1.000000),Y=(Min=-1.000000,Max=1.000000),Z=(Min=-1.000000,Max=1.000000))
RotationDampingFactorRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=0.200000,Max=0.200000))
StartSizeRange=(X=(Min=5.000000,Max=8.000000),Y=(Min=5.000000,Max=8.000000),Z=(Min=5.000000,Max=8.000000))
InitialParticlesPerSecond=10000.000000
StartVelocityRange=(X=(Min=-75.000000,Max=75.000000),Y=(Min=-75.000000,Max=75.000000),Z=(Min=-100.000000,Max=300.000000))
End Object
Emitters(0)=MeshEmitter'NicePack.NiceIceChunkEmitter.MeshEmitter0'
Begin Object Class=MeshEmitter Name=MeshEmitter2
StaticMesh=StaticMesh'HTec_A.IceChunk2'
UseCollision=True
RespawnDeadParticles=False
SpinParticles=True
DampRotation=True
UniformSize=True
AutomaticInitialSpawning=False
Acceleration=(Z=-1000.000000)
DampingFactorRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=0.200000,Max=0.200000))
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
MaxParticles=8
DetailMode=DM_High
SpinsPerSecondRange=(X=(Max=1.000000),Y=(Max=1.000000),Z=(Max=1.000000))
StartSpinRange=(X=(Min=-1.000000,Max=1.000000),Y=(Min=-1.000000,Max=1.000000),Z=(Min=-1.000000,Max=1.000000))
RotationDampingFactorRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=0.200000,Max=0.200000))
StartSizeRange=(X=(Min=3.000000,Max=6.000000),Y=(Min=3.000000,Max=6.000000),Z=(Min=3.000000,Max=6.000000))
InitialParticlesPerSecond=10000.000000
StartVelocityRange=(X=(Min=-150.000000,Max=150.000000),Y=(Min=-150.000000,Max=150.000000),Z=(Min=-100.000000,Max=500.000000))
End Object
Emitters(1)=MeshEmitter'NicePack.NiceIceChunkEmitter.MeshEmitter2'
Begin Object Class=MeshEmitter Name=MeshEmitter3
StaticMesh=StaticMesh'HTec_A.IceChunk3'
UseCollision=True
RespawnDeadParticles=False
SpinParticles=True
DampRotation=True
UniformSize=True
AutomaticInitialSpawning=False
Acceleration=(Z=-1000.000000)
DampingFactorRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=0.200000,Max=0.200000))
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
MaxParticles=12
DetailMode=DM_High
SpinsPerSecondRange=(X=(Max=1.000000),Y=(Max=1.000000),Z=(Max=1.000000))
StartSpinRange=(X=(Min=-1.000000,Max=1.000000),Y=(Min=-1.000000,Max=1.000000),Z=(Min=-1.000000,Max=1.000000))
RotationDampingFactorRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=0.200000,Max=0.200000))
StartSizeRange=(X=(Min=2.000000,Max=5.000000),Y=(Min=2.000000,Max=5.000000),Z=(Min=2.000000,Max=5.000000))
InitialParticlesPerSecond=10000.000000
StartVelocityRange=(X=(Min=-200.000000,Max=200.000000),Y=(Min=-200.000000,Max=200.000000),Z=(Min=-100.000000,Max=500.000000))
End Object
Emitters(2)=MeshEmitter'NicePack.NiceIceChunkEmitter.MeshEmitter3'
Begin Object Class=SpriteEmitter Name=SpriteEmitter8
UseCollision=True
FadeOut=True
FadeIn=True
RespawnDeadParticles=False
UniformSize=True
AutomaticInitialSpawning=False
UseRandomSubdivision=True
Acceleration=(Z=-1000.000000)
ExtentMultiplier=(X=0.000000,Y=0.000000,Z=0.000000)
DampingFactorRange=(X=(Min=0.250000,Max=0.250000),Y=(Min=0.250000,Max=0.250000),Z=(Min=0.250000,Max=0.250000))
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
FadeOutStartTime=0.500000
MaxParticles=55
DetailMode=DM_SuperHigh
UseRotationFrom=PTRS_Actor
StartSizeRange=(X=(Min=0.700000,Max=1.700000))
InitialParticlesPerSecond=10000.000000
DrawStyle=PTDS_AlphaBlend
Texture=Texture'Effects_Tex.BulletHits.snowchunksfinal'
TextureUSubdivisions=2
TextureVSubdivisions=2
LifetimeRange=(Min=1.400000,Max=1.400000)
StartVelocityRange=(X=(Min=-200.000000,Max=200.000000),Y=(Min=-200.000000,Max=200.000000),Z=(Min=-300.000000,Max=350.000000))
End Object
Emitters(3)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter8'
Begin Object Class=SpriteEmitter Name=SpriteEmitter9
ProjectionNormal=(Y=1.000000,Z=0.000000)
FadeOut=True
FadeIn=True
RespawnDeadParticles=False
SpinParticles=True
UseSizeScale=True
UseRegularSizeScale=False
UniformSize=True
AutomaticInitialSpawning=False
Acceleration=(Z=-1000.000000)
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
Opacity=0.500000
FadeOutStartTime=0.442500
FadeInEndTime=0.007500
MaxParticles=25
DetailMode=DM_High
UseRotationFrom=PTRS_Actor
SpinCCWorCW=(X=0.000000)
SpinsPerSecondRange=(X=(Max=0.300000))
StartSpinRange=(X=(Min=-0.300000,Max=0.300000))
SizeScale(0)=(RelativeSize=0.400000)
SizeScale(1)=(RelativeTime=0.500000,RelativeSize=0.700000)
SizeScale(2)=(RelativeTime=1.000000,RelativeSize=1.300000)
StartSizeRange=(X=(Min=20.000000,Max=40.000000),Y=(Min=20.000000,Max=40.000000),Z=(Min=20.000000,Max=40.000000))
InitialParticlesPerSecond=10000.000000
DrawStyle=PTDS_AlphaBlend
Texture=Texture'Effects_Tex.BulletHits.watersplatter2'
TextureUSubdivisions=2
TextureVSubdivisions=2
LifetimeRange=(Min=0.750000,Max=0.750000)
StartVelocityRange=(X=(Min=-150.000000,Max=150.000000),Y=(Min=-150.000000,Max=150.000000),Z=(Min=-25.000000,Max=300.000000))
End Object
Emitters(4)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter9'
Begin Object Class=SpriteEmitter Name=SpriteEmitter10
ProjectionNormal=(Y=1.000000,Z=0.000000)
FadeOut=True
RespawnDeadParticles=False
SpinParticles=True
UseSizeScale=True
UseRegularSizeScale=False
UniformSize=True
Acceleration=(Z=-15.000000)
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
Opacity=0.250000
FadeOutStartTime=0.175000
MaxParticles=5
StartLocationRange=(X=(Min=10.000000,Max=10.000000))
AddLocationFromOtherEmitter=0
UseRotationFrom=PTRS_Actor
SpinCCWorCW=(X=0.000000)
SpinsPerSecondRange=(X=(Max=0.200000))
StartSpinRange=(X=(Min=-0.300000,Max=0.300000))
SizeScale(0)=(RelativeSize=0.400000)
SizeScale(1)=(RelativeTime=0.560000,RelativeSize=1.000000)
StartSizeRange=(X=(Min=6.000000,Max=60.000000),Y=(Min=6.000000,Max=60.000000),Z=(Min=6.000000,Max=60.000000))
InitialParticlesPerSecond=1.000000
DrawStyle=PTDS_AlphaBlend
Texture=Texture'kf_fx_trip_t.Misc.smoke_animated'
TextureUSubdivisions=8
TextureVSubdivisions=8
LifetimeRange=(Min=0.350000,Max=0.350000)
End Object
Emitters(5)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter10'
Begin Object Class=SpriteEmitter Name=SpriteEmitter11
ProjectionNormal=(Y=1.000000,Z=0.000000)
FadeOut=True
RespawnDeadParticles=False
SpinParticles=True
UseSizeScale=True
UseRegularSizeScale=False
UniformSize=True
Acceleration=(Z=-15.000000)
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
Opacity=0.250000
FadeOutStartTime=0.175000
MaxParticles=8
StartLocationRange=(X=(Min=10.000000,Max=10.000000))
AddLocationFromOtherEmitter=1
UseRotationFrom=PTRS_Actor
SpinCCWorCW=(X=0.000000)
SpinsPerSecondRange=(X=(Max=0.200000))
StartSpinRange=(X=(Min=-0.300000,Max=0.300000))
SizeScale(0)=(RelativeSize=0.400000)
SizeScale(1)=(RelativeTime=0.560000,RelativeSize=1.000000)
StartSizeRange=(X=(Min=6.000000,Max=60.000000),Y=(Min=6.000000,Max=60.000000),Z=(Min=6.000000,Max=60.000000))
InitialParticlesPerSecond=1.000000
DrawStyle=PTDS_AlphaBlend
Texture=Texture'kf_fx_trip_t.Misc.smoke_animated'
TextureUSubdivisions=8
TextureVSubdivisions=8
LifetimeRange=(Min=0.350000,Max=0.350000)
End Object
Emitters(6)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter11'
Begin Object Class=SpriteEmitter Name=SpriteEmitter12
ProjectionNormal=(Y=1.000000,Z=0.000000)
FadeOut=True
RespawnDeadParticles=False
SpinParticles=True
UseSizeScale=True
UseRegularSizeScale=False
UniformSize=True
Acceleration=(Z=-15.000000)
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
Opacity=0.250000
FadeOutStartTime=0.175000
MaxParticles=12
DetailMode=DM_High
StartLocationRange=(X=(Min=10.000000,Max=10.000000))
AddLocationFromOtherEmitter=2
UseRotationFrom=PTRS_Actor
SpinCCWorCW=(X=0.000000)
SpinsPerSecondRange=(X=(Max=0.200000))
StartSpinRange=(X=(Min=-0.300000,Max=0.300000))
SizeScale(0)=(RelativeSize=0.400000)
SizeScale(1)=(RelativeTime=0.560000,RelativeSize=1.000000)
StartSizeRange=(X=(Min=6.000000,Max=60.000000),Y=(Min=6.000000,Max=60.000000),Z=(Min=6.000000,Max=60.000000))
InitialParticlesPerSecond=1.000000
DrawStyle=PTDS_AlphaBlend
Texture=Texture'kf_fx_trip_t.Misc.smoke_animated'
TextureUSubdivisions=8
TextureVSubdivisions=8
LifetimeRange=(Min=0.350000,Max=0.350000)
End Object
Emitters(7)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter12'
Begin Object Class=SpriteEmitter Name=SpriteEmitter13
ProjectionNormal=(Y=1.000000,Z=0.000000)
FadeOut=True
FadeIn=True
RespawnDeadParticles=False
SpinParticles=True
UseSizeScale=True
UseRegularSizeScale=False
UniformSize=True
AutomaticInitialSpawning=False
Acceleration=(Z=-1000.000000)
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
Opacity=0.250000
FadeOutStartTime=0.442500
FadeInEndTime=0.007500
MaxParticles=12
StartLocationRange=(X=(Min=20.000000,Max=20.000000))
UseRotationFrom=PTRS_Actor
SpinCCWorCW=(X=0.000000)
SpinsPerSecondRange=(X=(Max=0.300000))
StartSpinRange=(X=(Min=-0.300000,Max=0.300000))
SizeScale(0)=(RelativeSize=0.400000)
SizeScale(1)=(RelativeTime=0.500000,RelativeSize=0.900000)
SizeScale(2)=(RelativeTime=1.000000,RelativeSize=1.300000)
StartSizeRange=(X=(Min=25.000000,Max=45.000000),Y=(Min=25.000000,Max=45.000000),Z=(Min=25.000000,Max=45.000000))
InitialParticlesPerSecond=10000.000000
DrawStyle=PTDS_AlphaBlend
Texture=Texture'Effects_Tex.BulletHits.watersplashcloud'
TextureUSubdivisions=1
TextureVSubdivisions=1
LifetimeRange=(Min=0.750000,Max=0.750000)
StartVelocityRange=(X=(Min=-150.000000,Max=150.000000),Y=(Min=-150.000000,Max=150.000000),Z=(Min=-5.000000,Max=150.000000))
End Object
Emitters(8)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter13'
Begin Object Class=SpriteEmitter Name=SpriteEmitter14
ProjectionNormal=(Y=1.000000,Z=0.000000)
FadeOut=True
RespawnDeadParticles=False
SpinParticles=True
UseSizeScale=True
UseRegularSizeScale=False
UniformSize=True
AutomaticInitialSpawning=False
Acceleration=(Z=-22.000000)
DampingFactorRange=(X=(Min=0.250000,Max=0.250000),Y=(Min=0.250000,Max=0.250000),Z=(Min=0.250000,Max=0.250000))
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
Opacity=0.500000
FadeOutStartTime=2.720000
MaxParticles=25
DetailMode=DM_High
StartLocationRange=(X=(Min=-10.000000,Max=10.000000),Y=(Min=-10.000000,Max=10.000000),Z=(Min=-10.000000,Max=10.000000))
UseRotationFrom=PTRS_Actor
SpinCCWorCW=(X=0.000000)
SpinsPerSecondRange=(X=(Max=0.150000))
StartSpinRange=(X=(Min=-1.000000,Max=1.000000))
SizeScale(0)=(RelativeSize=2.200000)
SizeScale(1)=(RelativeTime=0.500000,RelativeSize=3.200000)
SizeScale(2)=(RelativeTime=1.000000,RelativeSize=4.000000)
StartSizeRange=(X=(Min=1.000000,Max=20.000000),Y=(Min=1.000000,Max=20.000000),Z=(Min=1.000000,Max=20.000000))
InitialParticlesPerSecond=10000.000000
DrawStyle=PTDS_AlphaBlend
Texture=Texture'Effects_Tex.explosions.DSmoke_2'
TextureUSubdivisions=1
TextureVSubdivisions=1
StartVelocityRange=(X=(Min=-350.000000,Max=350.000000),Y=(Min=-350.000000,Max=350.000000),Z=(Min=-5.000000,Max=50.000000))
VelocityLossRange=(X=(Min=3.000000,Max=3.000000),Y=(Min=3.000000,Max=3.000000))
End Object
Emitters(9)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter14'
Begin Object Class=SpriteEmitter Name=SpriteEmitter15
UseCollision=True
UseColorScale=True
FadeOut=True
FadeIn=True
RespawnDeadParticles=False
UniformSize=True
AutomaticInitialSpawning=False
UseRandomSubdivision=True
Acceleration=(Z=-1000.000000)
ExtentMultiplier=(X=0.000000,Y=0.000000,Z=0.000000)
DampingFactorRange=(X=(Min=0.250000,Max=0.250000),Y=(Min=0.250000,Max=0.250000),Z=(Min=0.250000,Max=0.250000))
ColorScale(0)=(Color=(B=174,G=174,R=205,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=174,G=174,R=205,A=255))
FadeOutStartTime=0.500000
MaxParticles=15
UseRotationFrom=PTRS_Actor
StartSizeRange=(X=(Min=0.700000,Max=1.700000))
InitialParticlesPerSecond=10000.000000
DrawStyle=PTDS_AlphaBlend
Texture=Texture'Effects_Tex.BulletHits.snowchunksfinal'
TextureUSubdivisions=2
TextureVSubdivisions=2
LifetimeRange=(Min=1.400000,Max=1.400000)
StartVelocityRange=(X=(Min=-200.000000,Max=200.000000),Y=(Min=-200.000000,Max=200.000000),Z=(Min=-300.000000,Max=350.000000))
End Object
Emitters(10)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter15'
AutoDestroy=True
bNoDelete=False
bNetTemporary=True
RemoteRole=ROLE_SimulatedProxy
LifeSpan=5.000000
TransientSoundVolume=150.000000
TransientSoundRadius=80.000000
}

View File

@ -1,10 +1,15 @@
// ScrN copy // ScrN copy
class NiceNitroDecal extends ProjectedDecal; class NiceNitroDecal extends ProjectedDecal;
#exec OBJ LOAD FILE=HTec_A.ukx #exec OBJ LOAD FILE=HTec_A.ukx
simulated function BeginPlay(){ simulated function BeginPlay(){
if(!level.bDropDetail && FRand() < 0.4) projTexture = Texture'HTec_A.Nitro.NitroSplat'; if(!level.bDropDetail && FRand() < 0.4)
super.BeginPlay(); projTexture = Texture'HTec_A.Nitro.NitroSplat';
} super.BeginPlay();
defaultproperties }
{ bClipStaticMesh=True CullDistance=7000.000000 LifeSpan=5.000000 DrawScale=0.500000 defaultproperties
} {
bClipStaticMesh=True
CullDistance=7000.000000
LifeSpan=5.000000
DrawScale=0.500000
}

View File

@ -1,6 +1,37 @@
// ScrN copy // ScrN copy
class NiceNitroGroundEffect extends NiceFreezeParticlesDirectional; class NiceNitroGroundEffect extends NiceFreezeParticlesDirectional;
defaultproperties defaultproperties
{ Begin Object Class=SpriteEmitter Name=SpriteEmitter0 FadeOut=True FadeIn=True RespawnDeadParticles=False SpinParticles=True UseSizeScale=True UseRegularSizeScale=False UniformSize=True AutomaticInitialSpawning=False ExtentMultiplier=(X=0.000000,Y=0.000000) ColorScale(0)=(Color=(B=255,G=255,R=255,A=255)) ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255)) Opacity=0.470000 FadeOutStartTime=0.940000 FadeInEndTime=0.300000 MaxParticles=50 StartLocationShape=PTLS_Polar SpinsPerSecondRange=(X=(Max=0.035000)) StartSpinRange=(X=(Min=-0.200000,Max=0.300000)) SizeScale(0)=(RelativeTime=0.500000,RelativeSize=0.900000) SizeScale(1)=(RelativeTime=1.000000,RelativeSize=0.500000) StartSizeRange=(X=(Min=15.000000,Max=35.000000),Y=(Min=15.000000,Max=35.000000),Z=(Min=15.000000,Max=35.000000)) InitialParticlesPerSecond=60.000000 DrawStyle=PTDS_AlphaBlend Texture=Texture'Effects_Tex.explosions.DSmoke_2' LifetimeRange=(Min=2.000000,Max=2.000000) StartVelocityRange=(X=(Min=-85.000000,Max=85.000000),Y=(Min=-85.000000,Max=85.000000)) StartVelocityRadialRange=(Min=-40.000000,Max=40.000000) End Object Emitters(0)=SpriteEmitter'NicePack.NiceNitroGroundEffect.SpriteEmitter0' {
LifeSpan=5.000000 Begin Object Class=SpriteEmitter Name=SpriteEmitter0
} FadeOut=True
FadeIn=True
RespawnDeadParticles=False
SpinParticles=True
UseSizeScale=True
UseRegularSizeScale=False
UniformSize=True
AutomaticInitialSpawning=False
ExtentMultiplier=(X=0.000000,Y=0.000000)
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
Opacity=0.470000
FadeOutStartTime=0.940000
FadeInEndTime=0.300000
MaxParticles=50
StartLocationShape=PTLS_Polar
SpinsPerSecondRange=(X=(Max=0.035000))
StartSpinRange=(X=(Min=-0.200000,Max=0.300000))
SizeScale(0)=(RelativeTime=0.500000,RelativeSize=0.900000)
SizeScale(1)=(RelativeTime=1.000000,RelativeSize=0.500000)
StartSizeRange=(X=(Min=15.000000,Max=35.000000),Y=(Min=15.000000,Max=35.000000),Z=(Min=15.000000,Max=35.000000))
InitialParticlesPerSecond=60.000000
DrawStyle=PTDS_AlphaBlend
Texture=Texture'Effects_Tex.explosions.DSmoke_2'
LifetimeRange=(Min=2.000000,Max=2.000000)
StartVelocityRange=(X=(Min=-85.000000,Max=85.000000),Y=(Min=-85.000000,Max=85.000000))
StartVelocityRadialRange=(Min=-40.000000,Max=40.000000)
End Object
Emitters(0)=SpriteEmitter'NicePack.NiceNitroGroundEffect.SpriteEmitter0'
LifeSpan=5.000000
}

View File

@ -1,190 +1,376 @@
class NiceGUIBuyMenu extends UT2k4MainPage; class NiceGUIBuyMenu extends UT2k4MainPage;
//The "Header" //The "Header"
var automated GUIImage HeaderBG_Left; var automated GUIImage HeaderBG_Left;
var automated GUIImage HeaderBG_Center; var automated GUIImage HeaderBG_Center;
var automated GUIImage HeaderBG_Right; var automated GUIImage HeaderBG_Right;
var automated GUILabel CurrentPerkLabel; var automated GUILabel CurrentPerkLabel;
var automated GUILabel TimeLeftLabel; var automated GUILabel TimeLeftLabel;
var automated GUILabel WaveLabel; var automated GUILabel WaveLabel;
var automated GUILabel HeaderBG_Left_Label; var automated GUILabel HeaderBG_Left_Label;
var automated KFQuickPerkSelect QuickPerkSelect; var automated KFQuickPerkSelect QuickPerkSelect;
var automated KFBuyMenuFilter BuyMenuFilter; var automated KFBuyMenuFilter BuyMenuFilter;
var automated GUIButton StoreTabButton; var automated GUIButton StoreTabButton;
var automated GUIButton PerkTabButton; var automated GUIButton PerkTabButton;
//The "Footer" //The "Footer"
var automated GUIImage WeightBG; var automated GUIImage WeightBG;
var automated GUIImage WeightIcon; var automated GUIImage WeightIcon;
var automated GUIImage WeightIconBG; var automated GUIImage WeightIconBG;
var automated KFWeightBar WeightBar; var automated KFWeightBar WeightBar;
//const BUYLIST_CATS =7; //const BUYLIST_CATS =7;
var() editconst noexport float SavedPitch; var() editconst noexport float SavedPitch;
var color RedColor; var color RedColor;
var color GreenGreyColor; var color GreenGreyColor;
var() UT2K4TabPanel ActivePanel; var() UT2K4TabPanel ActivePanel;
var localized string CurrentPerk; var localized string CurrentPerk;
var localized string NoActivePerk; var localized string NoActivePerk;
var localized string TraderClose; var localized string TraderClose;
var localized string WaveString; var localized string WaveString;
var localized string LvAbbrString; var localized string LvAbbrString;
function InitComponent(GUIController MyC, GUIComponent MyO) function InitComponent(GUIController MyC, GUIComponent MyO)
{ {
local int i; local int i;
super.InitComponent(MyC, MyO); super.InitComponent(MyC, MyO);
c_Tabs.BackgroundImage = none; c_Tabs.BackgroundImage = none;
c_Tabs.BackgroundStyle = none; c_Tabs.BackgroundStyle = none;
InitTabs(); InitTabs();
for ( i = 0; i < c_Tabs.TabStack.Length; i++ ) for ( i = 0; i < c_Tabs.TabStack.Length; i++ )
{ {
c_Tabs.TabStack[i].bVisible = false; c_Tabs.TabStack[i].bVisible = false;
} }
UpdateWeightBar(); UpdateWeightBar();
} }
function InitTabs() function InitTabs()
{ {
local int i; local int i;
for ( i = 0; i < PanelCaption.Length && i < PanelClass.Length && i < PanelHint.Length; i++ ) for ( i = 0; i < PanelCaption.Length && i < PanelClass.Length && i < PanelHint.Length; i++ )
{ {
c_Tabs.AddTab(PanelCaption[i], PanelClass[i],, PanelHint[i]); c_Tabs.AddTab(PanelCaption[i], PanelClass[i],, PanelHint[i]);
} }
} }
function UpdateWeightBar() function UpdateWeightBar()
{ {
if ( KFHumanPawn(PlayerOwner().Pawn) != none ) if ( KFHumanPawn(PlayerOwner().Pawn) != none )
{ {
WeightBar.MaxBoxes = KFHumanPawn(PlayerOwner().Pawn).MaxCarryWeight; WeightBar.MaxBoxes = KFHumanPawn(PlayerOwner().Pawn).MaxCarryWeight;
WeightBar.CurBoxes = KFHumanPawn(PlayerOwner().Pawn).CurrentWeight; WeightBar.CurBoxes = KFHumanPawn(PlayerOwner().Pawn).CurrentWeight;
} }
} }
event Opened(GUIComponent Sender) event Opened(GUIComponent Sender)
{ {
local rotator PlayerRot; local rotator PlayerRot;
super.Opened(Sender); super.Opened(Sender);
c_Tabs.ActivateTabByName(PanelCaption[0], true); c_Tabs.ActivateTabByName(PanelCaption[0], true);
// Tell the controller that he is on a shopping spree // Tell the controller that he is on a shopping spree
if ( KFPlayerController(PlayerOwner()) != none ) if ( KFPlayerController(PlayerOwner()) != none )
{ KFPlayerController(PlayerOwner()).bShopping = true; {
} KFPlayerController(PlayerOwner()).bShopping = true;
if ( KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).bAimingRifle ) }
{ if ( KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).bAimingRifle )
KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).IronSightZoomOut(); {
} KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).IronSightZoomOut();
// Set camera's pitch to zero when menu initialised (otherwise spinny weap goes kooky) }
PlayerRot = PlayerOwner().Rotation; // Set camera's pitch to zero when menu initialised (otherwise spinny weap goes kooky)
SavedPitch = PlayerRot.Pitch; PlayerRot = PlayerOwner().Rotation;
PlayerRot.Yaw = PlayerRot.Yaw % 65536; SavedPitch = PlayerRot.Pitch;
PlayerRot.Pitch = 0; PlayerRot.Yaw = PlayerRot.Yaw % 65536;
PlayerRot.Roll = 0; PlayerRot.Pitch = 0;
PlayerOwner().SetRotation(PlayerRot); PlayerRot.Roll = 0;
SetTimer(0.05f, true); PlayerOwner().SetRotation(PlayerRot);
} SetTimer(0.05f, true);
function Timer() }
{ function Timer()
UpdateHeader(); {
UpdateWeightBar(); UpdateHeader();
} UpdateWeightBar();
function InternalOnClose(optional bool bCanceled) }
{ function InternalOnClose(optional bool bCanceled)
local rotator NewRot; {
// Reset player local rotator NewRot;
NewRot = PlayerOwner().Rotation; // Reset player
NewRot.Pitch = SavedPitch; NewRot = PlayerOwner().Rotation;
PlayerOwner().SetRotation(NewRot); NewRot.Pitch = SavedPitch;
Super.OnClose(bCanceled); PlayerOwner().SetRotation(NewRot);
} Super.OnClose(bCanceled);
function UpdateHeader() }
{ function UpdateHeader()
local int TimeLeftMin, TimeLeftSec; {
local string TimeString; local int TimeLeftMin, TimeLeftSec;
if ( KFPlayerController(PlayerOwner()) == none || PlayerOwner().PlayerReplicationInfo == none || local string TimeString;
PlayerOwner().GameReplicationInfo == none ) if ( KFPlayerController(PlayerOwner()) == none || PlayerOwner().PlayerReplicationInfo == none ||
{ PlayerOwner().GameReplicationInfo == none )
return; {
} return;
// Current Perk }
if ( KFPlayerController(PlayerOwner()).SelectedVeterancy != none ) // Current Perk
{ if ( KFPlayerController(PlayerOwner()).SelectedVeterancy != none )
CurrentPerkLabel.Caption = CurrentPerk$":" @ KFPlayerController(PlayerOwner()).SelectedVeterancy.default.VeterancyName @ LvAbbrString$KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo).ClientVeteranSkillLevel; {
} CurrentPerkLabel.Caption = CurrentPerk$":" @ KFPlayerController(PlayerOwner()).SelectedVeterancy.default.VeterancyName @ LvAbbrString$KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo).ClientVeteranSkillLevel;
else }
{ else
CurrentPerkLabel.Caption = CurrentPerk$":" @ NoActivePerk; {
} CurrentPerkLabel.Caption = CurrentPerk$":" @ NoActivePerk;
// Trader time left }
TimeLeftMin = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave / 60; // Trader time left
TimeLeftSec = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave % 60; TimeLeftMin = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave / 60;
if ( TimeLeftMin < 1 ) TimeLeftSec = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave % 60;
{ if ( TimeLeftMin < 1 )
TimeString = "00:"; {
} TimeString = "00:";
else }
{ else
TimeString = "0" $ TimeLeftMin $ ":"; {
} TimeString = "0" $ TimeLeftMin $ ":";
if ( TimeLeftSec >= 10 ) }
{ if ( TimeLeftSec >= 10 )
TimeString = TimeString $ TimeLeftSec; {
} TimeString = TimeString $ TimeLeftSec;
else }
{ else
TimeString = TimeString $ "0" $ TimeLeftSec; {
} TimeString = TimeString $ "0" $ TimeLeftSec;
TimeLeftLabel.Caption = TraderClose @ TimeString; }
if ( KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave < 10 ) TimeLeftLabel.Caption = TraderClose @ TimeString;
{ if ( KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave < 10 )
TimeLeftLabel.TextColor = RedColor; {
} TimeLeftLabel.TextColor = RedColor;
else }
{ else
TimeLeftLabel.TextColor = GreenGreyColor; {
} TimeLeftLabel.TextColor = GreenGreyColor;
// Wave Counter }
WaveLabel.Caption = WaveString$":" @ (KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).WaveNumber + 1)$"/"$KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).FinalWave; // Wave Counter
} WaveLabel.Caption = WaveString$":" @ (KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).WaveNumber + 1)$"/"$KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).FinalWave;
function KFBuyMenuClosed(optional bool bCanceled) }
{ function KFBuyMenuClosed(optional bool bCanceled)
local rotator NewRot; {
// Reset player local rotator NewRot;
NewRot = PlayerOwner().Rotation; // Reset player
NewRot.Pitch = SavedPitch; NewRot = PlayerOwner().Rotation;
PlayerOwner().SetRotation(NewRot); NewRot.Pitch = SavedPitch;
Super.OnClose(bCanceled); PlayerOwner().SetRotation(NewRot);
if ( KFPlayerController(PlayerOwner()) != none ) Super.OnClose(bCanceled);
{ KFPlayerController(PlayerOwner()).bShopping = false; if ( KFPlayerController(PlayerOwner()) != none )
} {
} KFPlayerController(PlayerOwner()).bShopping = false;
function CloseSale(bool savePurchases) }
{ }
Controller.CloseMenu(!savePurchases); function CloseSale(bool savePurchases)
} {
function bool ButtonClicked(GUIComponent Sender) Controller.CloseMenu(!savePurchases);
{ }
if ( Sender == PerkTabButton ) function bool ButtonClicked(GUIComponent Sender)
{ {
HandleParameters(PanelCaption[1], "OhHi!"); if ( Sender == PerkTabButton )
} {
if ( Sender == StoreTabButton ) HandleParameters(PanelCaption[1], "OhHi!");
{ }
HandleParameters(PanelCaption[0], "OhHi!"); if ( Sender == StoreTabButton )
} {
return true; HandleParameters(PanelCaption[0], "OhHi!");
} }
defaultproperties return true;
{ Begin Object Class=GUIImage Name=HBGLeft Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border' ImageStyle=ISTY_Stretched Hint="Perk Quick Select" WinTop=0.001000 WinLeft=0.001000 WinWidth=0.332300 WinHeight=0.100000 End Object HeaderBG_Left=GUIImage'NicePack.NiceGUIBuyMenu.HBGLeft' }
Begin Object Class=GUIImage Name=HBGCenter Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border' ImageStyle=ISTY_Stretched Hint="Trading Time Left" WinTop=0.001000 WinLeft=0.334000 WinWidth=0.331023 WinHeight=0.100000 End Object HeaderBG_Center=GUIImage'NicePack.NiceGUIBuyMenu.HBGCenter' defaultproperties
Begin Object Class=GUIImage Name=HBGRight Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border' ImageStyle=ISTY_Stretched Hint="Current Perk" WinTop=0.001000 WinLeft=0.666000 WinWidth=0.332000 WinHeight=0.100000 End Object HeaderBG_Right=GUIImage'NicePack.NiceGUIBuyMenu.HBGRight' {
Begin Object Class=GUILabel Name=Perk TextAlign=TXTA_Center TextColor=(B=158,G=176,R=175) WinTop=0.010000 WinLeft=0.665000 WinWidth=0.329761 WinHeight=0.050000 End Object CurrentPerkLabel=GUILabel'NicePack.NiceGUIBuyMenu.Perk' Begin Object Class=GUIImage Name=HBGLeft
Begin Object Class=GUILabel Name=Time Caption="Trader closes in 00:31" TextAlign=TXTA_Center TextColor=(B=158,G=176,R=175) TextFont="UT2LargeFont" WinTop=0.020952 WinLeft=0.335000 WinWidth=0.330000 WinHeight=0.035000 End Object TimeLeftLabel=GUILabel'NicePack.NiceGUIBuyMenu.Time' Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border'
Begin Object Class=GUILabel Name=Wave Caption="Wave: 7/10" TextAlign=TXTA_Center TextColor=(B=158,G=176,R=175) WinTop=0.052857 WinLeft=0.336529 WinWidth=0.327071 WinHeight=0.035000 End Object WaveLabel=GUILabel'NicePack.NiceGUIBuyMenu.Wave' ImageStyle=ISTY_Stretched
Begin Object Class=GUILabel Name=HBGLL Caption="Quick Perk Select" TextAlign=TXTA_Center TextColor=(B=158,G=176,R=175) TextFont="UT2ServerListFont" WinTop=0.007238 WinLeft=0.024937 WinWidth=0.329761 WinHeight=0.019524 End Object HeaderBG_Left_Label=GUILabel'NicePack.NiceGUIBuyMenu.HBGLL' Hint="Perk Quick Select"
Begin Object Class=KFQuickPerkSelect Name=QS WinTop=0.011906 WinLeft=0.008008 WinWidth=0.316601 WinHeight=0.082460 OnDraw=QS.MyOnDraw End Object QuickPerkSelect=KFQuickPerkSelect'NicePack.NiceGUIBuyMenu.QS' WinTop=0.001000
Begin Object Class=KFBuyMenuFilter Name=filter WinTop=0.051000 WinLeft=0.670000 WinWidth=0.305000 WinHeight=0.082460 OnDraw=filter.MyOnDraw End Object BuyMenuFilter=KFBuyMenuFilter'NicePack.NiceGUIBuyMenu.filter' WinLeft=0.001000
Begin Object Class=GUIButton Name=StoreTabB Caption="Store" FontScale=FNS_Small WinTop=0.072762 WinLeft=0.202801 WinWidth=0.050000 WinHeight=0.022000 OnClick=NiceGUIBuyMenu.ButtonClicked OnKeyEvent=StoreTabB.InternalOnKeyEvent End Object StoreTabButton=GUIButton'NicePack.NiceGUIBuyMenu.StoreTabB' WinWidth=0.332300
Begin Object Class=GUIButton Name=PerkTabB Caption="Perk" FontScale=FNS_Small WinTop=0.072762 WinLeft=0.127234 WinWidth=0.050000 WinHeight=0.022000 OnClick=NiceGUIBuyMenu.ButtonClicked OnKeyEvent=PerkTabB.InternalOnKeyEvent End Object PerkTabButton=GUIButton'NicePack.NiceGUIBuyMenu.PerkTabB' WinHeight=0.100000
Begin Object Class=GUIImage Name=Weight Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border' ImageStyle=ISTY_Stretched WinTop=0.934206 WinLeft=0.001000 WinWidth=0.663086 WinHeight=0.065828 End Object WeightBG=GUIImage'NicePack.NiceGUIBuyMenu.Weight' End Object
Begin Object Class=GUIImage Name=WeightIco Image=Texture'KillingFloorHUD.HUD.Hud_Weight' ImageStyle=ISTY_Scaled WinTop=0.946166 WinLeft=0.009961 WinWidth=0.033672 WinHeight=0.048992 RenderWeight=0.460000 End Object WeightIcon=GUIImage'NicePack.NiceGUIBuyMenu.WeightIco' HeaderBG_Left=GUIImage'NicePack.NiceGUIBuyMenu.HBGLeft'
Begin Object Class=GUIImage Name=WeightIcoBG Image=Texture'KF_InterfaceArt_tex.Menu.Perk_box_unselected' ImageStyle=ISTY_Scaled WinTop=0.942416 WinLeft=0.006055 WinWidth=0.041484 WinHeight=0.054461 RenderWeight=0.450000 End Object WeightIconBG=GUIImage'NicePack.NiceGUIBuyMenu.WeightIcoBG'
Begin Object Class=KFWeightBar Name=WeightB WinTop=0.945302 WinLeft=0.055266 WinWidth=0.443888 WinHeight=0.053896 OnDraw=WeightB.MyOnDraw End Object WeightBar=KFWeightBar'NicePack.NiceGUIBuyMenu.WeightB' Begin Object Class=GUIImage Name=HBGCenter
RedColor=(R=255,A=255) GreenGreyColor=(B=158,G=176,R=175,A=255) CurrentPerk="Current Perk" NoActivePerk="No Active Perk!" TraderClose="Trader Closes in" WaveString="Wave" LvAbbrString="Lv" Begin Object Class=GUITabControl Name=PageTabs bDockPanels=True TabHeight=0.025000 BackgroundStyleName="TabBackground" WinTop=0.078000 WinLeft=0.005000 WinWidth=0.990000 WinHeight=0.025000 RenderWeight=0.490000 TabOrder=0 bAcceptsInput=True OnActivate=PageTabs.InternalOnActivate OnChange=NiceGUIBuyMenu.InternalOnChange End Object c_Tabs=GUITabControl'NicePack.NiceGUIBuyMenu.PageTabs' Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border'
Begin Object Class=BackgroundImage Name=PageBackground Image=Texture'Engine.WhiteSquareTexture' ImageColor=(B=20,G=20,R=20) ImageStyle=ISTY_Tiled RenderWeight=0.001000 End Object i_Background=BackgroundImage'NicePack.NiceGUIBuyMenu.PageBackground' ImageStyle=ISTY_Stretched
PanelClass(0)="KFGUI.KFTab_BuyMenu" PanelClass(1)="KFGUI.KFTab_Perks" PanelCaption(0)="Store" PanelCaption(1)="Perks" PanelHint(0)="Trade equipment and ammunition" PanelHint(1)="Select your current Perk" bAllowedAsLast=True OnClose=NiceGUIBuyMenu.KFBuyMenuClosed WhiteColor=(B=255,G=255,R=255) Hint="Trading Time Left"
} WinTop=0.001000
WinLeft=0.334000
WinWidth=0.331023
WinHeight=0.100000
End Object
HeaderBG_Center=GUIImage'NicePack.NiceGUIBuyMenu.HBGCenter'
Begin Object Class=GUIImage Name=HBGRight
Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border'
ImageStyle=ISTY_Stretched
Hint="Current Perk"
WinTop=0.001000
WinLeft=0.666000
WinWidth=0.332000
WinHeight=0.100000
End Object
HeaderBG_Right=GUIImage'NicePack.NiceGUIBuyMenu.HBGRight'
Begin Object Class=GUILabel Name=Perk
TextAlign=TXTA_Center
TextColor=(B=158,G=176,R=175)
WinTop=0.010000
WinLeft=0.665000
WinWidth=0.329761
WinHeight=0.050000
End Object
CurrentPerkLabel=GUILabel'NicePack.NiceGUIBuyMenu.Perk'
Begin Object Class=GUILabel Name=Time
Caption="Trader closes in 00:31"
TextAlign=TXTA_Center
TextColor=(B=158,G=176,R=175)
TextFont="UT2LargeFont"
WinTop=0.020952
WinLeft=0.335000
WinWidth=0.330000
WinHeight=0.035000
End Object
TimeLeftLabel=GUILabel'NicePack.NiceGUIBuyMenu.Time'
Begin Object Class=GUILabel Name=Wave
Caption="Wave: 7/10"
TextAlign=TXTA_Center
TextColor=(B=158,G=176,R=175)
WinTop=0.052857
WinLeft=0.336529
WinWidth=0.327071
WinHeight=0.035000
End Object
WaveLabel=GUILabel'NicePack.NiceGUIBuyMenu.Wave'
Begin Object Class=GUILabel Name=HBGLL
Caption="Quick Perk Select"
TextAlign=TXTA_Center
TextColor=(B=158,G=176,R=175)
TextFont="UT2ServerListFont"
WinTop=0.007238
WinLeft=0.024937
WinWidth=0.329761
WinHeight=0.019524
End Object
HeaderBG_Left_Label=GUILabel'NicePack.NiceGUIBuyMenu.HBGLL'
Begin Object Class=KFQuickPerkSelect Name=QS
WinTop=0.011906
WinLeft=0.008008
WinWidth=0.316601
WinHeight=0.082460
OnDraw=QS.MyOnDraw
End Object
QuickPerkSelect=KFQuickPerkSelect'NicePack.NiceGUIBuyMenu.QS'
Begin Object Class=KFBuyMenuFilter Name=filter
WinTop=0.051000
WinLeft=0.670000
WinWidth=0.305000
WinHeight=0.082460
OnDraw=filter.MyOnDraw
End Object
BuyMenuFilter=KFBuyMenuFilter'NicePack.NiceGUIBuyMenu.filter'
Begin Object Class=GUIButton Name=StoreTabB
Caption="Store"
FontScale=FNS_Small
WinTop=0.072762
WinLeft=0.202801
WinWidth=0.050000
WinHeight=0.022000
OnClick=NiceGUIBuyMenu.ButtonClicked
OnKeyEvent=StoreTabB.InternalOnKeyEvent
End Object
StoreTabButton=GUIButton'NicePack.NiceGUIBuyMenu.StoreTabB'
Begin Object Class=GUIButton Name=PerkTabB
Caption="Perk"
FontScale=FNS_Small
WinTop=0.072762
WinLeft=0.127234
WinWidth=0.050000
WinHeight=0.022000
OnClick=NiceGUIBuyMenu.ButtonClicked
OnKeyEvent=PerkTabB.InternalOnKeyEvent
End Object
PerkTabButton=GUIButton'NicePack.NiceGUIBuyMenu.PerkTabB'
Begin Object Class=GUIImage Name=Weight
Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border'
ImageStyle=ISTY_Stretched
WinTop=0.934206
WinLeft=0.001000
WinWidth=0.663086
WinHeight=0.065828
End Object
WeightBG=GUIImage'NicePack.NiceGUIBuyMenu.Weight'
Begin Object Class=GUIImage Name=WeightIco
Image=Texture'KillingFloorHUD.HUD.Hud_Weight'
ImageStyle=ISTY_Scaled
WinTop=0.946166
WinLeft=0.009961
WinWidth=0.033672
WinHeight=0.048992
RenderWeight=0.460000
End Object
WeightIcon=GUIImage'NicePack.NiceGUIBuyMenu.WeightIco'
Begin Object Class=GUIImage Name=WeightIcoBG
Image=Texture'KF_InterfaceArt_tex.Menu.Perk_box_unselected'
ImageStyle=ISTY_Scaled
WinTop=0.942416
WinLeft=0.006055
WinWidth=0.041484
WinHeight=0.054461
RenderWeight=0.450000
End Object
WeightIconBG=GUIImage'NicePack.NiceGUIBuyMenu.WeightIcoBG'
Begin Object Class=KFWeightBar Name=WeightB
WinTop=0.945302
WinLeft=0.055266
WinWidth=0.443888
WinHeight=0.053896
OnDraw=WeightB.MyOnDraw
End Object
WeightBar=KFWeightBar'NicePack.NiceGUIBuyMenu.WeightB'
RedColor=(R=255,A=255)
GreenGreyColor=(B=158,G=176,R=175,A=255)
CurrentPerk="Current Perk"
NoActivePerk="No Active Perk!"
TraderClose="Trader Closes in"
WaveString="Wave"
LvAbbrString="Lv"
Begin Object Class=GUITabControl Name=PageTabs
bDockPanels=True
TabHeight=0.025000
BackgroundStyleName="TabBackground"
WinTop=0.078000
WinLeft=0.005000
WinWidth=0.990000
WinHeight=0.025000
RenderWeight=0.490000
TabOrder=0
bAcceptsInput=True
OnActivate=PageTabs.InternalOnActivate
OnChange=NiceGUIBuyMenu.InternalOnChange
End Object
c_Tabs=GUITabControl'NicePack.NiceGUIBuyMenu.PageTabs'
Begin Object Class=BackgroundImage Name=PageBackground
Image=Texture'Engine.WhiteSquareTexture'
ImageColor=(B=20,G=20,R=20)
ImageStyle=ISTY_Tiled
RenderWeight=0.001000
End Object
i_Background=BackgroundImage'NicePack.NiceGUIBuyMenu.PageBackground'
PanelClass(0)="KFGUI.KFTab_BuyMenu"
PanelClass(1)="KFGUI.KFTab_Perks"
PanelCaption(0)="Store"
PanelCaption(1)="Perks"
PanelHint(0)="Trade equipment and ammunition"
PanelHint(1)="Select your current Perk"
bAllowedAsLast=True
OnClose=NiceGUIBuyMenu.KFBuyMenuClosed
WhiteColor=(B=255,G=255,R=255)
}

View File

@ -1,70 +1,281 @@
class NiceGUISettings extends Settings_Tabs; class NiceGUISettings extends Settings_Tabs;
//var automated GUIButton skillButtonA; //var automated GUIButton skillButtonA;
var array<string> ForceProjItems; var array<string> ForceProjItems;
var automated moCheckBox ch_WeapManagement; var automated moCheckBox ch_WeapManagement;
var automated moCheckBox ch_AltSwitches; var automated moCheckBox ch_AltSwitches;
var automated moCheckBox ch_DispCounters; var automated moCheckBox ch_DispCounters;
var automated moCheckBox ch_DisWeapProgress; var automated moCheckBox ch_DisWeapProgress;
var automated moCheckBox ch_ShowHLMessages; var automated moCheckBox ch_ShowHLMessages;
var automated moCheckBox ch_CancelFire; var automated moCheckBox ch_CancelFire;
var automated moCheckBox ch_CancelSwitching; var automated moCheckBox ch_CancelSwitching;
var automated moCheckBox ch_CancelNades; var automated moCheckBox ch_CancelNades;
var automated moCheckBox ch_CancelAiming; var automated moCheckBox ch_CancelAiming;
var automated moCheckBox ch_ReloadWontWork; var automated moCheckBox ch_ReloadWontWork;
var automated GUISectionBackground bg_WEAP; var automated GUISectionBackground bg_WEAP;
var automated GUISectionBackground bg_RELOAD; var automated GUISectionBackground bg_RELOAD;
function InitComponent(GUIController MyController, GUIComponent MyOwner){ function InitComponent(GUIController MyController, GUIComponent MyOwner){
super.InitComponent(MyController, MyOwner); super.InitComponent(MyController, MyOwner);
} }
function InternalOnLoadINI(GUIComponent sender, string s){ function InternalOnLoadINI(GUIComponent sender, string s){
local NicePlayerController nicePlayer; local NicePlayerController nicePlayer;
nicePlayer = NicePlayerController(PlayerOwner()); nicePlayer = NicePlayerController(PlayerOwner());
if(nicePlayer == none) return; if(nicePlayer == none)
switch(sender){ return;
case ch_WeapManagement: ch_WeapManagement.Checked(nicePlayer.bNiceWeaponManagement); break; switch(sender){
case ch_AltSwitches: ch_AltSwitches.Checked(nicePlayer.bFlagAltSwitchesModes); break; case ch_WeapManagement:
case ch_DispCounters: ch_DispCounters.Checked(nicePlayer.bFlagDisplayCounters); break; ch_WeapManagement.Checked(nicePlayer.bNiceWeaponManagement);
case ch_DisWeapProgress: ch_DisWeapProgress.Checked(nicePlayer.bFlagDisplayWeaponProgress); break; break;
case ch_ShowHLMessages: ch_ShowHLMessages.Checked(nicePlayer.bFlagShowHLMessages); break; case ch_AltSwitches:
case ch_CancelFire: ch_CancelFire.Checked(nicePlayer.bRelCancelByFire); break; ch_AltSwitches.Checked(nicePlayer.bFlagAltSwitchesModes);
case ch_CancelSwitching: ch_CancelSwitching.Checked(nicePlayer.bRelCancelBySwitching); break; break;
case ch_CancelNades: ch_CancelNades.Checked(nicePlayer.bRelCancelByNades); break; case ch_DispCounters:
case ch_CancelAiming: ch_CancelAiming.Checked(nicePlayer.bRelCancelByAiming); break; ch_DispCounters.Checked(nicePlayer.bFlagDisplayCounters);
case ch_ReloadWontWork: ch_ReloadWontWork.Checked(nicePlayer.bFlagUseServerReload); break; break;
} case ch_DisWeapProgress:
} ch_DisWeapProgress.Checked(nicePlayer.bFlagDisplayWeaponProgress);
function InternalOnChange(GUIComponent Sender){ break;
local NicePlayerController nicePlayer; case ch_ShowHLMessages:
super.InternalOnChange(Sender); ch_ShowHLMessages.Checked(nicePlayer.bFlagShowHLMessages);
nicePlayer = NicePlayerController(PlayerOwner()); break;
if(nicePlayer == none) return; case ch_CancelFire:
switch(sender){ ch_CancelFire.Checked(nicePlayer.bRelCancelByFire);
case ch_WeapManagement: nicePlayer.bNiceWeaponManagement = ch_WeapManagement.IsChecked(); break; break;
case ch_AltSwitches: nicePlayer.ServerSetAltSwitchesModes(ch_AltSwitches.IsChecked()); break; case ch_CancelSwitching:
case ch_DispCounters: nicePlayer.ServerSetDisplayCounters(ch_DispCounters.IsChecked()); break; ch_CancelSwitching.Checked(nicePlayer.bRelCancelBySwitching);
case ch_DisWeapProgress: nicePlayer.ServerSetDisplayWeaponProgress(ch_DisWeapProgress.IsChecked()); break; break;
case ch_ShowHLMessages: nicePlayer.ServerSetHLMessages(ch_ShowHLMessages.IsChecked()); break; case ch_CancelNades:
case ch_CancelFire: nicePlayer.bRelCancelByFire = ch_CancelFire.IsChecked(); break; ch_CancelNades.Checked(nicePlayer.bRelCancelByNades);
case ch_CancelSwitching: nicePlayer.bRelCancelBySwitching = ch_CancelSwitching.IsChecked(); break; break;
case ch_CancelNades: nicePlayer.bRelCancelByNades = ch_CancelNades.IsChecked(); break; case ch_CancelAiming:
case ch_CancelAiming: nicePlayer.bRelCancelByAiming = ch_CancelAiming.IsChecked(); break; ch_CancelAiming.Checked(nicePlayer.bRelCancelByAiming);
case ch_ReloadWontWork: nicePlayer.ServerSetUseServerReload(ch_ReloadWontWork.IsChecked()); break; break;
} case ch_ReloadWontWork:
nicePlayer.ClientSaveConfig(); ch_ReloadWontWork.Checked(nicePlayer.bFlagUseServerReload);
} break;
// size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865) }
// tab order }
defaultproperties function InternalOnChange(GUIComponent Sender){
{ Begin Object Class=moCheckBox Name=WeaponManagement CaptionWidth=0.955000 Caption="Nice weapon management" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=WeaponManagement.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, NicePack will use it's own system to manage weapon switching" WinTop=0.050000 WinLeft=0.012500 WinWidth=0.278000 TabOrder=4 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_WeapManagement=moCheckBox'NicePack.NiceGUISettings.WeaponManagement' local NicePlayerController nicePlayer;
Begin Object Class=moCheckBox Name=AltSwitches CaptionWidth=0.955000 Caption="Alt fire switches modes" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=AltSwitches.InternalOnCreateComponent IniOption="@Internal" Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire" WinTop=0.100000 WinLeft=0.012500 WinWidth=0.278000 TabOrder=6 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_AltSwitches=moCheckBox'NicePack.NiceGUISettings.AltSwitches' super.InternalOnChange(Sender);
Begin Object Class=moCheckBox Name=DispCounters CaptionWidth=0.955000 Caption="Display counters" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=DispCounters.InternalOnCreateComponent IniOption="@Internal" Hint="Toggles display of the various counters used by skills" WinTop=0.150000 WinLeft=0.012500 WinWidth=0.278000 TabOrder=7 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_DispCounters=moCheckBox'NicePack.NiceGUISettings.DispCounters' nicePlayer = NicePlayerController(PlayerOwner());
Begin Object Class=moCheckBox Name=DispWeapProgress CaptionWidth=0.955000 Caption="Display weapon progress" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=DispWeapProgress.InternalOnCreateComponent IniOption="@Internal" Hint="Displays weapon progress rate, whoever it's defined by a skill that's using this functionality" WinTop=0.200000 WinLeft=0.012500 WinWidth=0.278000 TabOrder=8 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_DisWeapProgress=moCheckBox'NicePack.NiceGUISettings.DispWeapProgress' if(nicePlayer == none)
Begin Object Class=moCheckBox Name=ShowHLMessages CaptionWidth=0.955000 Caption="Show Hardcore Level messages" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=ShowHLMessages.InternalOnCreateComponent IniOption="@Internal" Hint="Enable to be notified each time Hardcore Level is changed" WinTop=0.300000 WinLeft=0.012500 WinWidth=0.278000 TabOrder=9 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_ShowHLMessages=moCheckBox'NicePack.NiceGUISettings.ShowHLMessages' return;
Begin Object Class=moCheckBox Name=CancelFire CaptionWidth=0.955000 Caption="Cancel reload by shooting" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=CancelFire.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)" WinTop=0.050000 WinLeft=0.517500 WinWidth=0.287000 TabOrder=11 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_CancelFire=moCheckBox'NicePack.NiceGUISettings.CancelFire' switch(sender){
Begin Object Class=moCheckBox Name=CancelSwitching CaptionWidth=0.955000 Caption="Cancel reload by switching weapons" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=CancelSwitching.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon" WinTop=0.100000 WinLeft=0.517500 WinWidth=0.287000 TabOrder=12 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_CancelSwitching=moCheckBox'NicePack.NiceGUISettings.CancelSwitching' case ch_WeapManagement:
Begin Object Class=moCheckBox Name=CancelNades CaptionWidth=0.955000 Caption="Cancel reload by throwing grenades" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=CancelNades.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade" WinTop=0.150000 WinLeft=0.517500 WinWidth=0.287000 TabOrder=13 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_CancelNades=moCheckBox'NicePack.NiceGUISettings.CancelNades' nicePlayer.bNiceWeaponManagement = ch_WeapManagement.IsChecked();
Begin Object Class=moCheckBox Name=CancelAiming CaptionWidth=0.955000 Caption="Cancel reload by aiming" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=CancelAiming.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by going into iron sights (when you have ammo)" WinTop=0.200000 WinLeft=0.517500 WinWidth=0.287000 TabOrder=14 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_CancelAiming=moCheckBox'NicePack.NiceGUISettings.CancelAiming' break;
Begin Object Class=moCheckBox Name=ServerReload CaptionWidth=0.955000 Caption="My reload doesn't work" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=ServerReload.InternalOnCreateComponent IniOption="@Internal" Hint="Check this option ONLY in case converted weapons don't reload at all for you; this option should fix the problem, but then latency will affect both reload and active reload" WinTop=0.250000 WinLeft=0.517500 WinWidth=0.287000 TabOrder=15 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_ReloadWontWork=moCheckBox'NicePack.NiceGUISettings.ServerReload' case ch_AltSwitches:
Begin Object Class=GUISectionBackground Name=WEAPBG Caption="General weapon settings" WinTop=0.012500 WinWidth=0.495000 WinHeight=0.287500 RenderWeight=0.100100 OnPreDraw=WeaponsBG.InternalPreDraw End Object bg_WEAP=GUISectionBackground'NicePack.NiceGUISettings.WEAPBG' nicePlayer.ServerSetAltSwitchesModes(ch_AltSwitches.IsChecked());
Begin Object Class=GUISectionBackground Name=RELOADBG Caption="Weapon reload settings" WinTop=0.012500 WinLeft=0.505000 WinWidth=0.495000 WinHeight=0.287500 RenderWeight=0.100100 OnPreDraw=WeaponsBG.InternalPreDraw End Object bg_RELOAD=GUISectionBackground'NicePack.NiceGUISettings.RELOADBG' break;
} case ch_DispCounters:
nicePlayer.ServerSetDisplayCounters(ch_DispCounters.IsChecked());
break;
case ch_DisWeapProgress:
nicePlayer.ServerSetDisplayWeaponProgress(ch_DisWeapProgress.IsChecked());
break;
case ch_ShowHLMessages:
nicePlayer.ServerSetHLMessages(ch_ShowHLMessages.IsChecked());
break;
case ch_CancelFire:
nicePlayer.bRelCancelByFire = ch_CancelFire.IsChecked();
break;
case ch_CancelSwitching:
nicePlayer.bRelCancelBySwitching = ch_CancelSwitching.IsChecked();
break;
case ch_CancelNades:
nicePlayer.bRelCancelByNades = ch_CancelNades.IsChecked();
break;
case ch_CancelAiming:
nicePlayer.bRelCancelByAiming = ch_CancelAiming.IsChecked();
break;
case ch_ReloadWontWork:
nicePlayer.ServerSetUseServerReload(ch_ReloadWontWork.IsChecked());
break;
}
nicePlayer.ClientSaveConfig();
}
// size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865)
// tab order
defaultproperties
{
Begin Object Class=moCheckBox Name=WeaponManagement
CaptionWidth=0.955000
Caption="Nice weapon management"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=WeaponManagement.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, NicePack will use it's own system to manage weapon switching"
WinTop=0.050000
WinLeft=0.012500
WinWidth=0.278000
TabOrder=4
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_WeapManagement=moCheckBox'NicePack.NiceGUISettings.WeaponManagement'
Begin Object Class=moCheckBox Name=AltSwitches
CaptionWidth=0.955000
Caption="Alt fire switches modes"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=AltSwitches.InternalOnCreateComponent
IniOption="@Internal"
Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire"
WinTop=0.100000
WinLeft=0.012500
WinWidth=0.278000
TabOrder=6
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_AltSwitches=moCheckBox'NicePack.NiceGUISettings.AltSwitches'
Begin Object Class=moCheckBox Name=DispCounters
CaptionWidth=0.955000
Caption="Display counters"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=DispCounters.InternalOnCreateComponent
IniOption="@Internal"
Hint="Toggles display of the various counters used by skills"
WinTop=0.150000
WinLeft=0.012500
WinWidth=0.278000
TabOrder=7
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_DispCounters=moCheckBox'NicePack.NiceGUISettings.DispCounters'
Begin Object Class=moCheckBox Name=DispWeapProgress
CaptionWidth=0.955000
Caption="Display weapon progress"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=DispWeapProgress.InternalOnCreateComponent
IniOption="@Internal"
Hint="Displays weapon progress rate, whoever it's defined by a skill that's using this functionality"
WinTop=0.200000
WinLeft=0.012500
WinWidth=0.278000
TabOrder=8
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_DisWeapProgress=moCheckBox'NicePack.NiceGUISettings.DispWeapProgress'
Begin Object Class=moCheckBox Name=ShowHLMessages
CaptionWidth=0.955000
Caption="Show Hardcore Level messages"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=ShowHLMessages.InternalOnCreateComponent
IniOption="@Internal"
Hint="Enable to be notified each time Hardcore Level is changed"
WinTop=0.300000
WinLeft=0.012500
WinWidth=0.278000
TabOrder=9
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_ShowHLMessages=moCheckBox'NicePack.NiceGUISettings.ShowHLMessages'
Begin Object Class=moCheckBox Name=CancelFire
CaptionWidth=0.955000
Caption="Cancel reload by shooting"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=CancelFire.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)"
WinTop=0.050000
WinLeft=0.517500
WinWidth=0.287000
TabOrder=11
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_CancelFire=moCheckBox'NicePack.NiceGUISettings.CancelFire'
Begin Object Class=moCheckBox Name=CancelSwitching
CaptionWidth=0.955000
Caption="Cancel reload by switching weapons"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=CancelSwitching.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon"
WinTop=0.100000
WinLeft=0.517500
WinWidth=0.287000
TabOrder=12
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_CancelSwitching=moCheckBox'NicePack.NiceGUISettings.CancelSwitching'
Begin Object Class=moCheckBox Name=CancelNades
CaptionWidth=0.955000
Caption="Cancel reload by throwing grenades"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=CancelNades.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade"
WinTop=0.150000
WinLeft=0.517500
WinWidth=0.287000
TabOrder=13
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_CancelNades=moCheckBox'NicePack.NiceGUISettings.CancelNades'
Begin Object Class=moCheckBox Name=CancelAiming
CaptionWidth=0.955000
Caption="Cancel reload by aiming"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=CancelAiming.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by going into iron sights (when you have ammo)"
WinTop=0.200000
WinLeft=0.517500
WinWidth=0.287000
TabOrder=14
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_CancelAiming=moCheckBox'NicePack.NiceGUISettings.CancelAiming'
Begin Object Class=moCheckBox Name=ServerReload
CaptionWidth=0.955000
Caption="My reload doesn't work"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=ServerReload.InternalOnCreateComponent
IniOption="@Internal"
Hint="Check this option ONLY in case converted weapons don't reload at all for you; this option should fix the problem, but then latency will affect both reload and active reload"
WinTop=0.250000
WinLeft=0.517500
WinWidth=0.287000
TabOrder=15
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_ReloadWontWork=moCheckBox'NicePack.NiceGUISettings.ServerReload'
Begin Object Class=GUISectionBackground Name=WEAPBG
Caption="General weapon settings"
WinTop=0.012500
WinWidth=0.495000
WinHeight=0.287500
RenderWeight=0.100100
OnPreDraw=WeaponsBG.InternalPreDraw
End Object
bg_WEAP=GUISectionBackground'NicePack.NiceGUISettings.WEAPBG'
Begin Object Class=GUISectionBackground Name=RELOADBG
Caption="Weapon reload settings"
WinTop=0.012500
WinLeft=0.505000
WinWidth=0.495000
WinHeight=0.287500
RenderWeight=0.100100
OnPreDraw=WeaponsBG.InternalPreDraw
End Object
bg_RELOAD=GUISectionBackground'NicePack.NiceGUISettings.RELOADBG'
}

View File

@ -1,216 +1,372 @@
class NiceInteraction extends Interaction class NiceInteraction extends Interaction
dependson(NicePack) dependson(NicePack)
dependson(NiceAbilityManager); dependson(NiceAbilityManager);
#exec OBJ LOAD FILE=KillingFloor2HUD.utx #exec OBJ LOAD FILE=KillingFloor2HUD.utx
var NicePack NicePackMutator; var NicePack NicePackMutator;
var Material bleedIcon, poisonIcon; var Material bleedIcon, poisonIcon;
var Texture greenBar, redBar; var Texture greenBar, redBar;
var Texture shield; var Texture shield;
var float size; var float size;
// Weapon box sizes // Weapon box sizes
var float InventoryBoxWidth; var float InventoryBoxWidth;
var float InventoryBoxHeight; var float InventoryBoxHeight;
var float BorderSize; var float BorderSize;
event NotifyLevelChange(){ event NotifyLevelChange(){
Master.RemoveInteraction(self); Master.RemoveInteraction(self);
} }
function RegisterMutator(NicePack activePack){ function RegisterMutator(NicePack activePack){
NicePackMutator = activePack; NicePackMutator = activePack;
} }
function bool isPoisoned(ScrnHumanPawn pwn){ function bool isPoisoned(ScrnHumanPawn pwn){
local Inventory I; local Inventory I;
if(pwn.Inventory != none) for(I = pwn.Inventory; I != none; I = I.Inventory) if(I != none && MeanPoisonInventory(I) != none) return true; if(pwn.Inventory != none)
return false; for(I = pwn.Inventory; I != none; I = I.Inventory)
} if(I != none && MeanPoisonInventory(I) != none)
function PostRender(Canvas C){ return true;
local int i; return false;
local NicePack niceMutator; }
local NiceHumanPawn nicePawn; function PostRender(Canvas C){
local class<NiceVeterancyTypes> niceVet; local int i;
local MeanReplicationInfo szRI; local NicePack niceMutator;
local NiceWeapon niceWeap; local NiceHumanPawn nicePawn;
local NicePlayerController nicePlayer; local class<NiceVeterancyTypes> niceVet;
local ScrnHUD scrnHUDInstance; local MeanReplicationInfo szRI;
local Texture barTexture; local NiceWeapon niceWeap;
local int x, y, center, barWidth, offset; local NicePlayerController nicePlayer;
local int missesWidth, missesHeight, missesSpace; local ScrnHUD scrnHUDInstance;
local int missesX, missesY; local Texture barTexture;
if(C == none) return; local int x, y, center, barWidth, offset;
if(C.ViewPort == none) return; local int missesWidth, missesHeight, missesSpace;
if(C.ViewPort.Actor == none) return; local int missesX, missesY;
if(C.ViewPort.Actor.Pawn == none) return; if(C == none) return;
nicePlayer = NicePlayerController(C.ViewPort.Actor.Pawn.Controller); if(C.ViewPort == none) return;
niceWeap = NiceWeapon(C.ViewPort.Actor.Pawn.Weapon); if(C.ViewPort.Actor == none) return;
if(nicePlayer == none) return; if(C.ViewPort.Actor.Pawn == none) return;
scrnHUDInstance = ScrnHUD(nicePlayer.myHUD); nicePlayer = NicePlayerController(C.ViewPort.Actor.Pawn.Controller);
//// Draw bleed and poison icons niceWeap = NiceWeapon(C.ViewPort.Actor.Pawn.Weapon);
C.SetDrawColor(255, 255, 255); if(nicePlayer == none)
szRI = class'MeanReplicationInfo'.static.findSZri(ViewportOwner.Actor.PlayerReplicationInfo); return;
offset = 4; scrnHUDInstance = ScrnHUD(nicePlayer.myHUD);
if(szRI != none){ if(szRI.isBleeding){ x = C.ClipX * 0.007; y = C.ClipY * 0.93 - size * offset; C.SetPos(x, y); C.DrawTile(bleedIcon, size, size, 0, 0, bleedIcon.MaterialUSize(), bleedIcon.MaterialVSize()); } offset++; if(isPoisoned(ScrnHumanPawn(C.ViewPort.Actor.Pawn))){ x = C.ClipX * 0.007; y = C.ClipY * 0.93 - size * offset; C.SetPos(x, y); C.DrawTile(poisonIcon, size, size, 0, 0, poisonIcon.MaterialUSize(), poisonIcon.MaterialVSize()); } //// Draw bleed and poison icons
} C.SetDrawColor(255, 255, 255);
if(niceWeap != none && niceWeap.bShowSecondaryCharge && scrnHUDInstance != none){ C.ColorModulate.X = 1; C.ColorModulate.Y = 1; C.ColorModulate.Z = 1; C.ColorModulate.W = scrnHUDInstance.HudOpacity / 255; if(!scrnHUDInstance.bLightHud) scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsBG); scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsIcon); scrnHUDInstance.SecondaryClipsDigits.value = niceWeap.secondaryCharge; scrnHUDInstance.DrawNumericWidget(C, scrnHUDInstance.SecondaryClipsDigits, scrnHUDInstance.DigitsSmall); szRI = class'MeanReplicationInfo'.static.findSZri(ViewportOwner.Actor.PlayerReplicationInfo);
} offset = 4;
niceMutator = class'NicePack'.static.Myself(C.ViewPort.Actor.Pawn.Level); if(szRI != none){
if(niceMutator == none) return; if(szRI.isBleeding){
//// Draw counters x = C.ClipX * 0.007;
if(nicePlayer != none && nicePlayer.bFlagDisplayCounters){ x = C.ClipX * 0.5 - (64 + 2) * niceMutator.GetVisibleCountersAmount(); y = C.ClipY * 0.01; for(i = 0;i < niceMutator.niceCounterSet.Length;i ++) if(niceMutator.niceCounterSet[i].value != 0 || niceMutator.niceCounterSet[i].bShowZeroValue){ DrawCounter(C, niceMutator.niceCounterSet[i], x, y, C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team); x += 128 + 4; } y = C.ClipY * 0.93 - size * offset;
} C.SetPos(x, y);
//// Draw weapons progress bars C.DrawTile(bleedIcon, size, size, 0, 0, bleedIcon.MaterialUSize(), bleedIcon.MaterialVSize());
if(nicePlayer != none && nicePlayer.bFlagDisplayWeaponProgress){ x = C.ClipX - InventoryBoxWidth * C.ClipX - 5; y = C.ClipY * 0.5 - 0.5 * (InventoryBoxHeight * C.ClipX + 4) * niceMutator.niceWeapProgressSet.Length; for(i = 0;i < niceMutator.niceWeapProgressSet.Length;i ++){ DrawWeaponProgress(C, niceMutator.niceWeapProgressSet[i], x, y, C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team); y += (InventoryBoxHeight * C.ClipX + 4); } }
} offset++;
//// Draw invincibility bar if(isPoisoned(ScrnHumanPawn(C.ViewPort.Actor.Pawn))){
nicePawn = NiceHumanPawn(nicePlayer.pawn); x = C.ClipX * 0.007;
if(nicePawn != none && nicePawn.invincibilityTimer != 0.0){ C.SetDrawColor(255, 255, 255); if(nicePawn.invincibilityTimer > 0) barTexture = greenBar; else barTexture = redBar; center = C.ClipX * 0.5; y = C.ClipY * 0.75; barWidth = C.ClipX * 0.2; niceVet = class'NiceVeterancyTypes'.static. GetVeterancy(nicePawn.PlayerReplicationInfo); if(niceVet != none){ if(nicePawn.invincibilityTimer > 0){ barWidth *= nicePawn.invincibilityTimer / niceVet.static.GetInvincibilityDuration(nicePawn.KFPRI); } else{ barWidth *= nicePawn.invincibilityTimer / class'NiceSkillZerkGunzerker'.default.cooldown; } } else barWidth = 0; x = center - (barWidth / 2); C.SetPos(x, y); C.DrawTile(barTexture, barWidth, 32, 0, 0, barTexture.MaterialUSize(), barTexture.MaterialVSize()); if(nicePawn.safeMeleeMisses <= 0) return; missesSpace = 10;//64x64 => 16x16 missesHeight = 16; missesWidth = nicePawn.safeMeleeMisses * 16 + (nicePawn.safeMeleeMisses - 1) * missesSpace; missesX = center - (missesWidth / 2); missesY = y + (32 - missesHeight) * 0.5; for(i = 0;i < nicePawn.safeMeleeMisses;i ++){ C.SetPos(missesX + i * (16 + missesSpace), missesY); C.DrawTile(shield, 16, 16, 0, 0, shield.MaterialUSize(), shield.MaterialVSize()); } y = C.ClipY * 0.93 - size * offset;
} C.SetPos(x, y);
// Draw cooldowns C.DrawTile(poisonIcon, size, size, 0, 0, poisonIcon.MaterialUSize(), poisonIcon.MaterialVSize());
if(nicePlayer.abilityManager == none) return; }
for(i = 0;i < nicePlayer.abilityManager.currentAbilitiesAmount;i ++) DrawAbilityCooldown(C, i); }
} if(niceWeap != none && niceWeap.bShowSecondaryCharge && scrnHUDInstance != none){
function DrawCounter(Canvas C, NicePack.CounterDisplay counter, int x, int y, TeamInfo team){ C.ColorModulate.X = 1;
local float borderSpace; C.ColorModulate.Y = 1;
local Texture textureToDraw; C.ColorModulate.Z = 1;
local float textWidth, textHeight; C.ColorModulate.W = scrnHUDInstance.HudOpacity / 255;
local string textToDraw; if(!scrnHUDInstance.bLightHud)
// Some per-defined values for drawing scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsBG);
local int iconSize, backgroundWidth, backgroundHeight; scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsIcon);
// Fill some constants that will dictate how to display counter scrnHUDInstance.SecondaryClipsDigits.value = niceWeap.secondaryCharge;
iconSize = 64; scrnHUDInstance.DrawNumericWidget(C, scrnHUDInstance.SecondaryClipsDigits, scrnHUDInstance.DigitsSmall);
backgroundWidth = 128; }
backgroundHeight = 64; niceMutator = class'NicePack'.static.Myself(C.ViewPort.Actor.Pawn.Level);
borderSpace = 8; if(niceMutator == none)
// Reset color return;
if(team.teamIndex == 0) C.SetDrawColor(255, 64, 64); //// Draw counters
else C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B); if(nicePlayer != none && nicePlayer.bFlagDisplayCounters){
// Draw background x = C.ClipX * 0.5 - (64 + 2) * niceMutator.GetVisibleCountersAmount();
C.SetPos(x, y); y = C.ClipY * 0.01;
textureToDraw = Texture(class'HUDKillingFloor'.default.HealthBG.WidgetTexture); for(i = 0;i < niceMutator.niceCounterSet.Length;i ++)
C.DrawTile(textureToDraw, 128, 64, 0, 0, textureToDraw.MaterialUSize(), textureToDraw.MaterialVSize()); if(niceMutator.niceCounterSet[i].value != 0 || niceMutator.niceCounterSet[i].bShowZeroValue){
// Draw appropriate icon DrawCounter(C, niceMutator.niceCounterSet[i], x, y, C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team);
C.SetPos(x + borderSpace, y + borderSpace); x += 128 + 4;
textureToDraw = counter.icon; }
C.DrawTile(textureToDraw, 64 - 2*borderSpace, 64 - 2 * borderSpace, 0, 0, textureToDraw.MaterialUSize(), textureToDraw.MaterialVSize()); }
// Draw numbers //// Draw weapons progress bars
textToDraw = string(counter.value); if(nicePlayer != none && nicePlayer.bFlagDisplayWeaponProgress){
C.Font = class'ROHUD'.Static.LoadSmallFontStatic(1); x = C.ClipX - InventoryBoxWidth * C.ClipX - 5;
C.TextSize(textToDraw, textWidth, textHeight); y = C.ClipY * 0.5 - 0.5 * (InventoryBoxHeight * C.ClipX + 4) * niceMutator.niceWeapProgressSet.Length;
C.SetPos(x + iconSize + (backgroundWidth - iconSize - textWidth) / 2, y + (backgroundHeight - textHeight) / 2 + 2); for(i = 0;i < niceMutator.niceWeapProgressSet.Length;i ++){
C.DrawText(textToDraw); DrawWeaponProgress(C, niceMutator.niceWeapProgressSet[i], x, y,
} C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team);
function DrawAbilityCooldown(Canvas C, int abilityIndex){ y += (InventoryBoxHeight * C.ClipX + 4);
local Texture skillTexture, backgroundTexture; }
local NiceHumanPawn nicePawn; }
local NicePlayerController nicePlayer; //// Draw invincibility bar
local class<NiceVeterancyTypes> niceVet; nicePawn = NiceHumanPawn(nicePlayer.pawn);
local int x, y; if(nicePawn != none && nicePawn.invincibilityTimer != 0.0){
local string textToDraw; C.SetDrawColor(255, 255, 255);
local float textWidth, textHeight; if(nicePawn.invincibilityTimer > 0)
local NiceAbilityManager.EAbilityState abilityState; barTexture = greenBar;
if(C == none) return; else
if(C.ViewPort == none) return; barTexture = redBar;
if(C.ViewPort.Actor == none) return; center = C.ClipX * 0.5;
nicePawn = NiceHumanPawn(C.ViewPort.Actor.Pawn); y = C.ClipY * 0.75;
nicePlayer = NicePlayerController(C.ViewPort.Actor.Pawn.Controller); barWidth = C.ClipX * 0.2;
if(nicePawn == none) return; niceVet = class'NiceVeterancyTypes'.static.
if(nicePlayer == none || nicePlayer.abilityManager == none) return; GetVeterancy(nicePawn.PlayerReplicationInfo);
niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(nicePawn.KFPRI); if(niceVet != none){
skillTexture = nicePlayer.abilityManager.currentAbilities[abilityIndex]. description.icon; if(nicePawn.invincibilityTimer > 0){
if(skillTexture == none) return; barWidth *= nicePawn.invincibilityTimer
// Set stuff up / niceVet.static.GetInvincibilityDuration(nicePawn.KFPRI);
x = C.ClipX * 0.265; }
x += abilityIndex * (10 + 64); else{
y = C.ClipY * 0.93; barWidth *= nicePawn.invincibilityTimer /
textToDraw = string(int(Ceil(nicePlayer.abilityManager.currentAbilities[abilityIndex].cooldown))); class'NiceSkillZerkGunzerker'.default.cooldown;
backgroundTexture = Texture'KillingFloorHUD.HUD.Hud_Box_128x64'; }
// Reset color }
C.SetDrawColor(255, 64, 64); else
// Draw background barWidth = 0;
C.SetPos(x, y); x = center - (barWidth / 2);
C.DrawTile(backgroundTexture, 64, 64, 0, 0, backgroundTexture.MaterialUSize(), backgroundTexture.MaterialVSize()); C.SetPos(x, y);
C.SetPos(x, y); C.DrawTile(barTexture, barWidth, 32, 0, 0, barTexture.MaterialUSize(), barTexture.MaterialVSize());
C.DrawTile(skillTexture, 64, 64, 0, 0, skillTexture.MaterialUSize(), skillTexture.MaterialVSize()); if(nicePawn.safeMeleeMisses <= 0)
// Draw additional background return;
abilityState = nicePlayer.abilityManager.currentAbilities[abilityIndex].myState; missesSpace = 10;//64x64 => 16x16
if(abilityState == ASTATE_ACTIVE) C.SetDrawColor(255, 0, 0, 128); missesHeight = 16;
if(abilityState == ASTATE_COOLDOWN) C.SetDrawColor(0, 0, 0, 192); missesWidth = nicePawn.safeMeleeMisses * 16
if(abilityState != ASTATE_READY){ C.SetPos(x, y); C.DrawTileStretched(Material'KillingFloorHUD.HUD.WhiteTexture', 64, 64); + (nicePawn.safeMeleeMisses - 1) * missesSpace;
} missesX = center - (missesWidth / 2);
// Draw cooldown stuff missesY = y + (32 - missesHeight) * 0.5;
if(abilityState == ASTATE_COOLDOWN){ C.SetDrawColor(255, 192, 192); C.Font = class'ROHUD'.static.LoadSmallFontStatic(1); C.TextSize(textToDraw, textWidth, textHeight); C.SetPos(x, y); C.SetPos(x + (64 - textWidth) / 2, y + (64 - textHeight) / 2 + 2); C.DrawText(textToDraw); for(i = 0;i < nicePawn.safeMeleeMisses;i ++){
} C.SetPos(missesX + i * (16 + missesSpace), missesY);
// Draw calibration GUI C.DrawTile(shield, 16, 16, 0, 0, shield.MaterialUSize(), shield.MaterialVSize());
DrawCalibrationStars(C); }
} }
function DrawCalibrationStars(Canvas C){ // Draw cooldowns
local Texture starTexture; if(nicePlayer.abilityManager == none)
local int x, y, i; return;
local int starsAmount; for(i = 0;i < nicePlayer.abilityManager.currentAbilitiesAmount;i ++)
local NiceHumanPawn nicePawn; DrawAbilityCooldown(C, i);
local NicePlayerController nicePlayer; }
if(C == none) return; function DrawCounter(Canvas C, NicePack.CounterDisplay counter, int x, int y, TeamInfo team){
if(C.ViewPort == none) return; local float borderSpace;
if(C.ViewPort.Actor == none) return; local Texture textureToDraw;
nicePawn = NiceHumanPawn(C.ViewPort.Actor.Pawn); local float textWidth, textHeight;
if(nicePawn == none) return; local string textToDraw;
if(nicePawn.currentCalibrationState == CALSTATE_NOABILITY) return; // Some per-defined values for drawing
nicePlayer = NicePlayerController(nicePawn.controller); local int iconSize, backgroundWidth, backgroundHeight;
if(nicePlayer == none) return; // Fill some constants that will dictate how to display counter
starsAmount = nicePawn.calibrationScore; iconSize = 64;
x = C.ClipX * 0.5; backgroundWidth = 128;
x -= 0.5 * (starsAmount * 32 + (starsAmount - 1) * 16); backgroundHeight = 64;
if(nicePawn.currentCalibrationState == CALSTATE_ACTIVE) y = C.ClipY * 0.6; borderSpace = 8;
else y = C.ClipY * 0.02; // Reset color
starTexture = Texture'KillingFloorHUD.HUD.Hud_Perk_Star'; if(team.teamIndex == 0)
for(i = 0;i < starsAmount;i ++){ C.SetPos(x, y); C.SetDrawColor(255, 255, 255); C.DrawTile(starTexture, 32, 32, 0, 0, starTexture.MaterialUSize(), starTexture.MaterialVSize()); x += 32 + 16; C.SetDrawColor(255, 64, 64);
} else
} C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B);
function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgress, int x, int y, TeamInfo team){ // Draw background
local float textWidth, textHeight; C.SetPos(x, y);
local string textToDraw; textureToDraw = Texture(class'HUDKillingFloor'.default.HealthBG.WidgetTexture);
local float TempWidth, TempHeight, TempBorder; C.DrawTile(textureToDraw, 128, 64, 0, 0, textureToDraw.MaterialUSize(), textureToDraw.MaterialVSize());
TempWidth = InventoryBoxWidth * C.ClipX; // Draw appropriate icon
TempHeight = InventoryBoxHeight * C.ClipX; C.SetPos(x + borderSpace, y + borderSpace);
TempBorder = BorderSize * C.ClipX; textureToDraw = counter.icon;
// Draw background bar C.DrawTile(textureToDraw, 64 - 2*borderSpace, 64 - 2 * borderSpace, 0, 0,
if(team.teamIndex == 0) C.SetDrawColor(255, 64, 64, 64); textureToDraw.MaterialUSize(), textureToDraw.MaterialVSize());
else C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B, 64); // Draw numbers
C.SetPos(x, y); textToDraw = string(counter.value);
C.DrawTile(Texture'Engine.WhiteSquareTexture', TempWidth * weapProgress.progress, TempHeight, 0, 0, 2, 2); C.Font = class'ROHUD'.Static.LoadSmallFontStatic(1);
// Draw this item's Background C.TextSize(textToDraw, textWidth, textHeight);
if(team.teamIndex == 0) C.SetDrawColor(255, 64, 64); C.SetPos(x + iconSize + (backgroundWidth - iconSize - textWidth) / 2, y + (backgroundHeight - textHeight) / 2 + 2);
else C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B); C.DrawText(textToDraw);
C.SetPos(x, y); }
C.DrawTileStretched(Texture'KillingFloorHUD.HUD.HUD_Rectangel_W_Stroke', TempWidth, TempHeight); function DrawAbilityCooldown(Canvas C, int abilityIndex){
// Draw the Weapon's Icon over the Background local Texture skillTexture, backgroundTexture;
C.SetDrawColor(255, 255, 255); local NiceHumanPawn nicePawn;
C.SetPos(x + TempBorder, y + TempBorder); local NicePlayerController nicePlayer;
if(weapProgress.weapClass.default.HudImage != none) C.DrawTile(weapProgress.weapClass.default.HudImage, TempWidth - (2.0 * TempBorder), TempHeight - (2.0 * TempBorder), 0, 0, 256, 192); local class<NiceVeterancyTypes> niceVet;
// Draw counter, if needed local int x, y;
if(team.teamIndex == 0) C.SetDrawColor(255, 64, 64); local string textToDraw;
else C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B); local float textWidth, textHeight;
if(weapProgress.bShowCounter){ textToDraw = string(weapProgress.counter); C.Font = class'ROHUD'.Static.LoadSmallFontStatic(5); C.TextSize(textToDraw, textWidth, textHeight); C.SetPos(x + TempWidth - TempBorder - textWidth, y + TempHeight - TempBorder - textHeight + 2); C.DrawText(textToDraw); local NiceAbilityManager.EAbilityState abilityState;
} if(C == none) return;
} if(C.ViewPort == none) return;
function bool KeyEvent(EInputKey Key, EInputAction Action, float Delta){ if(C.ViewPort.Actor == none) return;
local bool bNeedsReload; nicePawn = NiceHumanPawn(C.ViewPort.Actor.Pawn);
local string Alias, LeftPart, RigthPart; nicePlayer = NicePlayerController(C.ViewPort.Actor.Pawn.Controller);
local NiceWeapon niceWeap; if(nicePawn == none)
local NicePlayerController nicePlayer; return;
// Find controller and current weapon if(nicePlayer == none || nicePlayer.abilityManager == none)
nicePlayer = NicePlayerController(ViewportOwner.Actor); return;
if(nicePlayer == none) return false; niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(nicePawn.KFPRI);
if(nicePlayer.Pawn != none) niceWeap = NiceWeapon(nicePlayer.Pawn.Weapon); skillTexture =
// If this is a button press - detect alias nicePlayer.abilityManager.currentAbilities[abilityIndex].
if(Action == IST_Press){ // Check for reload command Alias = nicePlayer.ConsoleCommand("KEYBINDING" @ nicePlayer.ConsoleCommand("KEYNAME" @ Key)); if(nicePlayer.bAdvReloadCheck) bNeedsReload = InStr(Caps(Alias), "RELOADMENOW") > -1 || InStr(Caps(Alias), "RELOADWEAPON") > -1; if(Divide(Alias, " ", LeftPart, RigthPart)) Alias = LeftPart; if(Key == IK_MouseWheelUp || Key == IK_MouseWheelDown){ nicePlayer.UpdateSelectors(); if(nicePlayer.hasZeroSelector && nicePlayer.bUsesMouseWheel && nicePlayer.bNiceWeaponManagement){ nicePlayer.ScrollSelector(0, nicePlayer.bMouseWheelLoops, Key == IK_MouseWheelUp); return true; } } description.icon;
} if(skillTexture == none)
// Open trader on movement return;
if(Alias ~= "MoveForward" || Alias ~= "MoveBackward" || Alias ~= "TurnLeft" || Alias ~= "TurnRight" || Alias ~= "StrafeLeft" || Alias ~= "StrafeRight" || Alias ~= "Axis"){ // Set stuff up
// Open trader if it's a pre-game if(NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader && (NicePackMutator.bStillDuringInitTrader || !nicePlayer.bOpenedInitTrader) && nicePlayer.Pawn != none){ nicePlayer.ShowBuyMenu("Initial trader", KFHumanPawn(nicePlayer.Pawn).MaxCarryWeight); nicePlayer.bOpenedInitTrader = true; return true; } //nicePlayer.ClientOpenMenu("NicePack.NiceGUIBuyMenu",,"Test stuff",string(15)); x = C.ClipX * 0.265;
} x += abilityIndex * (10 + 64);
// Reload if we've detected a reload alias in this button's command y = C.ClipY * 0.93;
if(niceWeap != none && !nicePlayer.bUseServerReload && (bNeedsReload || Alias ~= "ReloadMeNow" || Alias ~= "ReloadWeapon")) niceWeap.ClientReloadMeNow(); textToDraw = string(int(Ceil(nicePlayer.abilityManager.currentAbilities[abilityIndex].cooldown)));
return false; backgroundTexture = Texture'KillingFloorHUD.HUD.Hud_Box_128x64';
} // Reset color
defaultproperties C.SetDrawColor(255, 64, 64);
{ bleedIcon=Texture'NicePackT.MeanZeds.bleedIcon' poisonIcon=Texture'NicePackT.MeanZeds.poisonIcon' greenBar=Texture'KFStoryGame_Tex.HUD.Batter_Fill' redBar=Texture'KFStoryGame_Tex.HUD.BarFill_Red' Shield=Texture'KillingFloorHUD.HUD.Hud_Shield' Size=75.599998 InventoryBoxWidth=0.100000 InventoryBoxHeight=0.075000 BorderSize=0.005000 bVisible=True // Draw background
} C.SetPos(x, y);
C.DrawTile(backgroundTexture, 64, 64, 0, 0, backgroundTexture.MaterialUSize(), backgroundTexture.MaterialVSize());
C.SetPos(x, y);
C.DrawTile(skillTexture, 64, 64, 0, 0, skillTexture.MaterialUSize(), skillTexture.MaterialVSize());
// Draw additional background
abilityState =
nicePlayer.abilityManager.currentAbilities[abilityIndex].myState;
if(abilityState == ASTATE_ACTIVE)
C.SetDrawColor(255, 0, 0, 128);
if(abilityState == ASTATE_COOLDOWN)
C.SetDrawColor(0, 0, 0, 192);
if(abilityState != ASTATE_READY){
C.SetPos(x, y);
C.DrawTileStretched(Material'KillingFloorHUD.HUD.WhiteTexture', 64, 64);
}
// Draw cooldown stuff
if(abilityState == ASTATE_COOLDOWN){
C.SetDrawColor(255, 192, 192);
C.Font = class'ROHUD'.static.LoadSmallFontStatic(1);
C.TextSize(textToDraw, textWidth, textHeight);
C.SetPos(x, y);
C.SetPos(x + (64 - textWidth) / 2, y + (64 - textHeight) / 2 + 2);
C.DrawText(textToDraw);
}
// Draw calibration GUI
DrawCalibrationStars(C);
}
function DrawCalibrationStars(Canvas C){
local Texture starTexture;
local int x, y, i;
local int starsAmount;
local NiceHumanPawn nicePawn;
local NicePlayerController nicePlayer;
if(C == none) return;
if(C.ViewPort == none) return;
if(C.ViewPort.Actor == none) return;
nicePawn = NiceHumanPawn(C.ViewPort.Actor.Pawn);
if(nicePawn == none)
return;
if(nicePawn.currentCalibrationState == CALSTATE_NOABILITY)
return;
nicePlayer = NicePlayerController(nicePawn.controller);
if(nicePlayer == none)
return;
starsAmount = nicePawn.calibrationScore;
x = C.ClipX * 0.5;
x -= 0.5 * (starsAmount * 32 + (starsAmount - 1) * 16);
if(nicePawn.currentCalibrationState == CALSTATE_ACTIVE)
y = C.ClipY * 0.6;
else
y = C.ClipY * 0.02;
starTexture = Texture'KillingFloorHUD.HUD.Hud_Perk_Star';
for(i = 0;i < starsAmount;i ++){
C.SetPos(x, y);
C.SetDrawColor(255, 255, 255);
C.DrawTile(starTexture, 32, 32, 0, 0, starTexture.MaterialUSize(), starTexture.MaterialVSize());
x += 32 + 16;
}
}
function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgress, int x, int y, TeamInfo team){
local float textWidth, textHeight;
local string textToDraw;
local float TempWidth, TempHeight, TempBorder;
TempWidth = InventoryBoxWidth * C.ClipX;
TempHeight = InventoryBoxHeight * C.ClipX;
TempBorder = BorderSize * C.ClipX;
// Draw background bar
if(team.teamIndex == 0)
C.SetDrawColor(255, 64, 64, 64);
else
C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B, 64);
C.SetPos(x, y);
C.DrawTile(Texture'Engine.WhiteSquareTexture', TempWidth * weapProgress.progress, TempHeight, 0, 0, 2, 2);
// Draw this item's Background
if(team.teamIndex == 0)
C.SetDrawColor(255, 64, 64);
else
C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B);
C.SetPos(x, y);
C.DrawTileStretched(Texture'KillingFloorHUD.HUD.HUD_Rectangel_W_Stroke', TempWidth, TempHeight);
// Draw the Weapon's Icon over the Background
C.SetDrawColor(255, 255, 255);
C.SetPos(x + TempBorder, y + TempBorder);
if(weapProgress.weapClass.default.HudImage != none)
C.DrawTile(weapProgress.weapClass.default.HudImage,
TempWidth - (2.0 * TempBorder), TempHeight - (2.0 * TempBorder), 0, 0, 256, 192);
// Draw counter, if needed
if(team.teamIndex == 0)
C.SetDrawColor(255, 64, 64);
else
C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B);
if(weapProgress.bShowCounter){
textToDraw = string(weapProgress.counter);
C.Font = class'ROHUD'.Static.LoadSmallFontStatic(5);
C.TextSize(textToDraw, textWidth, textHeight);
C.SetPos(x + TempWidth - TempBorder - textWidth, y + TempHeight - TempBorder - textHeight + 2);
C.DrawText(textToDraw);
}
}
function bool KeyEvent(EInputKey Key, EInputAction Action, float Delta){
local bool bNeedsReload;
local string Alias, LeftPart, RigthPart;
local NiceWeapon niceWeap;
local NicePlayerController nicePlayer;
// Find controller and current weapon
nicePlayer = NicePlayerController(ViewportOwner.Actor);
if(nicePlayer == none)
return false;
if(nicePlayer.Pawn != none)
niceWeap = NiceWeapon(nicePlayer.Pawn.Weapon);
// If this is a button press - detect alias
if(Action == IST_Press){
// Check for reload command
Alias = nicePlayer.ConsoleCommand("KEYBINDING" @ nicePlayer.ConsoleCommand("KEYNAME" @ Key));
if(nicePlayer.bAdvReloadCheck)
bNeedsReload = InStr(Caps(Alias), "RELOADMENOW") > -1 || InStr(Caps(Alias), "RELOADWEAPON") > -1;
if(Divide(Alias, " ", LeftPart, RigthPart))
Alias = LeftPart;
if(Key == IK_MouseWheelUp || Key == IK_MouseWheelDown){
nicePlayer.UpdateSelectors();
if(nicePlayer.hasZeroSelector && nicePlayer.bUsesMouseWheel && nicePlayer.bNiceWeaponManagement){
nicePlayer.ScrollSelector(0, nicePlayer.bMouseWheelLoops, Key == IK_MouseWheelUp);
return true;
}
}
}
// Open trader on movement
if(Alias ~= "MoveForward" || Alias ~= "MoveBackward" || Alias ~= "TurnLeft" || Alias ~= "TurnRight"
|| Alias ~= "StrafeLeft" || Alias ~= "StrafeRight" || Alias ~= "Axis"){
// Open trader if it's a pre-game
if(NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader && (NicePackMutator.bStillDuringInitTrader || !nicePlayer.bOpenedInitTrader) && nicePlayer.Pawn != none){
nicePlayer.ShowBuyMenu("Initial trader", KFHumanPawn(nicePlayer.Pawn).MaxCarryWeight);
nicePlayer.bOpenedInitTrader = true;
return true;
}
//nicePlayer.ClientOpenMenu("NicePack.NiceGUIBuyMenu",,"Test stuff",string(15));
}
// Reload if we've detected a reload alias in this button's command
if(niceWeap != none && !nicePlayer.bUseServerReload &&
(bNeedsReload || Alias ~= "ReloadMeNow" || Alias ~= "ReloadWeapon"))
niceWeap.ClientReloadMeNow();
return false;
}
defaultproperties
{
bleedIcon=Texture'NicePackT.MeanZeds.bleedIcon'
poisonIcon=Texture'NicePackT.MeanZeds.poisonIcon'
greenBar=Texture'KFStoryGame_Tex.HUD.Batter_Fill'
redBar=Texture'KFStoryGame_Tex.HUD.BarFill_Red'
Shield=Texture'KillingFloorHUD.HUD.Hud_Shield'
Size=75.599998
InventoryBoxWidth=0.100000
InventoryBoxHeight=0.075000
BorderSize=0.005000
bVisible=True
}

View File

@ -1,54 +1,72 @@
class NiceInvasionLoginMenu extends ScrnInvasionLoginMenu; class NiceInvasionLoginMenu extends ScrnInvasionLoginMenu;
var bool bShowScrnMenu; var bool bShowScrnMenu;
// copy-pasted from ScrnInvasionLoginMenu to change change remove news tab and add skills tab // copy-pasted from ScrnInvasionLoginMenu to change change remove news tab and add skills tab
function InitComponent(GUIController MyController, GUIComponent MyOwner){ function InitComponent(GUIController MyController, GUIComponent MyOwner){
local int i; local int i;
local string s; local string s;
local eFontScale FS; local eFontScale FS;
local SRMenuAddition M; local SRMenuAddition M;
local int indexAfterScrn; local int indexAfterScrn;
// Setup panel classes. // Setup panel classes.
Panels[0].ClassName = string(Class'ScrnBalanceSrv.ScrnTab_MidGamePerks'); Panels[0].ClassName = string(Class'ScrnBalanceSrv.ScrnTab_MidGamePerks');
Panels[1].ClassName = string(Class'NicePack.NicePanelSkills'); Panels[1].ClassName = string(Class'NicePack.NicePanelSkills');
Panels[2].ClassName = string(Class'SRTab_MidGameVoiceChat'); Panels[2].ClassName = string(Class'SRTab_MidGameVoiceChat');
Panels[3].ClassName = string(Class'SRTab_MidGameStats'); Panels[3].ClassName = string(Class'SRTab_MidGameStats');
Panels[0].Caption = Class'KFInvasionLoginMenu'.Default.Panels[1].Caption; Panels[0].Caption = Class'KFInvasionLoginMenu'.Default.Panels[1].Caption;
Panels[1].Caption = "Skills"; Panels[1].Caption = "Skills";
Panels[2].Caption = Class'KFInvasionLoginMenu'.Default.Panels[2].Caption; Panels[2].Caption = Class'KFInvasionLoginMenu'.Default.Panels[2].Caption;
Panels[0].Hint = Class'KFInvasionLoginMenu'.Default.Panels[1].Hint; Panels[0].Hint = Class'KFInvasionLoginMenu'.Default.Panels[1].Hint;
Panels[1].Hint = "Customize your perk"; Panels[1].Hint = "Customize your perk";
Panels[2].Hint = Class'KFInvasionLoginMenu'.Default.Panels[2].Hint; Panels[2].Hint = Class'KFInvasionLoginMenu'.Default.Panels[2].Hint;
b_Spec.Caption=class'KFTab_MidGamePerks'.default.b_Spec.Caption; b_Spec.Caption=class'KFTab_MidGamePerks'.default.b_Spec.Caption;
b_MatchSetup.Caption=class'KFTab_MidGamePerks'.default.b_MatchSetup.Caption; b_MatchSetup.Caption=class'KFTab_MidGamePerks'.default.b_MatchSetup.Caption;
b_KickVote.Caption=class'KFTab_MidGamePerks'.default.b_KickVote.Caption; b_KickVote.Caption=class'KFTab_MidGamePerks'.default.b_KickVote.Caption;
b_MapVote.Caption=class'KFTab_MidGamePerks'.default.b_MapVote.Caption; b_MapVote.Caption=class'KFTab_MidGamePerks'.default.b_MapVote.Caption;
b_Quit.Caption=class'KFTab_MidGamePerks'.default.b_Quit.Caption; b_Quit.Caption=class'KFTab_MidGamePerks'.default.b_Quit.Caption;
b_Favs.Caption=class'KFTab_MidGamePerks'.default.b_Favs.Caption; b_Favs.Caption=class'KFTab_MidGamePerks'.default.b_Favs.Caption;
b_Favs.Hint=class'KFTab_MidGamePerks'.default.b_Favs.Hint; b_Favs.Hint=class'KFTab_MidGamePerks'.default.b_Favs.Hint;
b_Settings.Caption=class'KFTab_MidGamePerks'.default.b_Settings.Caption; b_Settings.Caption=class'KFTab_MidGamePerks'.default.b_Settings.Caption;
b_Browser.Caption=class'KFTab_MidGamePerks'.default.b_Browser.Caption; b_Browser.Caption=class'KFTab_MidGamePerks'.default.b_Browser.Caption;
// Other panels // Other panels
Panels[4].ClassName = "ScrnBalanceSrv.ScrnTab_Achievements"; Panels[4].ClassName = "ScrnBalanceSrv.ScrnTab_Achievements";
Panels[4].Caption = "Achievements"; Panels[4].Caption = "Achievements";
Panels[4].Hint = "ScrN server-side achievements"; Panels[4].Hint = "ScrN server-side achievements";
if(default.bShowScrnMenu){ Panels[5].ClassName = "ScrnBalanceSrv.ScrnTab_UserSettings"; Panels[5].Caption = "ScrN Features"; Panels[5].Hint = "ScrN Balance features, settings and info"; indexAfterScrn = 6; if(default.bShowScrnMenu){
} Panels[5].ClassName = "ScrnBalanceSrv.ScrnTab_UserSettings";
else indexAfterScrn = 5; Panels[5].Caption = "ScrN Features";
Panels[indexAfterScrn].ClassName = "NicePack.NiceGUISettings"; Panels[5].Hint = "ScrN Balance features, settings and info";
Panels[indexAfterScrn].Caption = "Nice settings"; indexAfterScrn = 6;
Panels[indexAfterScrn].Hint = "Settings specific to NicePack mutator"; }
Panels.Length = indexAfterScrn + 1; else
Super(UT2K4PlayerLoginMenu).InitComponent(MyController, MyOwner); indexAfterScrn = 5;
// Mod menus Panels[indexAfterScrn].ClassName = "NicePack.NiceGUISettings";
foreach MyController.ViewportOwner.Actor.DynamicActors(class'SRMenuAddition',M) if( M.bHasInit ) { AddOnList[AddOnList.Length] = M; M.NotifyMenuOpen(Self,MyController); } Panels[indexAfterScrn].Caption = "Nice settings";
s = GetSizingCaption(); Panels[indexAfterScrn].Hint = "Settings specific to NicePack mutator";
for ( i = 0; i < Controls.Length; i++ ) Panels.Length = indexAfterScrn + 1;
{ if (GUIButton(Controls[i]) != none) { GUIButton(Controls[i]).bAutoSize = true; GUIButton(Controls[i]).SizingCaption = s; GUIButton(Controls[i]).AutoSizePadding.HorzPerc = 0.04; GUIButton(Controls[i]).AutoSizePadding.VertPerc = 0.5; } Super(UT2K4PlayerLoginMenu).InitComponent(MyController, MyOwner);
} // Mod menus
s = class'KFTab_MidGamePerks'.default.PlayerStyleName; foreach MyController.ViewportOwner.Actor.DynamicActors(class'SRMenuAddition',M)
PlayerStyle = MyController.GetStyle(s, fs); if( M.bHasInit )
InitGRI(); {
} AddOnList[AddOnList.Length] = M;
defaultproperties M.NotifyMenuOpen(Self,MyController);
{ }
}
s = GetSizingCaption();
for ( i = 0; i < Controls.Length; i++ )
{
if (GUIButton(Controls[i]) != none)
{
GUIButton(Controls[i]).bAutoSize = true;
GUIButton(Controls[i]).SizingCaption = s;
GUIButton(Controls[i]).AutoSizePadding.HorzPerc = 0.04;
GUIButton(Controls[i]).AutoSizePadding.VertPerc = 0.5;
}
}
s = class'KFTab_MidGamePerks'.default.PlayerStyleName;
PlayerStyle = MyController.GetStyle(s, fs);
InitGRI();
}
defaultproperties
{
}

View File

@ -1,14 +1,23 @@
class NiceLobbyFooter extends ScrnLobbyFooter; class NiceLobbyFooter extends ScrnLobbyFooter;
function bool OnFooterClick(GUIComponent Sender) function bool OnFooterClick(GUIComponent Sender)
{ {
if (Sender == b_Perks){ PlayerOwner().ClientOpenMenu(string(Class'NicePack.NiceInvasionLoginMenu'), false); return false; if (Sender == b_Perks){
} PlayerOwner().ClientOpenMenu(string(Class'NicePack.NiceInvasionLoginMenu'), false);
else if(Sender == b_ViewMap){ if(KF_StoryGRI(PlayerOwner().Level.GRI) == none){ LobbyMenu(PageOwner).bAllowClose = true; PlayerOwner().ClientCloseMenu(true, false); LobbyMenu(PageOwner).bAllowClose = false; } return false;
} }
else if(Sender == b_Ready){ return super(LobbyFooter).OnFooterClick(Sender); // bypass serverperks else if(Sender == b_ViewMap){
} if(KF_StoryGRI(PlayerOwner().Level.GRI) == none){
else return super.OnFooterClick(Sender); LobbyMenu(PageOwner).bAllowClose = true;
} PlayerOwner().ClientCloseMenu(true, false);
defaultproperties LobbyMenu(PageOwner).bAllowClose = false;
{ }
} }
else if(Sender == b_Ready){
return super(LobbyFooter).OnFooterClick(Sender); // bypass serverperks
}
else
return super.OnFooterClick(Sender);
}
defaultproperties
{
}

View File

@ -1,4 +1,12 @@
class NiceLobbyMenu extends ScrnLobbyMenu; class NiceLobbyMenu extends ScrnLobbyMenu;
defaultproperties defaultproperties
{ Begin Object Class=NiceLobbyFooter Name=BuyFooter RenderWeight=0.300000 TabOrder=8 bBoundToParent=False bScaleToParent=False OnPreDraw=BuyFooter.InternalOnPreDraw End Object t_Footer=NiceLobbyFooter'NicePack.NiceLobbyMenu.BuyFooter' {
} Begin Object Class=NiceLobbyFooter Name=BuyFooter
RenderWeight=0.300000
TabOrder=8
bBoundToParent=False
bScaleToParent=False
OnPreDraw=BuyFooter.InternalOnPreDraw
End Object
t_Footer=NiceLobbyFooter'NicePack.NiceLobbyMenu.BuyFooter'
}

View File

@ -1,26 +1,172 @@
class NicePanelSkills extends Settings_Tabs; class NicePanelSkills extends Settings_Tabs;
var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5]; var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5];
function ShowPanel(bool bShow){ function ShowPanel(bool bShow){
local int i; local int i;
local class<NiceVeterancyTypes> niceVet; local class<NiceVeterancyTypes> niceVet;
local NicePlayerController nicePlayer; local NicePlayerController nicePlayer;
Super.ShowPanel(bShow); Super.ShowPanel(bShow);
nicePlayer = NicePlayerController(PlayerOwner()); nicePlayer = NicePlayerController(PlayerOwner());
if(nicePlayer != none) niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(nicePlayer.PlayerReplicationInfo); if(nicePlayer != none)
if(niceVet != none){ for(i = 0;i < 5;i ++){ skillButtonA[i].skillIndex = i; skillButtonB[i].skillIndex = i; skillButtonA[i].skillPerkIndex = niceVet.default.PerkIndex; skillButtonB[i].skillPerkIndex = niceVet.default.PerkIndex; skillButtonA[i].isAltSkill = false; skillButtonB[i].isAltSkill = true; skillButtonA[i].associatedSkill = niceVet.default.SkillGroupA[i]; skillButtonB[i].associatedSkill = niceVet.default.SkillGroupB[i]; } niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(nicePlayer.PlayerReplicationInfo);
} if(niceVet != none){
} for(i = 0;i < 5;i ++){
// size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865) skillButtonA[i].skillIndex = i;
// setup caption skillButtonB[i].skillIndex = i;
defaultproperties skillButtonA[i].skillPerkIndex = niceVet.default.PerkIndex;
{ Begin Object Class=NiceGUIPerkButton Name=btn1A WinTop=0.012500 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=1 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn1A.InternalOnKeyEvent End Object skillButtonA(0)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn1A' skillButtonB[i].skillPerkIndex = niceVet.default.PerkIndex;
Begin Object Class=NiceGUIPerkButton Name=btn2A WinTop=0.188500 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=3 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn2A.InternalOnKeyEvent End Object skillButtonA(1)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn2A' skillButtonA[i].isAltSkill = false;
Begin Object Class=NiceGUIPerkButton Name=btn3A WinTop=0.364500 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=5 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn3A.InternalOnKeyEvent End Object skillButtonA(2)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn3A' skillButtonB[i].isAltSkill = true;
Begin Object Class=NiceGUIPerkButton Name=btn4A WinTop=0.540500 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=7 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn4A.InternalOnKeyEvent End Object skillButtonA(3)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn4A' skillButtonA[i].associatedSkill = niceVet.default.SkillGroupA[i];
Begin Object Class=NiceGUIPerkButton Name=btn5A WinTop=0.716500 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=9 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn5A.InternalOnKeyEvent End Object skillButtonA(4)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn5A' skillButtonB[i].associatedSkill = niceVet.default.SkillGroupB[i];
Begin Object Class=NiceGUIPerkButton Name=btn1B WinTop=0.012500 WinLeft=0.505000 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=2 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn1B.InternalOnKeyEvent End Object skillButtonB(0)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn1B' }
Begin Object Class=NiceGUIPerkButton Name=btn2B WinTop=0.188500 WinLeft=0.505000 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=4 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn2B.InternalOnKeyEvent End Object skillButtonB(1)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn2B' }
Begin Object Class=NiceGUIPerkButton Name=btn3B WinTop=0.364500 WinLeft=0.505000 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=6 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn3B.InternalOnKeyEvent End Object skillButtonB(2)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn3B' }
Begin Object Class=NiceGUIPerkButton Name=btn4B WinTop=0.540500 WinLeft=0.505000 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=8 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn4B.InternalOnKeyEvent End Object skillButtonB(3)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn4B' // size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865)
Begin Object Class=NiceGUIPerkButton Name=btn5B WinTop=0.716500 WinLeft=0.505000 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=10 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn5B.InternalOnKeyEvent End Object skillButtonB(4)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn5B' // setup caption
} defaultproperties
{
Begin Object Class=NiceGUIPerkButton Name=btn1A
WinTop=0.012500
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=1
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn1A.InternalOnKeyEvent
End Object
skillButtonA(0)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn1A'
Begin Object Class=NiceGUIPerkButton Name=btn2A
WinTop=0.188500
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=3
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn2A.InternalOnKeyEvent
End Object
skillButtonA(1)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn2A'
Begin Object Class=NiceGUIPerkButton Name=btn3A
WinTop=0.364500
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=5
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn3A.InternalOnKeyEvent
End Object
skillButtonA(2)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn3A'
Begin Object Class=NiceGUIPerkButton Name=btn4A
WinTop=0.540500
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=7
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn4A.InternalOnKeyEvent
End Object
skillButtonA(3)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn4A'
Begin Object Class=NiceGUIPerkButton Name=btn5A
WinTop=0.716500
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=9
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn5A.InternalOnKeyEvent
End Object
skillButtonA(4)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn5A'
Begin Object Class=NiceGUIPerkButton Name=btn1B
WinTop=0.012500
WinLeft=0.505000
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=2
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn1B.InternalOnKeyEvent
End Object
skillButtonB(0)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn1B'
Begin Object Class=NiceGUIPerkButton Name=btn2B
WinTop=0.188500
WinLeft=0.505000
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=4
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn2B.InternalOnKeyEvent
End Object
skillButtonB(1)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn2B'
Begin Object Class=NiceGUIPerkButton Name=btn3B
WinTop=0.364500
WinLeft=0.505000
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=6
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn3B.InternalOnKeyEvent
End Object
skillButtonB(2)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn3B'
Begin Object Class=NiceGUIPerkButton Name=btn4B
WinTop=0.540500
WinLeft=0.505000
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=8
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn4B.InternalOnKeyEvent
End Object
skillButtonB(3)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn4B'
Begin Object Class=NiceGUIPerkButton Name=btn5B
WinTop=0.716500
WinLeft=0.505000
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=10
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn5B.InternalOnKeyEvent
End Object
skillButtonB(4)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn5B'
}

View File

@ -1,74 +1,151 @@
// made to fix KFStoryGameInfo loading for KFO maps // made to fix KFStoryGameInfo loading for KFO maps
class NiceGameType extends ScrnGameType; class NiceGameType extends ScrnGameType;
var NicePack NicePackMutator; var NicePack NicePackMutator;
function RegisterMutator(NicePack activePack){ function RegisterMutator(NicePack activePack){
NicePackMutator = activePack; NicePackMutator = activePack;
} }
function OverrideMonsterHealth(KFMonster M){} function OverrideMonsterHealth(KFMonster M){}
/*event InitGame(string Options, out string Error){ /*event InitGame(string Options, out string Error){
local int i, j; local int i, j;
if(ScrnGameLength == none) ScrnGameLength = new(none, string(KFGameLength)) class'ScrnGameLength'; if(ScrnGameLength == none)
for(i = 0;i < ScrnGameLength. ScrnGameLength = new(none, string(KFGameLength)) class'ScrnGameLength';
}*/ for(i = 0;i < ScrnGameLength.
function int SpawnSquad(ZombieVolume ZVol, out array< class<KFMonster> > Squad, optional bool bLogSpawned ){ }*/
local int i, j; function int SpawnSquad(ZombieVolume ZVol, out array< class<KFMonster> > Squad, optional bool bLogSpawned ){
local array<NicePack.ZedRecord> zedDatabase; local int i, j;
if(NicePackMutator != none){ zedDatabase = NicePackMutator.zedDatabase; for(i = 0;i < zedDatabase.Length;i ++){ for(j = 0;j < Squad.Length;j ++){ if(zedDatabase[i].bNeedsReplacement && zedDatabase[i].ZedType == Squad[j]) Squad[j] = zeddatabase[i].MeanZedType; } } local array<NicePack.ZedRecord> zedDatabase;
} if(NicePackMutator != none){
return super.SpawnSquad(ZVol, Squad, bLogSpawned); zedDatabase = NicePackMutator.zedDatabase;
} for(i = 0;i < zedDatabase.Length;i ++){
function SetupWave(){ for(j = 0;j < Squad.Length;j ++){
Super.SetupWave(); if(zedDatabase[i].bNeedsReplacement && zedDatabase[i].ZedType == Squad[j])
// Event call Squad[j] = zeddatabase[i].MeanZedType;
NicePackMutator.WaveStart(); }
} }
function RestartPlayer(Controller aPlayer){ }
Super.RestartPlayer(aPlayer); return super.SpawnSquad(ZVol, Squad, bLogSpawned);
if(aPlayer.Pawn != none && NicePlayerController(aPlayer) != none) NicePlayerController(aPlayer).PawnSpawned(); }
} function SetupWave(){
State MatchInProgress{ Super.SetupWave();
function BeginState(){ Super(Invasion).BeginState(); // Event call
WaveNum = InitialWave; InvasionGameReplicationInfo(GameReplicationInfo).WaveNumber = WaveNum; NicePackMutator.WaveStart();
if(NicePackMutator.bInitialTrader) WaveCountDown = NicePackMutator.initialTraderTime + 5; else WaveCountDown = 10; }
SetupPickups(); if(ScrnGameLength != none && !ScrnGameLength.LoadWave(WaveNum)) DoWaveEnd(); function RestartPlayer(Controller aPlayer){
// Event call NicePackMutator.MatchBegan(); Super.RestartPlayer(aPlayer);
} if(aPlayer.Pawn != none && NicePlayerController(aPlayer) != none)
function DoWaveEnd(){ Super.DoWaveEnd(); // Event call NicePackMutator.TraderStart(); NicePlayerController(aPlayer).PawnSpawned();
} }
function StartWaveBoss(){ Super.StartWaveBoss(); // Event call NicePackMutator.WaveStart(); State MatchInProgress{
} function BeginState(){
} Super(Invasion).BeginState();
function DramaticEvent(float BaseZedTimePossibility, optional float DesiredZedTimeDuration){
local bool bWasZedTime; WaveNum = InitialWave;
bWasZedTime = bZEDTimeActive; InvasionGameReplicationInfo(GameReplicationInfo).WaveNumber = WaveNum;
Super.DramaticEvent(BaseZedTimePossibility, DesiredZedTimeDuration);
// Call event if(NicePackMutator.bInitialTrader)
if(!bWasZedTime && bZEDTimeActive) NicePackMutator.ZedTimeActivated(); WaveCountDown = NicePackMutator.initialTraderTime + 5;
} else
event Tick(float DeltaTime){ WaveCountDown = 10;
local float TrueTimeFactor;
local Controller C; SetupPickups();
if(bZEDTimeActive){ TrueTimeFactor = 1.1 / Level.TimeDilation; CurrentZEDTimeDuration -= DeltaTime * TrueTimeFactor; if(CurrentZEDTimeDuration < (ZEDTimeDuration*0.166) && CurrentZEDTimeDuration > 0 ){ if(!bSpeedingBackUp){ bSpeedingBackUp = true; if(ScrnGameLength != none && !ScrnGameLength.LoadWave(WaveNum))
for(C = Level.ControllerList;C != none;C = C.NextController){ if(KFPlayerController(C)!= none) KFPlayerController(C).ClientExitZedTime(); } } SetGameSpeed(Lerp( (CurrentZEDTimeDuration/(ZEDTimeDuration*0.166)), 1.0, 0.2 )); } if(CurrentZEDTimeDuration <= 0){ if(bZEDTimeActive) NicePackMutator.ZedTimeDeactivated(); bZEDTimeActive = false; bSpeedingBackUp = false; SetGameSpeed(1.0); ZedTimeExtensionsUsed = 0; } DoWaveEnd();
}
} // Event call
function Killed(Controller Killer, Controller Killed, Pawn KilledPawn, class<DamageType> dmgType){ NicePackMutator.MatchBegan();
local GameRules rules; }
local ScrnGameRules scrnRules; function DoWaveEnd(){
local KFSteamStatsAndAchievements StatsAndAchievements; Super.DoWaveEnd();
Super.Killed(Killer, Killed, KilledPawn, dmgType); // Event call
if(PlayerController(Killer) != none){ if(NiceMonster(KilledPawn) != none && Killed != Killer){ StatsAndAchievements = KFSteamStatsAndAchievements(PlayerController(Killer).SteamStatsAndAchievements); if(StatsAndAchievements != none){ if(KilledPawn.IsA('NiceZombieStalker') || KilledPawn.IsA('MeanZombieStalker')){ if(class<NiceDamTypeWinchester>(dmgType) != none) StatsAndAchievements.AddStalkerKillWithLAR(); } else if(KilledPawn.IsA('NiceZombieClot') || KilledPawn.IsA('MeanZombieClot')){ if(class<NiceDamTypeWinchester>(dmgType) != none) KFSteamStatsAndAchievements(PlayerController(Killer).SteamStatsAndAchievements).AddClotKillWithLAR(); } if(class<NiceWeaponDamageType>(dmgType) != none){ for(rules = Level.Game.GameRulesModifiers;rules != none;rules = rules.NextGameRules) if(ScrnGameRules(rules) != none){ scrnRules = ScrnGameRules(rules); break; } if(scrnRules != none) class<NiceWeaponDamageType>(dmgType).Static.AwardNiceKill(StatsAndAchievements, KFPlayerController(Killer), KFMonster(KilledPawn), scrnRules.HardcoreLevel); } } } NicePackMutator.TraderStart();
} }
} function StartWaveBoss(){
// Reloaded to award damage Super.StartWaveBoss();
function int ReduceDamage(int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType){ // Event call
local NiceMonster niceZed; NicePackMutator.WaveStart();
local KFPlayerController PC; }
niceZed = NiceMonster(Injured); }
if(niceZed != none){ if(instigatedBy != none){ PC = KFPlayerController(instigatedBy.Controller); if(class<NiceWeaponDamageType>(damageType) != none && PC != none) class<NiceWeaponDamageType>(damageType).Static.AwardNiceDamage(KFSteamStatsAndAchievements(PC.SteamStatsAndAchievements), Clamp(Damage, 1, Injured.Health), niceZed.scrnRules.HardcoreLevel); } function DramaticEvent(float BaseZedTimePossibility, optional float DesiredZedTimeDuration){
} local bool bWasZedTime;
return Super.ReduceDamage(Damage, injured, InstigatedBy, HitLocation, Momentum, DamageType); bWasZedTime = bZEDTimeActive;
} Super.DramaticEvent(BaseZedTimePossibility, DesiredZedTimeDuration);
defaultproperties // Call event
{ GameName="Nice Floor" Description="Nice Edition of ScrN Killing Floor game mode (ScrnGameType)." if(!bWasZedTime && bZEDTimeActive)
} NicePackMutator.ZedTimeActivated();
}
event Tick(float DeltaTime){
local float TrueTimeFactor;
local Controller C;
if(bZEDTimeActive){
TrueTimeFactor = 1.1 / Level.TimeDilation;
CurrentZEDTimeDuration -= DeltaTime * TrueTimeFactor;
if(CurrentZEDTimeDuration < (ZEDTimeDuration*0.166) && CurrentZEDTimeDuration > 0 ){
if(!bSpeedingBackUp){
bSpeedingBackUp = true;
for(C = Level.ControllerList;C != none;C = C.NextController){
if(KFPlayerController(C)!= none)
KFPlayerController(C).ClientExitZedTime();
}
}
SetGameSpeed(Lerp( (CurrentZEDTimeDuration/(ZEDTimeDuration*0.166)), 1.0, 0.2 ));
}
if(CurrentZEDTimeDuration <= 0){
if(bZEDTimeActive)
NicePackMutator.ZedTimeDeactivated();
bZEDTimeActive = false;
bSpeedingBackUp = false;
SetGameSpeed(1.0);
ZedTimeExtensionsUsed = 0;
}
}
}
function Killed(Controller Killer, Controller Killed, Pawn KilledPawn, class<DamageType> dmgType){
local GameRules rules;
local ScrnGameRules scrnRules;
local KFSteamStatsAndAchievements StatsAndAchievements;
Super.Killed(Killer, Killed, KilledPawn, dmgType);
if(PlayerController(Killer) != none){
if(NiceMonster(KilledPawn) != none && Killed != Killer){
StatsAndAchievements = KFSteamStatsAndAchievements(PlayerController(Killer).SteamStatsAndAchievements);
if(StatsAndAchievements != none){
if(KilledPawn.IsA('NiceZombieStalker') || KilledPawn.IsA('MeanZombieStalker')){
if(class<NiceDamTypeWinchester>(dmgType) != none)
StatsAndAchievements.AddStalkerKillWithLAR();
}
else if(KilledPawn.IsA('NiceZombieClot') || KilledPawn.IsA('MeanZombieClot')){
if(class<NiceDamTypeWinchester>(dmgType) != none)
KFSteamStatsAndAchievements(PlayerController(Killer).SteamStatsAndAchievements).AddClotKillWithLAR();
}
if(class<NiceWeaponDamageType>(dmgType) != none){
for(rules = Level.Game.GameRulesModifiers;rules != none;rules = rules.NextGameRules)
if(ScrnGameRules(rules) != none){
scrnRules = ScrnGameRules(rules);
break;
}
if(scrnRules != none)
class<NiceWeaponDamageType>(dmgType).Static.AwardNiceKill(StatsAndAchievements, KFPlayerController(Killer), KFMonster(KilledPawn), scrnRules.HardcoreLevel);
}
}
}
}
}
// Reloaded to award damage
function int ReduceDamage(int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType){
local NiceMonster niceZed;
local KFPlayerController PC;
niceZed = NiceMonster(Injured);
if(niceZed != none){
if(instigatedBy != none){
PC = KFPlayerController(instigatedBy.Controller);
if(class<NiceWeaponDamageType>(damageType) != none && PC != none)
class<NiceWeaponDamageType>(damageType).Static.AwardNiceDamage(KFSteamStatsAndAchievements(PC.SteamStatsAndAchievements), Clamp(Damage, 1, Injured.Health), niceZed.scrnRules.HardcoreLevel);
}
}
return Super.ReduceDamage(Damage, injured, InstigatedBy, HitLocation, Momentum, DamageType);
}
defaultproperties
{
GameName="Nice Floor"
Description="Nice Edition of ScrN Killing Floor game mode (ScrnGameType)."
}

View File

@ -1,79 +1,163 @@
class NiceRules extends GameRules; class NiceRules extends GameRules;
var ScrnGameRules ScrnRules; var ScrnGameRules ScrnRules;
function PostBeginPlay(){ function PostBeginPlay(){
if(Level.Game.GameRulesModifiers == none) Level.Game.GameRulesModifiers = Self; if(Level.Game.GameRulesModifiers == none)
else{ // We need to be the ones giving achievements first Self.AddGameRules(Level.Game.GameRulesModifiers); Level.Game.GameRulesModifiers = Self; Level.Game.GameRulesModifiers = Self;
} else{
if(NicePack(Owner) != none) ScrnRules = NicePack(Owner).ScrnMut.GameRules; // We need to be the ones giving achievements first
else{ Log("Wrong owner! Owner must be NicePack!"); Destroy(); Self.AddGameRules(Level.Game.GameRulesModifiers);
} Level.Game.GameRulesModifiers = Self;
} }
function bool CheckEndGame(PlayerReplicationInfo Winner, string Reason){ if(NicePack(Owner) != none)
local bool bWin; ScrnRules = NicePack(Owner).ScrnMut.GameRules;
local string MapName; else{
if(Level.Game.IsInState('PendingMatch')) return false; Log("Wrong owner! Owner must be NicePack!");
if(Level.Game.bGameEnded) return true; Destroy();
if(NextGameRules != none && !NextGameRules.CheckEndGame(Winner,Reason)) return false; }
if(ScrnRules.Mut.bStoryMode) bWin = Reason ~= "WinAction"; }
else{ bWin = KFGameReplicationInfo(Level.GRI) != none && KFGameReplicationInfo(Level.GRI).EndGameType == 2; function bool CheckEndGame(PlayerReplicationInfo Winner, string Reason){
} local bool bWin;
if(bWin){ // Map achievements MapName = ScrnRules.Mut.KF.GetCurrentMapName(Level); ScrnRules.CheckMapAlias(MapName); GiveMapAchievements(MapName); local string MapName;
} if(Level.Game.IsInState('PendingMatch'))
return true; return false;
} if(Level.Game.bGameEnded)
// We would never get ScrN Sui and Hoe achievs with our new zeds, so let's add them ourselves. For different reasons. return true;
function GiveMapAchievements(optional String MapName){ if(NextGameRules != none && !NextGameRules.CheckEndGame(Winner,Reason))
local bool bCustomMap, bGiveHardAch, bGiveSuiAch, bGiveHoeAch, bNewAch; return false;
local ScrnPlayerInfo SPI; if(ScrnRules.Mut.bStoryMode)
local ClientPerkRepLink PerkLink; bWin = Reason ~= "WinAction";
local TeamInfo WinnerTeam; else{
WinnerTeam = TeamInfo(Level.Game.GameReplicationInfo.Winner); bWin = KFGameReplicationInfo(Level.GRI) != none && KFGameReplicationInfo(Level.GRI).EndGameType == 2;
if(ScrnRules.Mut.bStoryMode){ bGiveHardAch = Level.Game.GameDifficulty >= 4; bGiveSuiAch = Level.Game.GameDifficulty >= 5; bGiveHoeAch = Level.Game.GameDifficulty >= 7; }
} if(bWin){
else{ bGiveHardAch = ScrnRules.HardcoreLevel >= 5; bGiveSuiAch = ScrnRules.HardcoreLevel >= 10; bGiveHoeAch = ScrnRules.HardcoreLevel >= 15; // Map achievements
} MapName = ScrnRules.Mut.KF.GetCurrentMapName(Level);
for (SPI = ScrnRules.PlayerInfo;SPI != none;SPI = SPI.NextPlayerInfo){ if (SPI.PlayerOwner == none || SPI.PlayerOwner.PlayerReplicationInfo == none) continue; PerkLink = SPI.GetRep(); if(PerkLink == none) continue; if(WinnerTeam != none && SPI.PlayerOwner.PlayerReplicationInfo.Team != WinnerTeam) continue; // no candies for loosers // additional achievements that are granted only when surviving the game if(ScrnPlayerController(SPI.PlayerOwner) != none && !ScrnPlayerController(SPI.PlayerOwner).bChangedPerkDuringGame) SPI.ProgressAchievement('PerkFavorite', 1); ScrnRules.CheckMapAlias(MapName);
//unlock "Normal" achievement and see if the map is found bCustomMap = ScrnRules.MapAchClass.static.UnlockMapAchievement(PerkLink, MapName, 0) == -2; bNewAch = false; if(bCustomMap){ //map not found - progress custom map achievements if(bGiveHardAch) ScrnRules.AchClass.static.ProgressAchievementByID(PerkLink, 'WinCustomMapsHard', 1); if(bGiveSuiAch) ScrnRules.AchClass.static.ProgressAchievementByID(PerkLink, 'WinCustomMapsSui', 1); if(bGiveHoeAch) ScrnRules.AchClass.static.ProgressAchievementByID(PerkLink, 'WinCustomMapsHoE', 1); ScrnRules.AchClass.static.ProgressAchievementByID(PerkLink, 'WinCustomMapsNormal', 1); ScrnRules.AchClass.static.ProgressAchievementByID(PerkLink, 'WinCustomMaps', 1); } else{ //map found - give related achievements if(bGiveHardAch) ScrnRules.MapAchClass.static.UnlockMapAchievement(PerkLink, MapName, 1); if(bGiveSuiAch) ScrnRules.MapAchClass.static.UnlockMapAchievement(PerkLink, MapName, 2); if(bGiveHoeAch) ScrnRules.MapAchClass.static.UnlockMapAchievement(PerkLink, MapName, 3); } GiveMapAchievements(MapName);
} }
} return true;
function int NetDamage(int OriginalDamage, int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType){ }
local TeamGame TG; // We would never get ScrN Sui and Hoe achievs with our new zeds, so let's add them ourselves. For different reasons.
TG = TeamGame(Level.Game); function GiveMapAchievements(optional String MapName){
if(KFPawn(injured) != none && TG != none && Damage > 0 && class<DamTypeEnemyBase>(DamageType) == none){ if((KFPawn(instigatedBy) != none || FakePlayerPawn(instigatedBy) != none) && (instigatedBy.PlayerReplicationInfo == none || instigatedBy.PlayerReplicationInfo.bOnlySpectator)){ Momentum = vect(0,0,0); if(NoFF(injured, TG.FriendlyFireScale)) return 0; else if(OriginalDamage == Damage) return Damage * TG.FriendlyFireScale; } else if(instigatedBy == none && !DamageType.default.bCausedByWorld){ Momentum = vect(0,0,0); if(NoFF(injured, TG.FriendlyFireScale)) return 0; else if(OriginalDamage == Damage) return Damage * TG.FriendlyFireScale; } local bool bCustomMap, bGiveHardAch, bGiveSuiAch, bGiveHoeAch, bNewAch;
} local ScrnPlayerInfo SPI;
return super.NetDamage(OriginalDamage, Damage, injured, instigatedBy, HitLocation, Momentum, DamageType); local ClientPerkRepLink PerkLink;
} local TeamInfo WinnerTeam;
function bool NoFF(Pawn injured, float FF){ WinnerTeam = TeamInfo(Level.Game.GameReplicationInfo.Winner);
return (FF == 0.0 || (Vehicle(injured) != none && Vehicle(injured).bNoFriendlyFire)); if(ScrnRules.Mut.bStoryMode){
} bGiveHardAch = Level.Game.GameDifficulty >= 4;
function RaiseHardcoreLevel(float inc, string reason){ bGiveSuiAch = Level.Game.GameDifficulty >= 5;
local string s; bGiveHoeAch = Level.Game.GameDifficulty >= 7;
local Controller P; }
local NicePlayerController nicePlayer; else{
bGiveHardAch = ScrnRules.HardcoreLevel >= 5;
if(ScrnRules.HardcoreLevelFloat < ScrnRules.HardcoreLevel) ScrnRules.HardcoreLevelFloat = ScrnRules.HardcoreLevel; bGiveSuiAch = ScrnRules.HardcoreLevel >= 10;
ScrnRules.HardcoreLevelFloat += inc; bGiveHoeAch = ScrnRules.HardcoreLevel >= 15;
ScrnRules.HardcoreLevel = int(ScrnRules.HardcoreLevelFloat + 0.01); }
ScrnRules.Mut.HardcoreLevel = clamp(ScrnRules.HardcoreLevel, 0, 255); for (SPI = ScrnRules.PlayerInfo;SPI != none;SPI = SPI.NextPlayerInfo){
ScrnRules.Mut.NetUpdateTime = Level.TimeSeconds - 1; if (SPI.PlayerOwner == none || SPI.PlayerOwner.PlayerReplicationInfo == none)
continue;
s = ScrnRules.msgHardcore; PerkLink = SPI.GetRep();
ReplaceText(s, "%a", String(ScrnRules.HardcoreLevel)); if(PerkLink == none)
ReplaceText(s, "%i", String(inc)); continue;
ReplaceText(s, "%r", reason); if(WinnerTeam != none && SPI.PlayerOwner.PlayerReplicationInfo.Team != WinnerTeam)
for(P = Level.ControllerList; P != none; P = P.nextController){ nicePlayer = NicePlayerController(P); if(nicePlayer != none && nicePlayer.bFlagShowHLMessages) nicePlayer.ClientMessage(s); continue; // no candies for loosers
} // additional achievements that are granted only when surviving the game
} if(ScrnPlayerController(SPI.PlayerOwner) != none && !ScrnPlayerController(SPI.PlayerOwner).bChangedPerkDuringGame)
function bool PreventDeath(Pawn Killed, Controller Killer, class<DamageType> damageType, vector HitLocation){ SPI.ProgressAchievement('PerkFavorite', 1);
local NiceHumanPawn nicePawn;
local NicePlayerController nicePlayer; //unlock "Normal" achievement and see if the map is found
nicePlayer = NicePlayerController(Killed.controller); bCustomMap = ScrnRules.MapAchClass.static.UnlockMapAchievement(PerkLink, MapName, 0) == -2;
nicePawn = NiceHumanPawn(Killed); bNewAch = false;
if(nicePawn != none && (!nicePawn.bReactiveArmorUsed) && class'NiceVeterancyTypes'.static.HasSkill(nicePlayer, class'NiceSkillDemoReactiveArmor')){ nicePawn.bReactiveArmorUsed = true; nicePlayer.niceRI.ServerExplode(class'NiceSkillDemoReactiveArmor'.default.baseDamage, class'NiceSkillDemoReactiveArmor'.default.explRadius, class'NiceSkillDemoReactiveArmor'.default.explExponent, class'NiceDamTypeDemoSafeExplosion', class'NiceSkillDemoReactiveArmor'.default.explMomentum, killed.location, killed, true ); return true; if(bCustomMap){
} //map not found - progress custom map achievements
if(NextGameRules != none) return NextGameRules.PreventDeath(Killed, Killer, damageType, HitLocation); if(bGiveHardAch)
return false; ScrnRules.AchClass.static.ProgressAchievementByID(PerkLink, 'WinCustomMapsHard', 1);
} if(bGiveSuiAch)
defaultproperties ScrnRules.AchClass.static.ProgressAchievementByID(PerkLink, 'WinCustomMapsSui', 1);
{ if(bGiveHoeAch)
} ScrnRules.AchClass.static.ProgressAchievementByID(PerkLink, 'WinCustomMapsHoE', 1);
ScrnRules.AchClass.static.ProgressAchievementByID(PerkLink, 'WinCustomMapsNormal', 1);
ScrnRules.AchClass.static.ProgressAchievementByID(PerkLink, 'WinCustomMaps', 1);
}
else{
//map found - give related achievements
if(bGiveHardAch)
ScrnRules.MapAchClass.static.UnlockMapAchievement(PerkLink, MapName, 1);
if(bGiveSuiAch)
ScrnRules.MapAchClass.static.UnlockMapAchievement(PerkLink, MapName, 2);
if(bGiveHoeAch)
ScrnRules.MapAchClass.static.UnlockMapAchievement(PerkLink, MapName, 3);
}
}
}
function int NetDamage(int OriginalDamage, int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType){
local TeamGame TG;
TG = TeamGame(Level.Game);
if(KFPawn(injured) != none && TG != none && Damage > 0 && class<DamTypeEnemyBase>(DamageType) == none){
if((KFPawn(instigatedBy) != none || FakePlayerPawn(instigatedBy) != none) && (instigatedBy.PlayerReplicationInfo == none || instigatedBy.PlayerReplicationInfo.bOnlySpectator)){
Momentum = vect(0,0,0);
if(NoFF(injured, TG.FriendlyFireScale))
return 0;
else if(OriginalDamage == Damage)
return Damage * TG.FriendlyFireScale;
}
else if(instigatedBy == none && !DamageType.default.bCausedByWorld){
Momentum = vect(0,0,0);
if(NoFF(injured, TG.FriendlyFireScale))
return 0;
else if(OriginalDamage == Damage)
return Damage * TG.FriendlyFireScale;
}
}
return super.NetDamage(OriginalDamage, Damage, injured, instigatedBy, HitLocation, Momentum, DamageType);
}
function bool NoFF(Pawn injured, float FF){
return (FF == 0.0 || (Vehicle(injured) != none && Vehicle(injured).bNoFriendlyFire));
}
function RaiseHardcoreLevel(float inc, string reason){
local string s;
local Controller P;
local NicePlayerController nicePlayer;
if(ScrnRules.HardcoreLevelFloat < ScrnRules.HardcoreLevel)
ScrnRules.HardcoreLevelFloat = ScrnRules.HardcoreLevel;
ScrnRules.HardcoreLevelFloat += inc;
ScrnRules.HardcoreLevel = int(ScrnRules.HardcoreLevelFloat + 0.01);
ScrnRules.Mut.HardcoreLevel = clamp(ScrnRules.HardcoreLevel, 0, 255);
ScrnRules.Mut.NetUpdateTime = Level.TimeSeconds - 1;
s = ScrnRules.msgHardcore;
ReplaceText(s, "%a", String(ScrnRules.HardcoreLevel));
ReplaceText(s, "%i", String(inc));
ReplaceText(s, "%r", reason);
for(P = Level.ControllerList; P != none; P = P.nextController){
nicePlayer = NicePlayerController(P);
if(nicePlayer != none && nicePlayer.bFlagShowHLMessages)
nicePlayer.ClientMessage(s);
}
}
function bool PreventDeath(Pawn Killed, Controller Killer, class<DamageType> damageType, vector HitLocation){
local NiceHumanPawn nicePawn;
local NicePlayerController nicePlayer;
nicePlayer = NicePlayerController(Killed.controller);
nicePawn = NiceHumanPawn(Killed);
if(nicePawn != none && (!nicePawn.bReactiveArmorUsed)
&& class'NiceVeterancyTypes'.static.HasSkill(nicePlayer, class'NiceSkillDemoReactiveArmor')){
nicePawn.bReactiveArmorUsed = true;
nicePlayer.niceRI.ServerExplode(class'NiceSkillDemoReactiveArmor'.default.baseDamage,
class'NiceSkillDemoReactiveArmor'.default.explRadius,
class'NiceSkillDemoReactiveArmor'.default.explExponent,
class'NiceDamTypeDemoSafeExplosion',
class'NiceSkillDemoReactiveArmor'.default.explMomentum,
killed.location, killed, true
);
return true;
}
if(NextGameRules != none)
return NextGameRules.PreventDeath(Killed, Killer, damageType, HitLocation);
return false;
}
defaultproperties
{
}

View File

@ -1,9 +1,12 @@
class NiceSoundCls extends Effects; class NiceSoundCls extends Effects;
var Sound effectSound; var Sound effectSound;
var float effectVolume; var float effectVolume;
simulated function PostBeginPlay(){ simulated function PostBeginPlay(){
if(effectSound != none) PlaySound(effectSound,, effectVolume); if(effectSound != none)
} PlaySound(effectSound,, effectVolume);
defaultproperties }
{ DrawType=DT_None LifeSpan=0.100000 defaultproperties
} {
DrawType=DT_None
LifeSpan=0.100000
}

View File

@ -1,20 +1,25 @@
//============================================================================== //==============================================================================
// NicePack / NiceAbilitiesAdapter // NicePack / NiceAbilitiesAdapter
//============================================================================== //==============================================================================
// Temporary stand-in for future functionality. // Temporary stand-in for future functionality.
// Use this class to catch events from players' abilities. // Use this class to catch events from players' abilities.
//============================================================================== //==============================================================================
// 'Nice pack' source // 'Nice pack' source
// Do whatever the fuck you want with it // Do whatever the fuck you want with it
// Author: dkanus // Author: dkanus
// E-mail: dkanus@gmail.com // E-mail: dkanus@gmail.com
//============================================================================== //==============================================================================
class NiceAbilitiesAdapter extends Object; class NiceAbilitiesAdapter extends Object;
var LevelInfo level; var LevelInfo level;
static function AbilityActivated( string abilityID, NicePlayerController relatedPlayer); static function AbilityActivated( string abilityID,
static function AbilityAdded( string abilityID, NicePlayerController relatedPlayer); NicePlayerController relatedPlayer);
static function AbilityRemoved( string abilityID, NicePlayerController relatedPlayer); static function AbilityAdded( string abilityID,
static function ModAbilityCooldown( string abilityID, NicePlayerController relatedPlayer, out float cooldown); NicePlayerController relatedPlayer);
defaultproperties static function AbilityRemoved( string abilityID,
{ NicePlayerController relatedPlayer);
} static function ModAbilityCooldown( string abilityID,
NicePlayerController relatedPlayer,
out float cooldown);
defaultproperties
{
}

View File

@ -1,57 +1,79 @@
//============================================================================== //==============================================================================
// NicePack / NiceAbilitiesEvents // NicePack / NiceAbilitiesEvents
//============================================================================== //==============================================================================
// Temporary stand-in for future functionality. // Temporary stand-in for future functionality.
//============================================================================== //==============================================================================
// 'Nice pack' source // 'Nice pack' source
// Do whatever the fuck you want with it // Do whatever the fuck you want with it
// Author: dkanus // Author: dkanus
// E-mail: dkanus@gmail.com // E-mail: dkanus@gmail.com
//============================================================================== //==============================================================================
class NiceAbilitiesEvents extends Object; class NiceAbilitiesEvents extends Object;
var array< class<NiceAbilitiesAdapter> > adapters; var array< class<NiceAbilitiesAdapter> > adapters;
// If adapter was already added also returns 'false'. // If adapter was already added also returns 'false'.
static function bool AddAdapter(class<NiceAbilitiesAdapter> newAdapter, optional LevelInfo level){ static function bool AddAdapter(class<NiceAbilitiesAdapter> newAdapter,
local int i; optional LevelInfo level){
if(newAdapter == none) return false; local int i;
for(i = 0;i < default.adapters.length;i ++) if(default.adapters[i] == newAdapter) return false; if(newAdapter == none) return false;
newAdapter.default.level = level; for(i = 0;i < default.adapters.length;i ++)
default.adapters[default.adapters.length] = newAdapter; if(default.adapters[i] == newAdapter)
return true; return false;
} newAdapter.default.level = level;
// If adapter wasn't even present also returns 'false'. default.adapters[default.adapters.length] = newAdapter;
static function bool RemoveAdapter(class<NiceAbilitiesAdapter> adapter){ return true;
local int i; }
if(adapter == none) return false; // If adapter wasn't even present also returns 'false'.
for(i = 0;i < default.adapters.length;i ++){ if(default.adapters[i] == adapter){ default.adapters.Remove(i, 1); return true; } static function bool RemoveAdapter(class<NiceAbilitiesAdapter> adapter){
} local int i;
return false; if(adapter == none) return false;
} for(i = 0;i < default.adapters.length;i ++){
static function CallAbilityActivated if(default.adapters[i] == adapter){
( string abilityID, NicePlayerController relatedPlayer default.adapters.Remove(i, 1);
){ return true;
local int i; }
for(i = 0;i < default.adapters.length;i ++) default.adapters[i].static.AbilityActivated(abilityID, relatedPlayer); }
} return false;
static function CallAbilityAdded }
( string abilityID, NicePlayerController relatedPlayer static function CallAbilityActivated
){ (
local int i; string abilityID,
for(i = 0;i < default.adapters.length;i ++) default.adapters[i].static.AbilityAdded(abilityID, relatedPlayer); NicePlayerController relatedPlayer
} ){
static function CallAbilityRemoved local int i;
( string abilityID, NicePlayerController relatedPlayer for(i = 0;i < default.adapters.length;i ++)
){ default.adapters[i].static.AbilityActivated(abilityID, relatedPlayer);
local int i; }
for(i = 0;i < default.adapters.length;i ++) default.adapters[i].static.AbilityRemoved(abilityID, relatedPlayer); static function CallAbilityAdded
} (
static function CallModAbilityCooldown string abilityID,
( string abilityID, NicePlayerController relatedPlayer, out float cooldown NicePlayerController relatedPlayer
){ ){
local int i; local int i;
for(i = 0;i < default.adapters.length;i ++){ default.adapters[i].static.ModAbilityCooldown( abilityID, relatedPlayer, cooldown); for(i = 0;i < default.adapters.length;i ++)
} default.adapters[i].static.AbilityAdded(abilityID, relatedPlayer);
} }
defaultproperties static function CallAbilityRemoved
{ (
} string abilityID,
NicePlayerController relatedPlayer
){
local int i;
for(i = 0;i < default.adapters.length;i ++)
default.adapters[i].static.AbilityRemoved(abilityID, relatedPlayer);
}
static function CallModAbilityCooldown
(
string abilityID,
NicePlayerController relatedPlayer,
out float cooldown
){
local int i;
for(i = 0;i < default.adapters.length;i ++){
default.adapters[i].static.ModAbilityCooldown( abilityID,
relatedPlayer,
cooldown);
}
}
defaultproperties
{
}

View File

@ -1,137 +1,169 @@
//============================================================================== //==============================================================================
// NicePack / NiceAbilityManager // NicePack / NiceAbilityManager
//============================================================================== //==============================================================================
// Class that manager active abilities, introduced along with a NicePack. // Class that manager active abilities, introduced along with a NicePack.
// Can support at most 5 ('maxAbilitiesAmount') different abilities at once. // Can support at most 5 ('maxAbilitiesAmount') different abilities at once.
// NICETODO: refactor later // NICETODO: refactor later
//============================================================================== //==============================================================================
// 'Nice pack' source // 'Nice pack' source
// Do whatever the fuck you want with it // Do whatever the fuck you want with it
// Author: dkanus // Author: dkanus
// E-mail: dkanus@gmail.com // E-mail: dkanus@gmail.com
//============================================================================== //==============================================================================
class NiceAbilityManager extends Actor; class NiceAbilityManager extends Actor;
var const int maxAbilitiesAmount; var const int maxAbilitiesAmount;
// Defines a list of all possible ability's states // Defines a list of all possible ability's states
enum EAbilityState{ enum EAbilityState{
// Ability is ready to use // Ability is ready to use
ASTATE_READY, ASTATE_READY,
// Ability is being used // Ability is being used
ASTATE_ACTIVE, ASTATE_ACTIVE,
// Ability is on cooldown // Ability is on cooldown
ASTATE_COOLDOWN ASTATE_COOLDOWN
}; };
// Describes all the necessary information about an ability // Describes all the necessary information about an ability
struct NiceAbilityDescription{ struct NiceAbilityDescription{
// Ability's ID, supposed to be unique per ability, // Ability's ID, supposed to be unique per ability,
// but no checks are enforced yet // but no checks are enforced yet
var string ID; var string ID;
// Image to be used as an ability's icon // Image to be used as an ability's icon
var Texture icon; var Texture icon;
// Default cooldown duration // Default cooldown duration
var float cooldownLength; var float cooldownLength;
// Can ability be canceled once activated? // Can ability be canceled once activated?
var bool canBeCancelled; var bool canBeCancelled;
}; };
// Complete description of current status of an ability, // Complete description of current status of an ability,
// including it's complete description. // including it's complete description.
struct NiceAbilityStatus{ struct NiceAbilityStatus{
// Complete description of ability in question // Complete description of ability in question
var NiceAbilityDescription description; var NiceAbilityDescription description;
// Current cooldown value // Current cooldown value
var float cooldown; var float cooldown;
// Current state of an ability // Current state of an ability
var EAbilityState myState; var EAbilityState myState;
}; };
var NiceAbilityStatus currentAbilities[5]; var NiceAbilityStatus currentAbilities[5];
var int currentAbilitiesAmount; var int currentAbilitiesAmount;
// Refers to the player whose abilities we manage // Refers to the player whose abilities we manage
var NicePlayerController relatedPlayer; var NicePlayerController relatedPlayer;
var const class<NiceAbilitiesEvents> events; var const class<NiceAbilitiesEvents> events;
// Unfortunately this hackk is required to force replication of structure array // Unfortunately this hackk is required to force replication of structure array
var int hackCounter; var int hackCounter;
replication{ replication{
reliable if(Role == ROLE_Authority) currentAbilities, currentAbilitiesAmount, hackCounter; reliable if(Role == ROLE_Authority)
} currentAbilities, currentAbilitiesAmount, hackCounter;
simulated function PostBeginPlay(){ }
relatedPlayer = NicePlayerController(owner); simulated function PostBeginPlay(){
} relatedPlayer = NicePlayerController(owner);
function AddAbility(NiceAbilityDescription description){ }
local int i; function AddAbility(NiceAbilityDescription description){
local NiceAbilityStatus newRecord; local int i;
if(currentAbilitiesAmount >= maxAbilitiesAmount) return; local NiceAbilityStatus newRecord;
for(i = 0;i < currentAbilitiesAmount;i ++) if(currentAbilities[i].description.ID ~= description.ID) return; if(currentAbilitiesAmount >= maxAbilitiesAmount) return;
newRecord.description = description; for(i = 0;i < currentAbilitiesAmount;i ++)
newRecord.cooldown = 0.0; if(currentAbilities[i].description.ID ~= description.ID)
newRecord.myState = ASTATE_READY; return;
currentAbilities[currentAbilitiesAmount] = newRecord; newRecord.description = description;
currentAbilitiesAmount += 1; newRecord.cooldown = 0.0;
events.static.CallAbilityAdded(description.ID, relatedPlayer); newRecord.myState = ASTATE_READY;
netUpdateTime = level.timeSeconds - 1; currentAbilities[currentAbilitiesAmount] = newRecord;
} currentAbilitiesAmount += 1;
function RemoveAbility(string abilityID){ events.static.CallAbilityAdded(description.ID, relatedPlayer);
local int i, j; netUpdateTime = level.timeSeconds - 1;
local bool wasRemoved; }
j = 0; function RemoveAbility(string abilityID){
for(i = 0;i < currentAbilitiesAmount;i ++){ if(currentAbilities[i].description.ID ~= abilityID){ wasRemoved = true; continue; } currentAbilities[j] = currentAbilities[i]; j += 1; local int i, j;
} local bool wasRemoved;
currentAbilitiesAmount = j; j = 0;
if(wasRemoved) events.static.CallAbilityRemoved(abilityID, relatedPlayer); for(i = 0;i < currentAbilitiesAmount;i ++){
netUpdateTime = level.timeSeconds - 1; if(currentAbilities[i].description.ID ~= abilityID){
} wasRemoved = true;
function ClearAbilities(){ continue;
currentAbilitiesAmount = 0; }
netUpdateTime = level.timeSeconds - 1; currentAbilities[j] = currentAbilities[i];
} j += 1;
// Returns index of the ability with a given name. }
// Returns '-1' if such ability doesn't exist. currentAbilitiesAmount = j;
simulated function int GetAbilityIndex(string abilityID){ if(wasRemoved)
local int i; events.static.CallAbilityRemoved(abilityID, relatedPlayer);
for(i = 0;i < currentAbilitiesAmount;i ++) if(currentAbilities[i].description.ID ~= abilityID) return i; netUpdateTime = level.timeSeconds - 1;
return -1; }
} function ClearAbilities(){
simulated function bool IsAbilityActive(string abilityID){ currentAbilitiesAmount = 0;
local int index; netUpdateTime = level.timeSeconds - 1;
index = GetAbilityIndex(abilityID); }
if(index < 0) return false; // Returns index of the ability with a given name.
return (currentAbilities[index].myState == ASTATE_ACTIVE); // Returns '-1' if such ability doesn't exist.
} simulated function int GetAbilityIndex(string abilityID){
// Sets ability to a proper state. local int i;
// Does nothing if ability is already in a specified state. for(i = 0;i < currentAbilitiesAmount;i ++)
// Setting active ability to a ready state is only allowed if(currentAbilities[i].description.ID ~= abilityID)
// if ability can be canceled. return i;
// Updates cooldown to full length if new state is 'ASTATE_COOLDOWN'. return -1;
function SetAbilityState(int abilityIndex, EAbilityState newState){ }
local float cooldown; simulated function bool IsAbilityActive(string abilityID){
local EAbilityState currentState; local int index;
if(abilityIndex < 0 || abilityIndex >= currentAbilitiesAmount) return; index = GetAbilityIndex(abilityID);
currentState = currentAbilities[abilityIndex].myState; if(index < 0)
if(currentState == newState) return; return false;
if( currentState == ASTATE_ACTIVE && newState == ASTATE_READY && !currentAbilities[abilityIndex].description.canBeCancelled) return; return (currentAbilities[index].myState == ASTATE_ACTIVE);
currentAbilities[abilityIndex].myState = newState; }
if(newState == ASTATE_COOLDOWN){ cooldown = currentAbilities[abilityIndex].description.cooldownLength; events.static.CallModAbilityCooldown( currentAbilities[abilityIndex].description.ID, relatedPlayer, cooldown ); currentAbilities[abilityIndex].cooldown = cooldown; // Sets ability to a proper state.
} // Does nothing if ability is already in a specified state.
hackCounter ++; // Setting active ability to a ready state is only allowed
netUpdateTime = level.timeSeconds - 1; // if ability can be canceled.
// Fire off events // Updates cooldown to full length if new state is 'ASTATE_COOLDOWN'.
if(newState == ASTATE_ACTIVE){ events.static.CallAbilityActivated( currentAbilities[abilityIndex].description.ID, relatedPlayer ); function SetAbilityState(int abilityIndex, EAbilityState newState){
} local float cooldown;
} local EAbilityState currentState;
// Changes ability's cooldown by a given amount. if(abilityIndex < 0 || abilityIndex >= currentAbilitiesAmount) return;
// If this brings cooldown to zero or below - currentState = currentAbilities[abilityIndex].myState;
// resets current ability to a 'ready' (ASTATE_READY) state. if(currentState == newState)
function AddToCooldown(int abilityIndex, float delta){ return;
if(abilityIndex < 0 || abilityIndex >= currentAbilitiesAmount) return; if( currentState == ASTATE_ACTIVE && newState == ASTATE_READY
if(currentAbilities[abilityIndex].myState != ASTATE_COOLDOWN) return; && !currentAbilities[abilityIndex].description.canBeCancelled)
currentAbilities[abilityIndex].cooldown += delta; return;
if(currentAbilities[abilityIndex].cooldown <= 0) SetAbilityState(abilityIndex, ASTATE_READY); currentAbilities[abilityIndex].myState = newState;
hackCounter ++; if(newState == ASTATE_COOLDOWN){
} cooldown = currentAbilities[abilityIndex].description.cooldownLength;
function Tick(float deltaTime){ events.static.CallModAbilityCooldown(
local int i; currentAbilities[abilityIndex].description.ID,
if(Role != Role_AUTHORITY) return; relatedPlayer,
for(i = 0;i < currentAbilitiesAmount;i ++) AddToCooldown(i, -deltaTime); cooldown
} );
defaultproperties currentAbilities[abilityIndex].cooldown = cooldown;
{ maxAbilitiesAmount=5 Events=Class'NicePack.NiceAbilitiesEvents' DrawType=DT_None }
} hackCounter ++;
netUpdateTime = level.timeSeconds - 1;
// Fire off events
if(newState == ASTATE_ACTIVE){
events.static.CallAbilityActivated(
currentAbilities[abilityIndex].description.ID,
relatedPlayer
);
}
}
// Changes ability's cooldown by a given amount.
// If this brings cooldown to zero or below -
// resets current ability to a 'ready' (ASTATE_READY) state.
function AddToCooldown(int abilityIndex, float delta){
if(abilityIndex < 0 || abilityIndex >= currentAbilitiesAmount) return;
if(currentAbilities[abilityIndex].myState != ASTATE_COOLDOWN) return;
currentAbilities[abilityIndex].cooldown += delta;
if(currentAbilities[abilityIndex].cooldown <= 0)
SetAbilityState(abilityIndex, ASTATE_READY);
hackCounter ++;
}
function Tick(float deltaTime){
local int i;
if(Role != Role_AUTHORITY) return;
for(i = 0;i < currentAbilitiesAmount;i ++)
AddToCooldown(i, -deltaTime);
}
defaultproperties
{
maxAbilitiesAmount=5
Events=Class'NicePack.NiceAbilitiesEvents'
DrawType=DT_None
}

View File

@ -1,8 +1,24 @@
class NiceDamageTypeVetBerserker extends NiceWeaponDamageType class NiceDamageTypeVetBerserker extends NiceWeaponDamageType
abstract; abstract;
static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){ static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){
if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none) SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetBerserkerExp', Int(Float(Amount) * class'NicePack'.default.vetZerkDamageExpCost * getScale(HL))); if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none)
} SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetBerserkerExp', Int(Float(Amount) * class'NicePack'.default.vetZerkDamageExpCost * getScale(HL)));
defaultproperties }
{ HeadShotDamageMult=1.250000 bIsMeleeDamage=True DeathString="%o was beat down by %k." FemaleSuicide="%o beat herself down." MaleSuicide="%o beat himself down." bRagdollBullet=True bBulletHit=True PawnDamageEmitter=Class'ROEffects.ROBloodPuff' LowGoreDamageEmitter=Class'ROEffects.ROBloodPuffNoGore' LowDetailEmitter=Class'ROEffects.ROBloodPuffSmall' FlashFog=(X=600.000000) KDamageImpulse=2000.000000 KDeathVel=100.000000 KDeathUpKick=25.000000 VehicleDamageScaling=0.600000 defaultproperties
} {
HeadShotDamageMult=1.250000
bIsMeleeDamage=True
DeathString="%o was beat down by %k."
FemaleSuicide="%o beat herself down."
MaleSuicide="%o beat himself down."
bRagdollBullet=True
bBulletHit=True
PawnDamageEmitter=Class'ROEffects.ROBloodPuff'
LowGoreDamageEmitter=Class'ROEffects.ROBloodPuffNoGore'
LowDetailEmitter=Class'ROEffects.ROBloodPuffSmall'
FlashFog=(X=600.000000)
KDamageImpulse=2000.000000
KDeathVel=100.000000
KDeathUpKick=25.000000
VehicleDamageScaling=0.600000
}

View File

@ -1,4 +1,5 @@
class NiceVetBerserkerExp extends SRCustomProgressInt; class NiceVetBerserkerExp extends SRCustomProgressInt;
defaultproperties defaultproperties
{ ProgressName="Berserker exp." {
} ProgressName="Berserker exp."
}

View File

@ -1,5 +1,7 @@
class NiceSkillZerkBrawler extends NiceSkill class NiceSkillZerkBrawler extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Brawler" SkillEffects="Clots can't grab you." {
} SkillName="Brawler"
SkillEffects="Clots can't grab you."
}

View File

@ -1,6 +1,9 @@
class NiceSkillZerkCleave extends NiceSkill class NiceSkillZerkCleave extends NiceSkill
abstract; abstract;
var float bonusDegrees; var float bonusDegrees;
defaultproperties defaultproperties
{ bonusDegrees=0.523599 SkillName="Cleave" SkillEffects="Add 30 degrees to wide attacks with melee weapons." {
} bonusDegrees=0.523599
SkillName="Cleave"
SkillEffects="Add 30 degrees to wide attacks with melee weapons."
}

View File

@ -1,6 +1,9 @@
class NiceSkillZerkColossus extends NiceSkill class NiceSkillZerkColossus extends NiceSkill
abstract; abstract;
var float timeBonus; var float timeBonus;
defaultproperties defaultproperties
{ timeBonus=1.000000 SkillName="Colossus" SkillEffects="Invincibility period lasts 1 second longer." {
} timeBonus=1.000000
SkillName="Colossus"
SkillEffects="Invincibility period lasts 1 second longer."
}

View File

@ -1,6 +1,9 @@
class NiceSkillZerkFury extends NiceSkill class NiceSkillZerkFury extends NiceSkill
abstract; abstract;
var float attackSpeedBonus; var float attackSpeedBonus;
defaultproperties defaultproperties
{ attackSpeedBonus=1.500000 SkillName="Fury" SkillEffects="Attack 50% faster during invincibility." {
} attackSpeedBonus=1.500000
SkillName="Fury"
SkillEffects="Attack 50% faster during invincibility."
}

View File

@ -1,6 +1,9 @@
class NiceSkillZerkGunzerker extends NiceSkill class NiceSkillZerkGunzerker extends NiceSkill
abstract; abstract;
var float cooldown; var float cooldown;
defaultproperties defaultproperties
{ cooldown=-2.000000 SkillName="Gunzerker" SkillEffects="You're able to activate melee-invincibility with non-melee headshots, but your misses are punished by a 2 second cooldown, during which you cannot activate invincibility." {
} cooldown=-2.000000
SkillName="Gunzerker"
SkillEffects="You're able to activate melee-invincibility with non-melee headshots, but your misses are punished by a 2 second cooldown, during which you cannot activate invincibility."
}

View File

@ -1,6 +1,9 @@
class NiceSkillZerkUndead extends NiceSkill class NiceSkillZerkUndead extends NiceSkill
abstract; abstract;
var int addedSafeMisses; var int addedSafeMisses;
defaultproperties defaultproperties
{ addedSafeMisses=1 SkillName="Undead" SkillEffects="Get additional safe melee-miss during invincibility period." {
} addedSafeMisses=1
SkillName="Undead"
SkillEffects="Get additional safe melee-miss during invincibility period."
}

View File

@ -1,6 +1,9 @@
class NiceSkillZerkVorpalBlade extends NiceSkill class NiceSkillZerkVorpalBlade extends NiceSkill
abstract; abstract;
var float damageBonus; var float damageBonus;
defaultproperties defaultproperties
{ damageBonus=2.000000 SkillName="Vorpal blade" SkillEffects="Your head-shot deals double damage on your first invincibility extension against the zed." {
} damageBonus=2.000000
SkillName="Vorpal blade"
SkillEffects="Your head-shot deals double damage on your first invincibility extension against the zed."
}

View File

@ -1,5 +1,7 @@
class NiceSkillZerkWhirlwind extends NiceSkill class NiceSkillZerkWhirlwind extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Whirlwind" SkillEffects="Move twice as fast during invincibility." {
} SkillName="Whirlwind"
SkillEffects="Move twice as fast during invincibility."
}

View File

@ -1,6 +1,9 @@
class NiceSkillZerkWindCutter extends NiceSkill class NiceSkillZerkWindCutter extends NiceSkill
abstract; abstract;
var float rangeBonus; var float rangeBonus;
defaultproperties defaultproperties
{ rangeBonus=1.500000 SkillName="Wind cutter" SkillEffects="Increase your reach with melee-weapons by 50%." {
} rangeBonus=1.500000
SkillName="Wind cutter"
SkillEffects="Increase your reach with melee-weapons by 50%."
}

View File

@ -1,5 +1,7 @@
class NiceSkillZerkZEDAccelerate extends NiceSkill class NiceSkillZerkZEDAccelerate extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Accelerate" SkillEffects="Move and attack at the same speed during zed-time." {
} SkillName="Accelerate"
SkillEffects="Move and attack at the same speed during zed-time."
}

View File

@ -1,5 +1,7 @@
class NiceSkillZerkZEDUnbreakable extends NiceSkill class NiceSkillZerkZEDUnbreakable extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Unbreakable" SkillEffects="You resist all damage during zed time." {
} SkillName="Unbreakable"
SkillEffects="You resist all damage during zed time."
}

View File

@ -1,14 +1,16 @@
class NiceDamageTypeVetCommando extends NiceWeaponDamageType class NiceDamageTypeVetCommando extends NiceWeaponDamageType
abstract; abstract;
static function AwardKill(KFSteamStatsAndAchievements KFStatsAndAchievements, KFPlayerController Killer, KFMonster Killed ){ static function AwardKill(KFSteamStatsAndAchievements KFStatsAndAchievements, KFPlayerController Killer, KFMonster Killed ){
if(Killed.IsA('ZombieStalker')) KFStatsAndAchievements.AddStalkerKill(); if(Killed.IsA('ZombieStalker'))
} KFStatsAndAchievements.AddStalkerKill();
static function AwardDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount){ }
KFStatsAndAchievements.AddBullpupDamage(Amount); static function AwardDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount){
} KFStatsAndAchievements.AddBullpupDamage(Amount);
static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){ }
if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none) SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetCommandoExp', Int(Float(Amount) * class'NicePack'.default.vetCommandoDamageExpCost * getScale(HL))); static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){
} if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none)
defaultproperties SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetCommandoExp', Int(Float(Amount) * class'NicePack'.default.vetCommandoDamageExpCost * getScale(HL)));
{ }
} defaultproperties
{
}

View File

@ -1,4 +1,5 @@
class NiceVetCommandoExp extends SRCustomProgressInt; class NiceVetCommandoExp extends SRCustomProgressInt;
defaultproperties defaultproperties
{ ProgressName="Commando exp." {
} ProgressName="Commando exp."
}

View File

@ -1,6 +1,9 @@
class NiceSkillCommandoExplosivePower extends NiceSkill class NiceSkillCommandoExplosivePower extends NiceSkill
abstract; abstract;
var float dmgMod; var float dmgMod;
defaultproperties defaultproperties
{ dmgMod=1.200000 SkillName="Explosive power" SkillEffects="Burst fire deals 20% more damage and has reduced delay between shots." {
} dmgMod=1.200000
SkillName="Explosive power"
SkillEffects="Burst fire deals 20% more damage and has reduced delay between shots."
}

View File

@ -1,6 +1,9 @@
class NiceSkillCommandoLargerMags extends NiceSkill class NiceSkillCommandoLargerMags extends NiceSkill
abstract; abstract;
var float sizeBonus; var float sizeBonus;
defaultproperties defaultproperties
{ sizeBonus=1.500000 SkillName="Larger mags" SkillEffects="50% larger assault rifles' magazines." {
} sizeBonus=1.500000
SkillName="Larger mags"
SkillEffects="50% larger assault rifles' magazines."
}

View File

@ -1,5 +1,7 @@
class NiceSkillCommandoPerfectExecution extends NiceSkill class NiceSkillCommandoPerfectExecution extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Perfect execution" SkillEffects="Raging scrake or fleshpound activates zed-time." {
} SkillName="Perfect execution"
SkillEffects="Raging scrake or fleshpound activates zed-time."
}

View File

@ -1,6 +1,10 @@
class NiceSkillCommandoStrategist extends NiceSkill class NiceSkillCommandoStrategist extends NiceSkill
abstract; abstract;
var float visionRadius; // 1.0 ~ 16m var float visionRadius; // 1.0 ~ 16m
defaultproperties defaultproperties
{ visionRadius=1.000000 bBroadcast=True SkillName="Strategist" SkillEffects="You and your teammates can see enemies' health and invisible zeds from 16 meters." {
} visionRadius=1.000000
bBroadcast=True
SkillName="Strategist"
SkillEffects="You and your teammates can see enemies' health and invisible zeds from 16 meters."
}

View File

@ -1,6 +1,9 @@
class NiceSkillCommandoTactitian extends NiceSkill class NiceSkillCommandoTactitian extends NiceSkill
abstract; abstract;
var int bonusExt; var int bonusExt;
defaultproperties defaultproperties
{ bonusExt=2 SkillName="Tactician" SkillEffects="Gain two additional zed-time extensions." {
} bonusExt=2
SkillName="Tactician"
SkillEffects="Gain two additional zed-time extensions."
}

View File

@ -1,5 +1,7 @@
class NiceSkillCommandoZEDProfessional extends NiceSkill class NiceSkillCommandoZEDProfessional extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Professionalism" SkillEffects="Your reloads aren't slowed down during zed-time." {
} SkillName="Professionalism"
SkillEffects="Your reloads aren't slowed down during zed-time."
}

View File

@ -1,5 +1,17 @@
class NiceDamTypeDemoBlunt extends NiceDamageTypeVetDemolitions class NiceDamTypeDemoBlunt extends NiceDamageTypeVetDemolitions
abstract; abstract;
defaultproperties defaultproperties
{ HeadShotDamageMult=2.000000 bSniperWeapon=True DeathString="%k killed %o (LAW Impact)." FemaleSuicide="%o shot herself in the foot." MaleSuicide="%o shot himself in the foot." bRagdollBullet=True bBulletHit=True FlashFog=(X=600.000000) KDamageImpulse=5000.000000 KDeathVel=200.000000 KDeathUpKick=50.000000 VehicleDamageScaling=0.700000 {
} HeadShotDamageMult=2.000000
bSniperWeapon=True
DeathString="%k killed %o (LAW Impact)."
FemaleSuicide="%o shot herself in the foot."
MaleSuicide="%o shot himself in the foot."
bRagdollBullet=True
bBulletHit=True
FlashFog=(X=600.000000)
KDamageImpulse=5000.000000
KDeathVel=200.000000
KDeathUpKick=50.000000
VehicleDamageScaling=0.700000
}

View File

@ -1,9 +1,26 @@
class NiceDamTypeDemoExplosion extends NiceDamageTypeVetDemolitions; class NiceDamTypeDemoExplosion extends NiceDamageTypeVetDemolitions;
static function GetHitEffects(out class<xEmitter> HitEffects[4], int VictimHealth){ static function GetHitEffects(out class<xEmitter> HitEffects[4], int VictimHealth){
HitEffects[0] = class'HitSmoke'; HitEffects[0] = class'HitSmoke';
if(VictimHealth <= 0) HitEffects[1] = class'KFHitFlame'; if(VictimHealth <= 0)
else if(FRand() < 0.8) HitEffects[1] = class'KFHitFlame'; HitEffects[1] = class'KFHitFlame';
} else if(FRand() < 0.8)
defaultproperties HitEffects[1] = class'KFHitFlame';
{ stunMultiplier=0.600000 bIsExplosive=True DeathString="%o filled %k's body with shrapnel." FemaleSuicide="%o blew up." MaleSuicide="%o blew up." bLocationalHit=False bThrowRagdoll=True bExtraMomentumZ=True DamageThreshold=1 DeathOverlayMaterial=Combiner'Effects_Tex.GoreDecals.PlayerDeathOverlay' DeathOverlayTime=999.000000 KDamageImpulse=3000.000000 KDeathVel=300.000000 KDeathUpKick=250.000000 HumanObliterationThreshhold=150 }
} defaultproperties
{
stunMultiplier=0.600000
bIsExplosive=True
DeathString="%o filled %k's body with shrapnel."
FemaleSuicide="%o blew up."
MaleSuicide="%o blew up."
bLocationalHit=False
bThrowRagdoll=True
bExtraMomentumZ=True
DamageThreshold=1
DeathOverlayMaterial=Combiner'Effects_Tex.GoreDecals.PlayerDeathOverlay'
DeathOverlayTime=999.000000
KDamageImpulse=3000.000000
KDeathVel=300.000000
KDeathUpKick=250.000000
HumanObliterationThreshhold=150
}

View File

@ -1,8 +1,9 @@
class NiceDamageTypeVetDemolitions extends NiceWeaponDamageType class NiceDamageTypeVetDemolitions extends NiceWeaponDamageType
abstract; abstract;
static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){ static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){
if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none) SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetDemolitionsExp', Int(Float(Amount) * class'NicePack'.default.vetDemoDamageExpCost * getScale(HL))); if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none)
} SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetDemolitionsExp', Int(Float(Amount) * class'NicePack'.default.vetDemoDamageExpCost * getScale(HL)));
defaultproperties }
{ defaultproperties
} {
}

View File

@ -1,4 +1,5 @@
class NiceVetDemolitionsExp extends SRCustomProgressInt; class NiceVetDemolitionsExp extends SRCustomProgressInt;
defaultproperties defaultproperties
{ ProgressName="Demolitions exp." {
} ProgressName="Demolitions exp."
}

View File

@ -1,7 +1,11 @@
class NiceSkillDemoAPShot extends NiceSkill class NiceSkillDemoAPShot extends NiceSkill
abstract; abstract;
var float minCos; var float minCos;
var float damageRatio; var float damageRatio;
defaultproperties defaultproperties
{ minCos=0.707000 damageRatio=1.000000 SkillName="AP shot" SkillEffects="Deal full blast damage behind the target you've hit." {
} minCos=0.707000
damageRatio=1.000000
SkillName="AP shot"
SkillEffects="Deal full blast damage behind the target you've hit."
}

View File

@ -1,6 +1,9 @@
class NiceSkillDemoConcussion extends NiceSkill class NiceSkillDemoConcussion extends NiceSkill
abstract; abstract;
var float durationMult; var float durationMult;
defaultproperties defaultproperties
{ durationMult=2.000000 SkillName="Concussion" SkillEffects="You stun zeds for twice longer time than usual." {
} durationMult=2.000000
SkillName="Concussion"
SkillEffects="You stun zeds for twice longer time than usual."
}

View File

@ -1,5 +1,7 @@
class NiceSkillDemoDirectApproach extends NiceSkill class NiceSkillDemoDirectApproach extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Direct approach" SkillEffects="Your explosives will first hit target zed as a blunt before exploding." {
} SkillName="Direct approach"
SkillEffects="Your explosives will first hit target zed as a blunt before exploding."
}

View File

@ -1,28 +1,36 @@
class NiceSkillDemoManiac extends NiceSkill class NiceSkillDemoManiac extends NiceSkill
abstract; abstract;
var float reloadBoostTime; var float reloadBoostTime;
var float reloadSpeedup; var float reloadSpeedup;
function static SkillSelected(NicePlayerController nicePlayer){ function static SkillSelected(NicePlayerController nicePlayer){
local NicePack niceMutator; local NicePack niceMutator;
super.SkillSelected(nicePlayer); super.SkillSelected(nicePlayer);
niceMutator = class'NicePack'.static.Myself(nicePlayer.Level); niceMutator = class'NicePack'.static.Myself(nicePlayer.Level);
if(niceMutator == none || niceMutator.Role == Role_AUTHORITY) return; if(niceMutator == none || niceMutator.Role == Role_AUTHORITY)
niceMutator.AddCounter("npDemoManiac", Texture'NicePackT.HudCounter.demo', false, default.class); return;
} niceMutator.AddCounter("npDemoManiac", Texture'NicePackT.HudCounter.demo', false, default.class);
function static SkillDeSelected(NicePlayerController nicePlayer){ }
local NicePack niceMutator; function static SkillDeSelected(NicePlayerController nicePlayer){
super.SkillDeSelected(nicePlayer); local NicePack niceMutator;
niceMutator = class'NicePack'.static.Myself(nicePlayer.Level); super.SkillDeSelected(nicePlayer);
if(niceMutator == none || niceMutator.Role == Role_AUTHORITY) return; niceMutator = class'NicePack'.static.Myself(nicePlayer.Level);
niceMutator.RemoveCounter("npDemoManiac"); if(niceMutator == none || niceMutator.Role == Role_AUTHORITY)
} return;
function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){ niceMutator.RemoveCounter("npDemoManiac");
local NiceHumanPawn nicePawn; }
if(nicePlayer == none || counterName != "npDemoManiac") return 0; function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){
nicePawn = NiceHumanPawn(nicePlayer.pawn); local NiceHumanPawn nicePawn;
if(nicePawn == none || nicePawn.maniacTimeout <= 0.0) return 0; if(nicePlayer == none || counterName != "npDemoManiac")
return Ceil(nicePawn.maniacTimeout); return 0;
} nicePawn = NiceHumanPawn(nicePlayer.pawn);
defaultproperties if(nicePawn == none || nicePawn.maniacTimeout <= 0.0)
{ reloadBoostTime=5.000000 reloadSpeedup=1.500000 SkillName="Maniac" SkillEffects="Reload 50% faster for 5 seconds after killing something." return 0;
} return Ceil(nicePawn.maniacTimeout);
}
defaultproperties
{
reloadBoostTime=5.000000
reloadSpeedup=1.500000
SkillName="Maniac"
SkillEffects="Reload 50% faster for 5 seconds after killing something."
}

View File

@ -1,8 +1,13 @@
class NiceSkillDemoOffperk extends NiceSkill class NiceSkillDemoOffperk extends NiceSkill
abstract; abstract;
var float damageBonus; var float damageBonus;
var float reloadBonus; var float reloadBonus;
var int weightBound; var int weightBound;
defaultproperties defaultproperties
{ damageBonus=1.250000 ReloadBonus=1.250000 weightBound=4 SkillName="Offperk" SkillEffects="Reload light weapons (less than 5 pounds) 25% faster and do 25% more damage with them." {
} damageBonus=1.250000
ReloadBonus=1.250000
weightBound=4
SkillName="Offperk"
SkillEffects="Reload light weapons (less than 5 pounds) 25% faster and do 25% more damage with them."
}

View File

@ -1,7 +1,12 @@
class NiceSkillDemoOnperk extends NiceSkill class NiceSkillDemoOnperk extends NiceSkill
abstract; abstract;
var float damageBonus; var float damageBonus;
var float speedBonus; var float speedBonus;
defaultproperties defaultproperties
{ damageBonus=1.200000 speedBonus=1.500000 bBroadcast=True SkillName="Onperk" SkillEffects="Deal 20% more damage with your blunts and make your perk weapon's projectiles fly 50% faster." {
} damageBonus=1.200000
speedBonus=1.500000
bBroadcast=True
SkillName="Onperk"
SkillEffects="Deal 20% more damage with your blunts and make your perk weapon's projectiles fly 50% faster."
}

View File

@ -1,10 +1,16 @@
class NiceSkillDemoReactiveArmor extends NiceSkill class NiceSkillDemoReactiveArmor extends NiceSkill
abstract; abstract;
var float baseDamage; var float baseDamage;
var float perNadeDamage; var float perNadeDamage;
var float explRadius; var float explRadius;
var float explExponent; var float explExponent;
var float explMomentum; var float explMomentum;
defaultproperties defaultproperties
{ BaseDamage=3000.000000 explRadius=1000.000000 explExponent=1.000000 explMomentum=150000.000000 SkillName="Reactive armor" SkillEffects="Once per wave your death will be prevented, while zeds all around you will be blown to bits." {
} BaseDamage=3000.000000
explRadius=1000.000000
explExponent=1.000000
explMomentum=150000.000000
SkillName="Reactive armor"
SkillEffects="Once per wave your death will be prevented, while zeds all around you will be blown to bits."
}

View File

@ -1,8 +1,13 @@
class NiceSkillDemoVolatile extends NiceSkill class NiceSkillDemoVolatile extends NiceSkill
abstract; abstract;
var float safeDistanceMult; var float safeDistanceMult;
var float explRangeMult; var float explRangeMult;
var float falloffMult; var float falloffMult;
defaultproperties defaultproperties
{ safeDistanceMult=0.500000 explRangeMult=1.000000 falloffMult=0.500000 SkillName="Volatile" SkillEffects="Safe range for your explosives is halved and explosion damage experiences smaller fall off." {
} safeDistanceMult=0.500000
explRangeMult=1.000000
falloffMult=0.500000
SkillName="Volatile"
SkillEffects="Safe range for your explosives is halved and explosion damage experiences smaller fall off."
}

View File

@ -1,5 +1,7 @@
class NiceSkillDemoZEDDuckAndCover extends NiceSkill class NiceSkillDemoZEDDuckAndCover extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Duck and cover" SkillEffects="During zed time you can't deal yourself any damage." {
} SkillName="Duck and cover"
SkillEffects="During zed time you can't deal yourself any damage."
}

View File

@ -1,6 +1,9 @@
class NiceSkillDemoZEDFullBlast extends NiceSkill class NiceSkillDemoZEDFullBlast extends NiceSkill
abstract; abstract;
var float explRadiusMult; var float explRadiusMult;
defaultproperties defaultproperties
{ explRadiusMult=1.350000 SkillName="Full blast" SkillEffects="During zed time your explosions have 35% larger radius and their damage doesn't suffer from a fall off." {
} explRadiusMult=1.350000
SkillName="Full blast"
SkillEffects="During zed time your explosions have 35% larger radius and their damage doesn't suffer from a fall off."
}

View File

@ -1,10 +1,14 @@
class NiceDamageTypeVetEnforcer extends NiceWeaponDamageType class NiceDamageTypeVetEnforcer extends NiceWeaponDamageType
abstract; abstract;
static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){ static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){
if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none) SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetSupportExp', Int(Float(Amount) * class'NicePack'.default.vetSupportDamageExpCost * getScale(HL))); if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none)
} SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetSupportExp', Int(Float(Amount) * class'NicePack'.default.vetSupportDamageExpCost * getScale(HL)));
}
defaultproperties
{ badDecapMod=1.000000 bIsProjectile=True HeadShotDamageMult=1.500000 defaultproperties
{
badDecapMod=1.000000
bIsProjectile=True
HeadShotDamageMult=1.500000
} }

View File

@ -1,7 +1,10 @@
class NiceDamageTypeVetEnforcerBullets extends NiceDamageTypeVetEnforcer class NiceDamageTypeVetEnforcerBullets extends NiceDamageTypeVetEnforcer
abstract; abstract;
defaultproperties defaultproperties
{ {
badDecapMod=0.2500000 goodDecapMod=0.500000 bodyDestructionMult=1.000000 HeadShotDamageMult=1.000000 badDecapMod=0.2500000
goodDecapMod=0.500000
bodyDestructionMult=1.000000
HeadShotDamageMult=1.000000
} }

View File

@ -1,4 +1,5 @@
class NiceVetSupportExp extends SRCustomProgressInt; class NiceVetSupportExp extends SRCustomProgressInt;
defaultproperties defaultproperties
{ ProgressName="Enforcer exp." {
} ProgressName="Enforcer exp."
}

View File

@ -1,7 +1,11 @@
class NiceSkillEnforcerBombard extends NiceSkill class NiceSkillEnforcerBombard extends NiceSkill
abstract; abstract;
var float stunMult; var float stunMult;
var float spreadMult; var float spreadMult;
defaultproperties defaultproperties
{ stunMult=3.000000 spreadMult=0.500000 SkillName="Bombard" SkillEffects="Your perked weapons are 3 times as good at stunning." {
} stunMult=3.000000
spreadMult=0.500000
SkillName="Bombard"
SkillEffects="Your perked weapons are 3 times as good at stunning."
}

View File

@ -1,6 +1,9 @@
class NiceSkillEnforcerMultitasker extends NiceSkill class NiceSkillEnforcerMultitasker extends NiceSkill
abstract; abstract;
var float reloadSlowDown; var float reloadSlowDown;
defaultproperties defaultproperties
{ reloadSlowDown=5.000000 SkillName="Multitasker" SkillEffects="Reload holstered weapons at five times as much time." {
} reloadSlowDown=5.000000
SkillName="Multitasker"
SkillEffects="Reload holstered weapons at five times as much time."
}

View File

@ -1,5 +1,7 @@
class NiceSkillSupportAntiZed extends NiceSkill class NiceSkillSupportAntiZed extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Anti-zed rounds" SkillEffects="When shotgun pellets pass screaming siren, they gain x4 damage boost." {
} SkillName="Anti-zed rounds"
SkillEffects="When shotgun pellets pass screaming siren, they gain x4 damage boost."
}

View File

@ -1,5 +1,8 @@
class NiceSkillSupportArmory extends NiceSkill class NiceSkillSupportArmory extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ bBroadcast=True SkillName="Armory" SkillEffects="Once per wave your team-mates will receive armored jacket when they run out of armor." {
} bBroadcast=True
SkillName="Armory"
SkillEffects="Once per wave your team-mates will receive armored jacket when they run out of armor."
}

View File

@ -1,6 +1,9 @@
class NiceSkillSupportBigGameHunter extends NiceSkillGenAmmo class NiceSkillSupportBigGameHunter extends NiceSkillGenAmmo
abstract; abstract;
var float damageBonus; var float damageBonus;
defaultproperties defaultproperties
{ damageBonus=1.600000 SkillName="Big-game hunter" SkillEffects="Gain 60% damage bonus with grenades, but carry 5 grenades less." {
} damageBonus=1.600000
SkillName="Big-game hunter"
SkillEffects="Gain 60% damage bonus with grenades, but carry 5 grenades less."
}

View File

@ -1,5 +1,7 @@
class NiceSkillSupportCautious extends NiceSkill class NiceSkillSupportCautious extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Cautious" SkillEffects="Your grenades won't explode if you're too close to them." {
} SkillName="Cautious"
SkillEffects="Your grenades won't explode if you're too close to them."
}

View File

@ -1,18 +1,22 @@
class NiceSkillSupportDiversity extends NiceSkill class NiceSkillSupportDiversity extends NiceSkill
abstract; abstract;
var int bonusWeight; var int bonusWeight;
static function UpdateWeight(NicePlayerController nicePlayer){ static function UpdateWeight(NicePlayerController nicePlayer){
local NiceHumanPawn nicePawn; local NiceHumanPawn nicePawn;
if(nicePawn == none || nicePawn.KFPRI == none) return; if(nicePawn == none || nicePawn.KFPRI == none) return;
nicePawn.maxCarryWeight = nicePawn.default.maxCarryWeight; nicePawn.maxCarryWeight = nicePawn.default.maxCarryWeight;
if(nicePawn.KFPRI.clientVeteranSkill != none) nicePawn.maxCarryWeight += nicePawn.KFPRI.clientVeteranSkill.static.AddCarryMaxWeight(nicePawn.KFPRI); if(nicePawn.KFPRI.clientVeteranSkill != none)
} nicePawn.maxCarryWeight += nicePawn.KFPRI.clientVeteranSkill.static.AddCarryMaxWeight(nicePawn.KFPRI);
function static SkillSelected(NicePlayerController nicePlayer){ }
UpdateWeight(nicePlayer); function static SkillSelected(NicePlayerController nicePlayer){
} UpdateWeight(nicePlayer);
function static SkillDeSelected(NicePlayerController nicePlayer){ }
UpdateWeight(nicePlayer); function static SkillDeSelected(NicePlayerController nicePlayer){
} UpdateWeight(nicePlayer);
defaultproperties }
{ bonusWeight=5 SkillName="Diversity" SkillEffects="Gain +5 weight slots." defaultproperties
} {
bonusWeight=5
SkillName="Diversity"
SkillEffects="Gain +5 weight slots."
}

View File

@ -1,7 +1,11 @@
class NiceSkillSupportGraze extends NiceSkill class NiceSkillSupportGraze extends NiceSkill
abstract; abstract;
var float hsBonusZoneMult; var float hsBonusZoneMult;
var float grazeDamageMult; var float grazeDamageMult;
defaultproperties defaultproperties
{ hsBonusZoneMult=1.500000 grazeDamageMult=0.750000 SkillName="Graze" SkillEffects="Your perked projectile can hit zeds' extended head zone for 75% of damage even if they miss the normal one." {
} hsBonusZoneMult=1.500000
grazeDamageMult=0.750000
SkillName="Graze"
SkillEffects="Your perked projectile can hit zeds' extended head zone for 75% of damage even if they miss the normal one."
}

View File

@ -1,7 +1,11 @@
class NiceSkillSupportObsessive extends NiceSkill class NiceSkillSupportObsessive extends NiceSkill
abstract; abstract;
var float reloadLevel; var float reloadLevel;
var float reloadBonus; var float reloadBonus;
defaultproperties defaultproperties
{ reloadLevel=0.650000 ReloadBonus=1.500000 SkillName="Obsessive" SkillEffects="Reload 50% faster when you lack at most 35% of bullets in the magazine." {
} reloadLevel=0.650000
ReloadBonus=1.500000
SkillName="Obsessive"
SkillEffects="Reload 50% faster when you lack at most 35% of bullets in the magazine."
}

View File

@ -1,5 +1,7 @@
class NiceSkillSupportSlugs extends NiceSkill class NiceSkillSupportSlugs extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Slugs" SkillEffects="Pellets shots replaced by slugs on shotguns." {
} SkillName="Slugs"
SkillEffects="Pellets shots replaced by slugs on shotguns."
}

View File

@ -1,6 +1,9 @@
class NiceSkillSupportStubbornness extends NiceSkillGenAmmo class NiceSkillSupportStubbornness extends NiceSkillGenAmmo
abstract; abstract;
var float penLossRed; var float penLossRed;
defaultproperties defaultproperties
{ penLossRed=0.500000 SkillName="Stubbornness" SkillEffects="50% better penetration." {
} penLossRed=0.500000
SkillName="Stubbornness"
SkillEffects="50% better penetration."
}

View File

@ -1,6 +1,9 @@
class NiceSkillSupportZEDBore extends NiceSkill class NiceSkillSupportZEDBore extends NiceSkill
abstract; abstract;
var float minHeadshotPrecision; var float minHeadshotPrecision;
defaultproperties defaultproperties
{ minHeadshotPrecision=0.100000 SkillName="Bore" SkillEffects="During zed time your bullets' bounce between a zed's body and head 2 times before leaving it." {
} minHeadshotPrecision=0.100000
SkillName="Bore"
SkillEffects="During zed time your bullets' bounce between a zed's body and head 2 times before leaving it."
}

View File

@ -1,7 +1,11 @@
class NiceSkillSupportZEDBulletStorm extends NiceSkill class NiceSkillSupportZEDBulletStorm extends NiceSkill
abstract; abstract;
var float damageCut; var float damageCut;
var float projCountMult; var float projCountMult;
defaultproperties defaultproperties
{ damageCut=0.500000 projCountMult=7.000000 SkillName="Bullet storm" SkillEffects="During zed time you fire seven times as much projectiles, that deal half as much damage." {
} damageCut=0.500000
projCountMult=7.000000
SkillName="Bullet storm"
SkillEffects="During zed time you fire seven times as much projectiles, that deal half as much damage."
}

View File

@ -1,8 +1,9 @@
class NiceDamageTypeVetMedic extends NiceWeaponDamageType class NiceDamageTypeVetMedic extends NiceWeaponDamageType
abstract; abstract;
static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){ static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){
if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none) SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetFieldMedicExp', Int(Float(Amount) * class'NicePack'.default.vetFieldMedicDmgExpCost * getScale(HL))); if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none)
} SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetFieldMedicExp', Int(Float(Amount) * class'NicePack'.default.vetFieldMedicDmgExpCost * getScale(HL)));
defaultproperties }
{ defaultproperties
} {
}

View File

@ -1,4 +1,5 @@
class NiceVetFieldMedicExp extends SRCustomProgressInt; class NiceVetFieldMedicExp extends SRCustomProgressInt;
defaultproperties defaultproperties
{ ProgressName="Field Medic exp." {
} ProgressName="Field Medic exp."
}

View File

@ -1,5 +1,8 @@
class NiceDamTypeDrug extends NiceWeaponDamageType class NiceDamTypeDrug extends NiceWeaponDamageType
abstract; abstract;
defaultproperties defaultproperties
{ FemaleSuicide="%o overdosed." MaleSuicide="%o overdosed." bArmorStops=False {
} FemaleSuicide="%o overdosed."
MaleSuicide="%o overdosed."
bArmorStops=False
}

View File

@ -1,8 +1,14 @@
class NiceSkillMedicAdrenalineShot extends NiceSkill class NiceSkillMedicAdrenalineShot extends NiceSkill
abstract; abstract;
var float boostTime; var float boostTime;
var float minHealth; var float minHealth;
var float speedBoost, resistBoost; var float speedBoost, resistBoost;
defaultproperties defaultproperties
{ boostTime=1.000000 minHealth=50.000000 speedBoost=2.000000 resistBoost=1.500000 SkillName="Adrenaline shot" SkillEffects="Wounded players healed by you gain boost in speed (up to 100%) and damage resistance (up to 50%) for one second." {
} boostTime=1.000000
minHealth=50.000000
speedBoost=2.000000
resistBoost=1.500000
SkillName="Adrenaline shot"
SkillEffects="Wounded players healed by you gain boost in speed (up to 100%) and damage resistance (up to 50%) for one second."
}

View File

@ -1,6 +1,9 @@
class NiceSkillMedicAimAssistance extends NiceSkill class NiceSkillMedicAimAssistance extends NiceSkill
abstract; abstract;
var float headIncrease; var float headIncrease;
defaultproperties defaultproperties
{ headIncrease=1.500000 SkillName="Aim assistance" SkillEffects="Zeds' critical points are 50% bigger for you." {
} headIncrease=1.500000
SkillName="Aim assistance"
SkillEffects="Zeds' critical points are 50% bigger for you."
}

View File

@ -1,5 +1,7 @@
class NiceSkillMedicArmament extends NiceSkill class NiceSkillMedicArmament extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Armament" SkillEffects="Your grenades restore armor of the other players, but you can't refill them with ammoboxes." {
} SkillName="Armament"
SkillEffects="Your grenades restore armor of the other players, but you can't refill them with ammoboxes."
}

View File

@ -1,8 +1,17 @@
class NiceSkillMedicInjection extends NiceSkill class NiceSkillMedicInjection extends NiceSkill
abstract; abstract;
var float boostTime, painTime; var float boostTime, painTime;
var float withdrawalDamage, healthBoost; var float withdrawalDamage, healthBoost;
var float bonusAccuracy, bonusMeleeDmg, bonusSpeed, bonusReload; var float bonusAccuracy, bonusMeleeDmg, bonusSpeed, bonusReload;
defaultproperties defaultproperties
{ boostTime=30.000000 painTime=60.000000 withdrawalDamage=5.000000 bonusAccuracy=3.000000 bonusMeleeDmg=2.000000 bonusSpeed=2.000000 bonusReload=2.000000 SkillName="Injection" SkillEffects="Once a wave your teammates can pickup a drug from you that will greatly boost their performance for 30 seconds, but suffer from withdrawal afterwards." {
} boostTime=30.000000
painTime=60.000000
withdrawalDamage=5.000000
bonusAccuracy=3.000000
bonusMeleeDmg=2.000000
bonusSpeed=2.000000
bonusReload=2.000000
SkillName="Injection"
SkillEffects="Once a wave your teammates can pickup a drug from you that will greatly boost their performance for 30 seconds, but suffer from withdrawal afterwards."
}

View File

@ -1,5 +1,7 @@
class NiceSkillMedicPesticide extends NiceSkill class NiceSkillMedicPesticide extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Pesticide" SkillEffects="Your grenades effect lasts only half the original time, but they drive small zeds to fight each other." {
} SkillName="Pesticide"
SkillEffects="Your grenades effect lasts only half the original time, but they drive small zeds to fight each other."
}

View File

@ -1,6 +1,9 @@
class NiceSkillMedicRegeneration extends NiceSkill class NiceSkillMedicRegeneration extends NiceSkill
abstract; abstract;
var float regenFrequency; var float regenFrequency;
defaultproperties defaultproperties
{ regenFrequency=0.500000 SkillName="Regeneration" SkillEffects="You regenerate 2 hp per second." {
} regenFrequency=0.500000
SkillName="Regeneration"
SkillEffects="You regenerate 2 hp per second."
}

View File

@ -1,6 +1,9 @@
class NiceSkillMedicSymbioticHealth extends NiceSkill class NiceSkillMedicSymbioticHealth extends NiceSkill
abstract; abstract;
var float selfBoost; var float selfBoost;
defaultproperties defaultproperties
{ selfBoost=0.250000 SkillName="Symbiotic health" SkillEffects="Healing teammates will heal you 25% of your total health." {
} selfBoost=0.250000
SkillName="Symbiotic health"
SkillEffects="Healing teammates will heal you 25% of your total health."
}

View File

@ -1,6 +1,8 @@
class NiceSkillMedicTranquilizer extends NiceSkill class NiceSkillMedicTranquilizer extends NiceSkill
abstract; abstract;
var float healingDebuff; var float healingDebuff;
defaultproperties defaultproperties
{ SkillName="Tranquilizer" SkillEffects="Zeds hit by your darts can be stunned by head-damage, but your darts lose 25% of their healing efficiency." {
} SkillName="Tranquilizer"
SkillEffects="Zeds hit by your darts can be stunned by head-damage, but your darts lose 25% of their healing efficiency."
}

View File

@ -1,6 +1,9 @@
class NiceSkillMedicZEDFrenzy extends NiceSkill class NiceSkillMedicZEDFrenzy extends NiceSkill
abstract; abstract;
var float madnessTime; var float madnessTime;
defaultproperties defaultproperties
{ madnessTime=30.000000 SkillName="Frenzy" SkillEffects="Zeds hit by your darts during zed time will become rabid and attack anything indiscriminately for 30 seconds." {
} madnessTime=30.000000
SkillName="Frenzy"
SkillEffects="Zeds hit by your darts during zed time will become rabid and attack anything indiscriminately for 30 seconds."
}

View File

@ -1,5 +1,7 @@
class NiceSkillMedicZEDHeavenCanceller extends NiceSkill class NiceSkillMedicZEDHeavenCanceller extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Heaven canceller" SkillEffects="During zed-time your darts instantlyrestore health of your teammates and make them invincible for the duration." {
} SkillName="Heaven canceller"
SkillEffects="During zed-time your darts instantlyrestore health of your teammates and make them invincible for the duration."
}

View File

@ -1,7 +1,11 @@
class NiceSkillEnforcerDetermination extends NiceSkill class NiceSkillEnforcerDetermination extends NiceSkill
abstract; abstract;
var int healthBound; var int healthBound;
var float addedResist; var float addedResist;
defaultproperties defaultproperties
{ healthBound=50 addedResist=0.500000 SkillName="Determination" SkillEffects="Receive 50% less damage when your health falls below 50 mark." {
} healthBound=50
addedResist=0.500000
SkillName="Determination"
SkillEffects="Receive 50% less damage when your health falls below 50 mark."
}

View File

@ -1,33 +1,43 @@
class NiceSkillEnforcerFullCounter extends NiceSkill class NiceSkillEnforcerFullCounter extends NiceSkill
abstract; abstract;
var int layersAmount; var int layersAmount;
var float coolDown; var float coolDown;
var float damageReduction; var float damageReduction;
var float damageReductionWeak; var float damageReductionWeak;
function static SkillSelected(NicePlayerController nicePlayer){ function static SkillSelected(NicePlayerController nicePlayer){
local NicePack niceMutator; local NicePack niceMutator;
local NiceHumanPawn nicePawn; local NiceHumanPawn nicePawn;
super.SkillSelected(nicePlayer); super.SkillSelected(nicePlayer);
niceMutator = class'NicePack'.static.Myself(nicePlayer.Level); niceMutator = class'NicePack'.static.Myself(nicePlayer.Level);
if(nicePlayer != none) nicePawn = NiceHumanPawn(nicePlayer.pawn); if(nicePlayer != none)
if(nicePawn != none) nicePawn.hmgShieldLevel = default.layersAmount; nicePawn = NiceHumanPawn(nicePlayer.pawn);
if(niceMutator == none || niceMutator.Role == Role_AUTHORITY) return; if(nicePawn != none)
niceMutator.AddCounter("npHMGFullCounter", Texture'NicePackT.HudCounter.fullCounter', true, default.class); nicePawn.hmgShieldLevel = default.layersAmount;
} if(niceMutator == none || niceMutator.Role == Role_AUTHORITY)
function static SkillDeSelected(NicePlayerController nicePlayer){ return;
local NicePack niceMutator; niceMutator.AddCounter("npHMGFullCounter", Texture'NicePackT.HudCounter.fullCounter', true, default.class);
super.SkillDeSelected(nicePlayer); }
niceMutator = class'NicePack'.static.Myself(nicePlayer.Level); function static SkillDeSelected(NicePlayerController nicePlayer){
if(niceMutator == none || niceMutator.Role == Role_AUTHORITY) return; local NicePack niceMutator;
niceMutator.RemoveCounter("npHMGFullCounter"); super.SkillDeSelected(nicePlayer);
} niceMutator = class'NicePack'.static.Myself(nicePlayer.Level);
function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){ if(niceMutator == none || niceMutator.Role == Role_AUTHORITY)
local NiceHumanPawn nicePawn; return;
if(nicePlayer == none || counterName != "npHMGFullCounter") return 0; niceMutator.RemoveCounter("npHMGFullCounter");
nicePawn = NiceHumanPawn(nicePlayer.pawn); }
if(nicePawn == none) return 0; function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){
return nicePawn.hmgShieldLevel; local NiceHumanPawn nicePawn;
} if(nicePlayer == none || counterName != "npHMGFullCounter")
defaultproperties return 0;
{ layersAmount=5 cooldown=15.000000 SkillName="Full counter" SkillEffects="Gives you 5 protection layers, each of which can block a weak hit. One layer restores 15 seconds after you've been hit. Can't withstand strong attacks or attacks of huge enough zeds." nicePawn = NiceHumanPawn(nicePlayer.pawn);
} if(nicePawn == none)
return 0;
return nicePawn.hmgShieldLevel;
}
defaultproperties
{
layersAmount=5
cooldown=15.000000
SkillName="Full counter"
SkillEffects="Gives you 5 protection layers, each of which can block a weak hit. One layer restores 15 seconds after you've been hit. Can't withstand strong attacks or attacks of huge enough zeds."
}

View File

@ -1,6 +1,9 @@
class NiceSkillEnforcerUnshakable extends NiceSkill class NiceSkillEnforcerUnshakable extends NiceSkill
abstract; abstract;
var float skillResist; var float skillResist;
defaultproperties defaultproperties
{ skillResist=0.150000 SkillName="Unshakable" SkillEffects="Your screen doesn't shake or blur, and you gain 15% resistance to all damage." {
} skillResist=0.150000
SkillName="Unshakable"
SkillEffects="Your screen doesn't shake or blur, and you gain 15% resistance to all damage."
}

View File

@ -1,6 +1,9 @@
class NiceSkillEnforcerUnstoppable extends NiceSkill class NiceSkillEnforcerUnstoppable extends NiceSkill
abstract; abstract;
var float speedMult; var float speedMult;
defaultproperties defaultproperties
{ speedMult=0.750000 SkillName="Unstoppable" SkillEffects="Your speed doesn't decrease from additional weight, low health, poison or siren's pull, but you also receive -25% speed penalty." {
} speedMult=0.750000
SkillName="Unstoppable"
SkillEffects="Your speed doesn't decrease from additional weight, low health, poison or siren's pull, but you also receive -25% speed penalty."
}

View File

@ -1,5 +1,7 @@
class NiceSkillEnforcerZEDBarrage extends NiceSkill class NiceSkillEnforcerZEDBarrage extends NiceSkill
abstract; abstract;
defaultproperties defaultproperties
{ SkillName="Barrage" SkillEffects="Shoot without any recoil during zed-time." {
} SkillName="Barrage"
SkillEffects="Shoot without any recoil during zed-time."
}

View File

@ -1,6 +1,9 @@
class NiceSkillEnforcerZEDJuggernaut extends NiceSkill class NiceSkillEnforcerZEDJuggernaut extends NiceSkill
abstract; abstract;
var float distance; var float distance;
defaultproperties defaultproperties
{ Distance=800.000000 SkillName="Juggernaut" SkillEffects="You startle zeds around you upon entering zed-time." {
} Distance=800.000000
SkillName="Juggernaut"
SkillEffects="You startle zeds around you upon entering zed-time."
}

View File

@ -1,6 +1,9 @@
class NiceSkillHeavyCoating extends NiceSkill class NiceSkillHeavyCoating extends NiceSkill
abstract; abstract;
var float huskResist; var float huskResist;
defaultproperties defaultproperties
{ huskResist=1.000000 SkillName="Coating" SkillEffects="You get immunity from fire and electricity for as long as you wear armor, and your armor can absorb damage from every source." {
} huskResist=1.000000
SkillName="Coating"
SkillEffects="You get immunity from fire and electricity for as long as you wear armor, and your armor can absorb damage from every source."
}

View File

@ -1,6 +1,9 @@
class NiceSkillHeavyOverclocking extends NiceSkill class NiceSkillHeavyOverclocking extends NiceSkill
abstract; abstract;
var float fireSpeedMult; var float fireSpeedMult;
defaultproperties defaultproperties
{ fireSpeedMult=1.300000 SkillName="Overclocking" SkillEffects="+30% fire speed with perked weapons." {
} fireSpeedMult=1.300000
SkillName="Overclocking"
SkillEffects="+30% fire speed with perked weapons."
}

View File

@ -1,6 +1,9 @@
class NiceSkillHeavySafeguard extends NiceSkill class NiceSkillHeavySafeguard extends NiceSkill
abstract; abstract;
var float healingCost; var float healingCost;
defaultproperties defaultproperties
{ healingCost=0.250000 SkillName="Safeguard" SkillEffects="Your armor no longer protects you, but it heals you when your health falls too low." {
} healingCost=0.250000
SkillName="Safeguard"
SkillEffects="Your armor no longer protects you, but it heals you when your health falls too low."
}

View File

@ -1,27 +1,34 @@
class NiceSkillHeavyStablePosition extends NiceSkill class NiceSkillHeavyStablePosition extends NiceSkill
abstract; abstract;
var float recoilDampeningBonus; var float recoilDampeningBonus;
function static SkillSelected(NicePlayerController nicePlayer){ function static SkillSelected(NicePlayerController nicePlayer){
local NicePack niceMutator; local NicePack niceMutator;
super.SkillSelected(nicePlayer); super.SkillSelected(nicePlayer);
niceMutator = class'NicePack'.static.Myself(nicePlayer.Level); niceMutator = class'NicePack'.static.Myself(nicePlayer.Level);
if(niceMutator == none || niceMutator.Role == Role_AUTHORITY) return; if(niceMutator == none || niceMutator.Role == Role_AUTHORITY)
niceMutator.AddCounter("npHMGStablePosition", Texture'NicePackT.HudCounter.stability', false, default.class); return;
} niceMutator.AddCounter("npHMGStablePosition", Texture'NicePackT.HudCounter.stability', false, default.class);
function static SkillDeSelected(NicePlayerController nicePlayer){ }
local NicePack niceMutator; function static SkillDeSelected(NicePlayerController nicePlayer){
super.SkillDeSelected(nicePlayer); local NicePack niceMutator;
niceMutator = class'NicePack'.static.Myself(nicePlayer.Level); super.SkillDeSelected(nicePlayer);
if(niceMutator == none || niceMutator.Role == Role_AUTHORITY) return; niceMutator = class'NicePack'.static.Myself(nicePlayer.Level);
niceMutator.RemoveCounter("npHMGStablePosition"); if(niceMutator == none || niceMutator.Role == Role_AUTHORITY)
} return;
function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){ niceMutator.RemoveCounter("npHMGStablePosition");
local NiceHumanPawn nicePawn; }
if(nicePlayer == none || counterName != "npHMGStablePosition") return 0; function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){
nicePawn = NiceHumanPawn(nicePlayer.pawn); local NiceHumanPawn nicePawn;
if(nicePawn == none || nicePawn.stationaryTime <= 0.0) return 0; if(nicePlayer == none || counterName != "npHMGStablePosition")
return Min(10, Ceil(2 * nicePawn.stationaryTime) - 1); return 0;
} nicePawn = NiceHumanPawn(nicePlayer.pawn);
defaultproperties if(nicePawn == none || nicePawn.stationaryTime <= 0.0)
{ recoilDampeningBonus=0.100000 SkillName="Stable position" SkillEffects="Each half-second you're crouching and now moving - you gain 10% recoil dampening bonus." return 0;
} return Min(10, Ceil(2 * nicePawn.stationaryTime) - 1);
}
defaultproperties
{
recoilDampeningBonus=0.100000
SkillName="Stable position"
SkillEffects="Each half-second you're crouching and now moving - you gain 10% recoil dampening bonus."
}

View File

@ -1,23 +1,31 @@
class NiceSkill extends ReplicationInfo class NiceSkill extends ReplicationInfo
abstract; abstract;
var bool bBroadcast; // Should we broadcast to clients that someone has this skill? var bool bBroadcast; // Should we broadcast to clients that someone has this skill?
var string SkillName, SkillEffects; var string SkillName, SkillEffects;
// Functions that are called when skills becomes active / deactivated // Functions that are called when skills becomes active / deactivated
function static SkillSelected(NicePlayerController nicePlayer){ function static SkillSelected(NicePlayerController nicePlayer){
local NiceHumanPawn nicePawn; local NiceHumanPawn nicePawn;
nicePawn = NiceHumanPawn(nicePlayer.Pawn); nicePawn = NiceHumanPawn(nicePlayer.Pawn);
if(nicePawn != none){ nicePawn.RecalcAmmo(); if(nicePawn.Role < Role_AUTHORITY) nicePawn.ApplyWeaponStats(nicePawn.weapon); if(nicePawn != none){
} nicePawn.RecalcAmmo();
} if(nicePawn.Role < Role_AUTHORITY)
function static SkillDeSelected(NicePlayerController nicePlayer){ nicePawn.ApplyWeaponStats(nicePawn.weapon);
local NiceHumanPawn nicePawn; }
nicePawn = NiceHumanPawn(nicePlayer.Pawn); }
if(nicePawn != none){ nicePawn.RecalcAmmo(); if(nicePawn.Role < Role_AUTHORITY) nicePawn.ApplyWeaponStats(nicePawn.weapon); function static SkillDeSelected(NicePlayerController nicePlayer){
} local NiceHumanPawn nicePawn;
} nicePawn = NiceHumanPawn(nicePlayer.Pawn);
function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){ if(nicePawn != none){
return 0; nicePawn.RecalcAmmo();
} if(nicePawn.Role < Role_AUTHORITY)
defaultproperties nicePawn.ApplyWeaponStats(nicePawn.weapon);
{ SkillName="All Fiction" SkillEffects="Does nothing!" }
} }
function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){
return 0;
}
defaultproperties
{
SkillName="All Fiction"
SkillEffects="Does nothing!"
}

View File

@ -1,16 +1,18 @@
class NiceSkillAbility extends NiceSkill class NiceSkillAbility extends NiceSkill
dependson(NiceAbilityManager) dependson(NiceAbilityManager)
abstract; abstract;
var NiceAbilityManager.NiceAbilityDescription skillAbility; var NiceAbilityManager.NiceAbilityDescription skillAbility;
// Functions that are called when skills becomes active / deactivated // Functions that are called when skills becomes active / deactivated
function static SkillSelected(NicePlayerController nicePlayer){ function static SkillSelected(NicePlayerController nicePlayer){
if(nicePlayer != none && nicePlayer.abilityManager != none) nicePlayer.abilityManager.AddAbility(default.skillAbility); if(nicePlayer != none && nicePlayer.abilityManager != none)
super.SkillSelected(nicePlayer); nicePlayer.abilityManager.AddAbility(default.skillAbility);
} super.SkillSelected(nicePlayer);
function static SkillDeSelected(NicePlayerController nicePlayer){ }
if(nicePlayer != none && nicePlayer.abilityManager != none) nicePlayer.abilityManager.RemoveAbility(default.skillAbility.ID); function static SkillDeSelected(NicePlayerController nicePlayer){
super.SkillDeSelected(nicePlayer); if(nicePlayer != none && nicePlayer.abilityManager != none)
} nicePlayer.abilityManager.RemoveAbility(default.skillAbility.ID);
defaultproperties super.SkillDeSelected(nicePlayer);
{ }
} defaultproperties
{
}

View File

@ -1,20 +1,32 @@
class NiceSkillGenAmmo extends NiceSkill class NiceSkillGenAmmo extends NiceSkill
abstract; abstract;
function static UpdateWeapons(NicePlayerController nicePlayer){ function static UpdateWeapons(NicePlayerController nicePlayer){
local Inventory I; local Inventory I;
local NiceHumanPawn nicePawn; local NiceHumanPawn nicePawn;
nicePawn = NiceHumanPawn(nicePlayer.Pawn); nicePawn = NiceHumanPawn(nicePlayer.Pawn);
if(nicePawn != none){ for(I = nicePawn.Inventory; I != none; I = I.Inventory) if(NiceWeapon(I) != none){ NiceWeapon(I).UpdateWeaponAmmunition(); NiceWeapon(I).ClientUpdateWeaponMag(); } else if(FragAmmo(I) != none){ FragAmmo(I).MaxAmmo = FragAmmo(I).default.MaxAmmo; if(KFPlayerReplicationInfo(nicePawn.PlayerReplicationInfo) != none && KFPlayerReplicationInfo(nicePawn.PlayerReplicationInfo).ClientVeteranSkill != none) FragAmmo(I).MaxAmmo = float(FragAmmo(I).MaxAmmo) * KFPlayerReplicationInfo(nicePawn.PlayerReplicationInfo).ClientVeteranSkill.static.AddExtraAmmoFor(KFPlayerReplicationInfo(nicePawn.PlayerReplicationInfo), class'FragAmmo'); FragAmmo(I).AmmoAmount = Min(FragAmmo(I).AmmoAmount, FragAmmo(I).MaxAmmo); } if(nicePawn != none){
} for(I = nicePawn.Inventory; I != none; I = I.Inventory)
} if(NiceWeapon(I) != none){
function static SkillSelected(NicePlayerController nicePlayer){ NiceWeapon(I).UpdateWeaponAmmunition();
super.SkillSelected(nicePlayer); NiceWeapon(I).ClientUpdateWeaponMag();
UpdateWeapons(nicePlayer); }
} else if(FragAmmo(I) != none){
function static SkillDeSelected(NicePlayerController nicePlayer){ FragAmmo(I).MaxAmmo = FragAmmo(I).default.MaxAmmo;
super.SkillDeSelected(nicePlayer); if(KFPlayerReplicationInfo(nicePawn.PlayerReplicationInfo) != none && KFPlayerReplicationInfo(nicePawn.PlayerReplicationInfo).ClientVeteranSkill != none)
UpdateWeapons(nicePlayer); FragAmmo(I).MaxAmmo = float(FragAmmo(I).MaxAmmo)
} * KFPlayerReplicationInfo(nicePawn.PlayerReplicationInfo).ClientVeteranSkill.static.AddExtraAmmoFor(KFPlayerReplicationInfo(nicePawn.PlayerReplicationInfo), class'FragAmmo');
defaultproperties FragAmmo(I).AmmoAmount = Min(FragAmmo(I).AmmoAmount, FragAmmo(I).MaxAmmo);
{ }
} }
}
function static SkillSelected(NicePlayerController nicePlayer){
super.SkillSelected(nicePlayer);
UpdateWeapons(nicePlayer);
}
function static SkillDeSelected(NicePlayerController nicePlayer){
super.SkillDeSelected(nicePlayer);
UpdateWeapons(nicePlayer);
}
defaultproperties
{
}

View File

@ -1,252 +1,325 @@
class NiceVeterancyTypes extends ScrnVeterancyTypes class NiceVeterancyTypes extends ScrnVeterancyTypes
dependson(NicePlayerController) dependson(NicePlayerController)
abstract; abstract;
// Temporarily needed variable to distinguish between new and old type perks // Temporarily needed variable to distinguish between new and old type perks
var bool bNewTypePerk; var bool bNewTypePerk;
// Skills // Skills
var class<NiceSkill> SkillGroupA[5]; var class<NiceSkill> SkillGroupA[5];
var class<NiceSkill> SkillGroupB[5]; var class<NiceSkill> SkillGroupB[5];
// Checks if player is can use given skill // Checks if player is can use given skill
static function bool CanUseSkill(NicePlayerController nicePlayer, class<NiceSkill> skill){ static function bool CanUseSkill(NicePlayerController nicePlayer, class<NiceSkill> skill){
local int i; local int i;
local int currentLevel; local int currentLevel;
local KFPlayerReplicationInfo KFPRI; local KFPlayerReplicationInfo KFPRI;
local class<NiceVeterancyTypes> niceVet; local class<NiceVeterancyTypes> niceVet;
// Get necessary variables // Get necessary variables
KFPRI = KFPlayerReplicationInfo(nicePlayer.PlayerReplicationInfo); KFPRI = KFPlayerReplicationInfo(nicePlayer.PlayerReplicationInfo);
if(KFPRI == none) return false; if(KFPRI == none)
niceVet = GetVeterancy(nicePlayer.PlayerReplicationInfo); return false;
currentLevel = GetClientVeteranSkillLevel(KFPRI); niceVet = GetVeterancy(nicePlayer.PlayerReplicationInfo);
// Check if we have that skill at appropriate level currentLevel = GetClientVeteranSkillLevel(KFPRI);
for(i = 0;i < 5 && i < currentLevel;i ++) if(niceVet.default.SkillGroupA[i] == skill || niceVet.default.SkillGroupB[i] == skill) return true; // Check if we have that skill at appropriate level
return false; for(i = 0;i < 5 && i < currentLevel;i ++)
} if(niceVet.default.SkillGroupA[i] == skill || niceVet.default.SkillGroupB[i] == skill)
// Checks if player is using given skill return true;
static function bool HasSkill(NicePlayerController nicePlayer, class<NiceSkill> skill){ return false;
local int i; }
local int currentLevel; // Checks if player is using given skill
local KFPlayerReplicationInfo KFPRI; static function bool HasSkill(NicePlayerController nicePlayer, class<NiceSkill> skill){
local class<NiceVeterancyTypes> niceVet; local int i;
local NicePlayerController.SkillChoices choices; local int currentLevel;
// Get necessary variables local KFPlayerReplicationInfo KFPRI;
if(nicePlayer == none || skill == none || !CanUseSkill(nicePlayer, skill)) return false; local class<NiceVeterancyTypes> niceVet;
KFPRI = KFPlayerReplicationInfo(nicePlayer.PlayerReplicationInfo); local NicePlayerController.SkillChoices choices;
if(KFPRI == none) return false; // Get necessary variables
currentLevel = GetClientVeteranSkillLevel(KFPRI); if(nicePlayer == none || skill == none || !CanUseSkill(nicePlayer, skill))
niceVet = GetVeterancy(nicePlayer.PlayerReplicationInfo); return false;
choices = nicePlayer.currentSkills[niceVet.default.PerkIndex]; KFPRI = KFPlayerReplicationInfo(nicePlayer.PlayerReplicationInfo);
// Check our skill is chosen at some level; (since there shouldn't be any duplicates and it can be chosen at some level -> it's active) if(KFPRI == none)
for(i = 0;i < 5 && i < currentLevel;i ++) if((niceVet.default.SkillGroupA[i] == skill && choices.isAltChoice[i] == 0) || (niceVet.default.SkillGroupB[i] == skill && choices.isAltChoice[i] > 0)) return true; return false;
return false; currentLevel = GetClientVeteranSkillLevel(KFPRI);
} niceVet = GetVeterancy(nicePlayer.PlayerReplicationInfo);
static function bool SomeoneHasSkill(NicePlayerController player, class<NiceSkill> skill){ choices = nicePlayer.currentSkills[niceVet.default.PerkIndex];
local int i; // Check our skill is chosen at some level; (since there shouldn't be any duplicates and it can be chosen at some level -> it's active)
local Controller P; for(i = 0;i < 5 && i < currentLevel;i ++)
local NicePlayerController nicePlayer; if((niceVet.default.SkillGroupA[i] == skill && choices.isAltChoice[i] == 0)
if(player == none) return false; || (niceVet.default.SkillGroupB[i] == skill && choices.isAltChoice[i] > 0))
if(player.Pawn.Role == ROLE_Authority) for(P = player.Level.ControllerList; P != none; P = P.nextController){ nicePlayer = NicePlayerController(P); if(nicePlayer != none && HasSkill(nicePlayer, skill) && nicePlayer.Pawn.Health > 0 && !nicePlayer.Pawn.bPendingDelete && nicePlayer.PlayerReplicationInfo.Team == player.PlayerReplicationInfo.Team) return true; } return true;
else for(i = 0;i < player.broadcastedSkills.Length;i ++) if(player.broadcastedSkills[i] == skill) return true; return false;
return false; }
} static function bool SomeoneHasSkill(NicePlayerController player, class<NiceSkill> skill){
// Checks if player will automatically chose given skill at the next opportunity local int i;
static function bool IsSkillPending(NicePlayerController nicePlayer, class<NiceSkill> skill){ local Controller P;
local int i; local NicePlayerController nicePlayer;
local int currentLevel; if(player == none)
local KFPlayerReplicationInfo KFPRI; return false;
local class<NiceVeterancyTypes> niceVet; if(player.Pawn.Role == ROLE_Authority)
local NicePlayerController.SkillChoices choices; for(P = player.Level.ControllerList; P != none; P = P.nextController){
// Get necessary variables nicePlayer = NicePlayerController(P);
if(nicePlayer == none || skill == none || !CanUseSkill(nicePlayer, skill)) return false; if(nicePlayer != none && HasSkill(nicePlayer, skill) && nicePlayer.Pawn.Health > 0 && !nicePlayer.Pawn.bPendingDelete
KFPRI = KFPlayerReplicationInfo(nicePlayer.PlayerReplicationInfo); && nicePlayer.PlayerReplicationInfo.Team == player.PlayerReplicationInfo.Team)
if(KFPRI == none) return false; return true;
currentLevel = GetClientVeteranSkillLevel(KFPRI); }
niceVet = GetVeterancy(nicePlayer.PlayerReplicationInfo); else for(i = 0;i < player.broadcastedSkills.Length;i ++)
choices = nicePlayer.pendingSkills[niceVet.default.PerkIndex]; if(player.broadcastedSkills[i] == skill)
// Check our skill is chosen at some level; (since there shouldn't be any duplicates and it can be chosen at some level -> it's active) return true;
for(i = 0;i < 5;i ++) if((niceVet.default.SkillGroupA[i] == skill && choices.isAltChoice[i] == 0) || (niceVet.default.SkillGroupB[i] == skill && choices.isAltChoice[i] > 0)) return true; return false;
return false; }
} // Checks if player will automatically chose given skill at the next opportunity
// Function that checks if given pickup class is marked as perked for current veterancy static function bool IsSkillPending(NicePlayerController nicePlayer, class<NiceSkill> skill){
static function bool IsPerkedPickup(class<NiceWeaponPickup> pickup){ local int i;
local int i; local int currentLevel;
if(pickup == none) return false; local KFPlayerReplicationInfo KFPRI;
if(pickup.default.CorrespondingPerkIndex == default.PerkIndex) return true; local class<NiceVeterancyTypes> niceVet;
else for(i = 0;i < pickup.default.crossPerkIndecies.Length;i ++) if(pickup.default.crossPerkIndecies[i] == default.PerkIndex) return true; local NicePlayerController.SkillChoices choices;
return false; // Get necessary variables
} if(nicePlayer == none || skill == none || !CanUseSkill(nicePlayer, skill))
static function bool IsPickupLight(class<NiceWeaponPickup> pickup){ return false;
if(pickup != none && pickup.default.Weight <= 8) return true; KFPRI = KFPlayerReplicationInfo(nicePlayer.PlayerReplicationInfo);
return false; if(KFPRI == none)
} return false;
static function bool IsPickupBackup(class<NiceWeaponPickup> pickup){ currentLevel = GetClientVeteranSkillLevel(KFPRI);
if(pickup != none && pickup.default.bBackupWeapon) return true; niceVet = GetVeterancy(nicePlayer.PlayerReplicationInfo);
return false; choices = nicePlayer.pendingSkills[niceVet.default.PerkIndex];
} // Check our skill is chosen at some level; (since there shouldn't be any duplicates and it can be chosen at some level -> it's active)
for(i = 0;i < 5;i ++)
// Set of functions for obtaining a pickup class from various other classes, connected with it if((niceVet.default.SkillGroupA[i] == skill && choices.isAltChoice[i] == 0)
static function class<NiceWeaponPickup> GetPickupFromWeapon(class<Weapon> inputClass){ || (niceVet.default.SkillGroupB[i] == skill && choices.isAltChoice[i] > 0))
local class<NiceWeapon> niceWeaponClass; return true;
niceWeaponClass = class<NiceWeapon>(inputClass); return false;
if(niceWeaponClass == none) return none; }
return class<NiceWeaponPickup>(niceWeaponClass.default.PickupClass); // Function that checks if given pickup class is marked as perked for current veterancy
} static function bool IsPerkedPickup(class<NiceWeaponPickup> pickup){
static function class<NiceWeaponPickup> GetPickupFromAmmo(Class<Ammunition> inputClass){ local int i;
local class<NiceAmmo> niceAmmoClass; if(pickup == none)
niceAmmoClass = class<NiceAmmo>(inputClass); return false;
if(niceAmmoClass == none) return none; if(pickup.default.CorrespondingPerkIndex == default.PerkIndex)
return niceAmmoClass.default.WeaponPickupClass; return true;
} else for(i = 0;i < pickup.default.crossPerkIndecies.Length;i ++)
static function class<NiceWeapon> GetWeaponFromAmmo(Class<Ammunition> inputClass){ if(pickup.default.crossPerkIndecies[i] == default.PerkIndex)
local class<NiceWeaponPickup> nicePickupClass; return true;
nicePickupClass = GetPickupFromAmmo(inputClass); return false;
if(nicePickupClass == none) return none; }
return class<NiceWeapon>(nicePickupClass.default.InventoryType); static function bool IsPickupLight(class<NiceWeaponPickup> pickup){
} if(pickup != none && pickup.default.Weight <= 8)
static function class<NiceWeaponPickup> GetPickupFromDamageType(class<DamageType> inputClass){ return true;
local class<NiceWeaponDamageType> niceDmgTypeClass; return false;
niceDmgTypeClass = class<NiceWeaponDamageType>(inputClass); }
if(niceDmgTypeClass == none) return none; static function bool IsPickupBackup(class<NiceWeaponPickup> pickup){
return GetPickupFromWeapon(class<NiceWeapon>(niceDmgTypeClass.default.WeaponClass)); if(pickup != none && pickup.default.bBackupWeapon)
} return true;
static function class<NiceWeaponPickup> GetPickupFromWeaponFire(WeaponFire fireInstance){ return false;
local NiceFire niceFire; }
niceFire = NiceFire(fireInstance);
if(niceFire == none) return none; // Set of functions for obtaining a pickup class from various other classes, connected with it
return GetPickupFromAmmo(class<NiceAmmo>(niceFire.AmmoClass)); static function class<NiceWeaponPickup> GetPickupFromWeapon(class<Weapon> inputClass){
} local class<NiceWeapon> niceWeaponClass;
// Finds correct veterancy for a player niceWeaponClass = class<NiceWeapon>(inputClass);
static function class<NiceVeterancyTypes> GetVeterancy(PlayerReplicationInfo PRI){ if(niceWeaponClass == none)
local KFPlayerReplicationInfo KFPRI; return none;
KFPRI = KFPlayerReplicationInfo(PRI); return class<NiceWeaponPickup>(niceWeaponClass.default.PickupClass);
if(KFPRI == none || KFPRI.ClientVeteranSkill == none) return none; }
return class<NiceVeterancyTypes>(KFPRI.ClientVeteranSkill); static function class<NiceWeaponPickup> GetPickupFromAmmo(Class<Ammunition> inputClass){
} local class<NiceAmmo> niceAmmoClass;
// New perk progress function niceAmmoClass = class<NiceAmmo>(inputClass);
static function int GetPerkProgressInt(ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum) { if(niceAmmoClass == none)
local int delta, highestFilled; return none;
local int filledLevels; return niceAmmoClass.default.WeaponPickupClass;
local array<int> ProgressArray; }
local int DoubleScalingBase; static function class<NiceWeapon> GetWeaponFromAmmo(Class<Ammunition> inputClass){
if(!default.bNewTypePerk) return Super.GetPerkProgressInt(StatOther, FinalInt, CurLevel, ReqNum); local class<NiceWeaponPickup> nicePickupClass;
else{ ProgressArray = GetProgressArray(ReqNum, DoubleScalingBase); filledLevels = ProgressArray.Length; if(filledLevels > 1) delta = ProgressArray[filledLevels - 1] - ProgressArray[filledLevels - 2]; else if(filledLevels == 1) delta = ProgressArray[0]; else delta = 10; if(filledLevels > 0) highestFilled = ProgressArray[filledLevels - 1]; else highestFilled = 10; if(CurLevel < filledLevels) FinalInt = ProgressArray[CurLevel]; else FinalInt = highestFilled + (CurLevel - filledLevels) * delta; nicePickupClass = GetPickupFromAmmo(inputClass);
} if(nicePickupClass == none)
return Min(GetStatValueInt(StatOther, ReqNum), FinalInt); return none;
} return class<NiceWeapon>(nicePickupClass.default.InventoryType);
// Get head-shot multiplier function that passes zed as a parameter }
static function float GetNiceHeadShotDamMulti(KFPlayerReplicationInfo KFPRI, NiceMonster zed, class<DamageType> DmgType){ static function class<NiceWeaponPickup> GetPickupFromDamageType(class<DamageType> inputClass){
return 1.0; local class<NiceWeaponDamageType> niceDmgTypeClass;
} niceDmgTypeClass = class<NiceWeaponDamageType>(inputClass);
// From which distance can we see enemy's health at given level? if(niceDmgTypeClass == none)
static function float GetMaxHealthDistanceByLevel(int level){ return none;
return 0; return GetPickupFromWeapon(class<NiceWeapon>(niceDmgTypeClass.default.WeaponClass));
} }
// From which distance can we see enemy's health? static function class<NiceWeaponPickup> GetPickupFromWeaponFire(WeaponFire fireInstance){
static function float GetMaxHealthDistance(KFPlayerReplicationInfo KFPRI){ local NiceFire niceFire;
return GetMaxHealthDistanceByLevel(GetClientVeteranSkillLevel(KFPRI)); niceFire = NiceFire(fireInstance);
} if(niceFire == none)
// Allows to increase head-shot check scale for some weapons. return none;
static function float GetHeadshotCheckMultiplier(KFPlayerReplicationInfo KFPRI, class<DamageType> DmgType){ return GetPickupFromAmmo(class<NiceAmmo>(niceFire.AmmoClass));
return 1.0; }
} // Finds correct veterancy for a player
// Allows to buff only regular component of damage. static function class<NiceVeterancyTypes> GetVeterancy(PlayerReplicationInfo PRI){
static function int AddRegDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<NiceWeaponDamageType> DmgType){ local KFPlayerReplicationInfo KFPRI;
return InDamage; KFPRI = KFPlayerReplicationInfo(PRI);
} if(KFPRI == none || KFPRI.ClientVeteranSkill == none)
// Allows to buff only fire component of damage. return none;
static function int AddFireDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<NiceWeaponDamageType> DmgType){ return class<NiceVeterancyTypes>(KFPRI.ClientVeteranSkill);
if(DmgType != none) return InDamage * DmgType.default.heatPart; }
return InDamage; // New perk progress function
} static function int GetPerkProgressInt(ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum) {
static function float stunDurationMult(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, class<NiceWeaponDamageType> DmgType){ local int delta, highestFilled;
return 1.0; local int filledLevels;
} local array<int> ProgressArray;
static function int AddStunScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InStunScore, class<NiceWeaponDamageType> DmgType){ local int DoubleScalingBase;
return InStunScore; if(!default.bNewTypePerk)
} return Super.GetPerkProgressInt(StatOther, FinalInt, CurLevel, ReqNum);
static function int AddFlinchScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InFlinchScore, class<NiceWeaponDamageType> DmgType){ else{
return InFlinchScore; ProgressArray = GetProgressArray(ReqNum, DoubleScalingBase);
} filledLevels = ProgressArray.Length;
// If pawn suffers from slow down effect, how much should we boost/lower it? if(filledLevels > 1)
// 1.0 = leave the same, >1.0 = boost, <1.0 = lower. delta = ProgressArray[filledLevels - 1] - ProgressArray[filledLevels - 2];
static function float SlowingModifier(KFPlayerReplicationInfo KFPRI){ else if(filledLevels == 1)
return 1.0; delta = ProgressArray[0];
} else
// Can player with this perk be pulled by a siren? delta = 10;
static function bool CanBePulled(KFPlayerReplicationInfo KFPRI){ if(filledLevels > 0)
return true; highestFilled = ProgressArray[filledLevels - 1];
} else
// What weight value should be used when calculation Pawn's speed? highestFilled = 10;
static function float GetPerceivedWeight(KFPlayerReplicationInfo KFPRI, KFWeapon other){ if(CurLevel < filledLevels)
if(other != none) return other.weight; FinalInt = ProgressArray[CurLevel];
return 0; else
} FinalInt = highestFilled + (CurLevel - filledLevels) * delta;
// A new, universal, penetration reduction function that is used by all 'NiceWeapon' subclasses }
static function float GetPenetrationDamageMulti(KFPlayerReplicationInfo KFPRI, float DefaultPenDamageReduction, class<NiceWeaponDamageType> fireIntance){ return Min(GetStatValueInt(StatOther, ReqNum), FinalInt);
return DefaultPenDamageReduction; }
} // Get head-shot multiplier function that passes zed as a parameter
// Universal cost scaling for all perks static function float GetNiceHeadShotDamMulti(KFPlayerReplicationInfo KFPRI, NiceMonster zed, class<DamageType> DmgType){
static function float GetCostScaling(KFPlayerReplicationInfo KFPRI, class<Pickup> Item){ return 1.0;
/*local class<NiceWeaponPickup> pickupClass; }
pickupClass = class<NiceWeaponPickup>(Item); // From which distance can we see enemy's health at given level?
if(IsPerkedPickup(pickupClass)) return 0.5;*/ static function float GetMaxHealthDistanceByLevel(int level){
return 1.0; return 0;
} }
static function bool ShowStalkers(KFPlayerReplicationInfo KFPRI){ // From which distance can we see enemy's health?
return GetStalkerViewDistanceMulti(KFPRI) > 0; static function float GetMaxHealthDistance(KFPlayerReplicationInfo KFPRI){
} return GetMaxHealthDistanceByLevel(GetClientVeteranSkillLevel(KFPRI));
static function float GetStalkerViewDistanceMulti(KFPlayerReplicationInfo KFPRI){ }
if(SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoStrategist')) return class'NiceSkillCommandoStrategist'.default.visionRadius; // Allows to increase head-shot check scale for some weapons.
return 0.0; static function float GetHeadshotCheckMultiplier(KFPlayerReplicationInfo KFPRI, class<DamageType> DmgType){
} return 1.0;
// Modify distance at which health bars can be seen; 1.0 = 800 units, max = 2000 units = 2.5 }
static function float GetHealthBarsDistanceMulti(KFPlayerReplicationInfo KFPRI){ // Allows to buff only regular component of damage.
if(KFPRI != none && SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoStrategist')) return class'NiceSkillCommandoStrategist'.default.visionRadius; static function int AddRegDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<NiceWeaponDamageType> DmgType){
return 0.0; return InDamage;
} }
static function int GetAdditionalPenetrationAmount(KFPlayerReplicationInfo KFPRI){ // Allows to buff only fire component of damage.
return 0; static function int AddFireDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<NiceWeaponDamageType> DmgType){
} if(DmgType != none)
static function int GetInvincibilityExtentions(KFPlayerReplicationInfo KFPRI){ return InDamage * DmgType.default.heatPart;
return 0; return InDamage;
} }
static function int GetInvincibilityDuration(KFPlayerReplicationInfo KFPRI){ static function float stunDurationMult(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, class<NiceWeaponDamageType> DmgType){
return 2.0; return 1.0;
} }
static function int GetInvincibilitySafeMisses(KFPlayerReplicationInfo KFPRI){ static function int AddStunScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InStunScore, class<NiceWeaponDamageType> DmgType){
return 0; return InStunScore;
} }
static function SpecialHUDInfo(KFPlayerReplicationInfo KFPRI, Canvas C){ static function int AddFlinchScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InFlinchScore, class<NiceWeaponDamageType> DmgType){
local KFMonster KFEnemy; return InFlinchScore;
local HUDKillingFloor HKF; }
local float MaxDistanceSquared; // If pawn suffers from slow down effect, how much should we boost/lower it?
MaxDistanceSquared = 640000; // 1.0 = leave the same, >1.0 = boost, <1.0 = lower.
MaxDistanceSquared *= GetHealthBarsDistanceMulti(KFPRI)**2; static function float SlowingModifier(KFPlayerReplicationInfo KFPRI){
HKF = HUDKillingFloor(C.ViewPort.Actor.myHUD); return 1.0;
if(HKF == none || C.ViewPort.Actor.Pawn == none || MaxDistanceSquared <= 0) return; }
foreach C.ViewPort.Actor.DynamicActors(class'KFMonster', KFEnemy){ if(KFEnemy.Health > 0 && (!KFEnemy.Cloaked() || KFEnemy.bZapped || KFEnemy.bSpotted) && VSizeSquared(KFEnemy.Location - C.ViewPort.Actor.Pawn.Location) < MaxDistanceSquared) HKF.DrawHealthBar(C, KFEnemy, KFEnemy.Health, KFEnemy.HealthMax , 50.0); // Can player with this perk be pulled by a siren?
} static function bool CanBePulled(KFPlayerReplicationInfo KFPRI){
} return true;
// Is player standing still? }
static function bool IsStandingStill(KFPlayerReplicationInfo KFPRI){ // What weight value should be used when calculation Pawn's speed?
if(KFPRI != none && PlayerController(KFPRI.Owner) != none && PlayerController(KFPRI.Owner).Pawn != none && VSize(PlayerController(KFPRI.Owner).Pawn.Velocity) > 0.0) return false; static function float GetPerceivedWeight(KFPlayerReplicationInfo KFPRI, KFWeapon other){
return true; if(other != none)
} return other.weight;
// Is player aiming? return 0;
static function bool IsAiming(KFPlayerReplicationInfo KFPRI){ }
local KFWeapon kfWeap; // A new, universal, penetration reduction function that is used by all 'NiceWeapon' subclasses
if(KFPRI != none && PlayerController(KFPRI.Owner) != none && PlayerController(KFPRI.Owner).Pawn != none) kfWeap = KFWeapon(PlayerController(KFPRI.Owner).Pawn.weapon); static function float GetPenetrationDamageMulti(KFPlayerReplicationInfo KFPRI, float DefaultPenDamageReduction, class<NiceWeaponDamageType> fireIntance){
if(kfWeap == none) return false; return DefaultPenDamageReduction;
return kfWeap.bAimingRifle; }
} // Universal cost scaling for all perks
// Just display the same fixed bonuses for the new type perks static function float GetCostScaling(KFPlayerReplicationInfo KFPRI, class<Pickup> Item){
static function string GetVetInfoText(byte Level, byte Type, optional byte RequirementNum){ /*local class<NiceWeaponPickup> pickupClass;
if(Type == 1 && default.bNewTypePerk) return default.CustomLevelInfo; pickupClass = class<NiceWeaponPickup>(Item);
return Super.GetVetInfoText(Level, Type, RequirementNum); if(IsPerkedPickup(pickupClass))
} return 0.5;*/
static function class<Grenade> GetNadeType(KFPlayerReplicationInfo KFPRI){ return 1.0;
return class'NicePack.NiceNade'; }
} static function bool ShowStalkers(KFPlayerReplicationInfo KFPRI){
static function SetupAbilities(KFPlayerReplicationInfo KFPRI){} return GetStalkerViewDistanceMulti(KFPRI) > 0;
defaultproperties }
{ SkillGroupA(0)=Class'NicePack.NiceSkill' SkillGroupA(1)=Class'NicePack.NiceSkill' SkillGroupA(2)=Class'NicePack.NiceSkill' SkillGroupA(3)=Class'NicePack.NiceSkill' SkillGroupA(4)=Class'NicePack.NiceSkill' SkillGroupB(0)=Class'NicePack.NiceSkill' SkillGroupB(1)=Class'NicePack.NiceSkill' SkillGroupB(2)=Class'NicePack.NiceSkill' SkillGroupB(3)=Class'NicePack.NiceSkill' SkillGroupB(4)=Class'NicePack.NiceSkill' static function float GetStalkerViewDistanceMulti(KFPlayerReplicationInfo KFPRI){
} if(SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoStrategist'))
return class'NiceSkillCommandoStrategist'.default.visionRadius;
return 0.0;
}
// Modify distance at which health bars can be seen; 1.0 = 800 units, max = 2000 units = 2.5
static function float GetHealthBarsDistanceMulti(KFPlayerReplicationInfo KFPRI){
if(KFPRI != none && SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoStrategist'))
return class'NiceSkillCommandoStrategist'.default.visionRadius;
return 0.0;
}
static function int GetAdditionalPenetrationAmount(KFPlayerReplicationInfo KFPRI){
return 0;
}
static function int GetInvincibilityExtentions(KFPlayerReplicationInfo KFPRI){
return 0;
}
static function int GetInvincibilityDuration(KFPlayerReplicationInfo KFPRI){
return 2.0;
}
static function int GetInvincibilitySafeMisses(KFPlayerReplicationInfo KFPRI){
return 0;
}
static function SpecialHUDInfo(KFPlayerReplicationInfo KFPRI, Canvas C){
local KFMonster KFEnemy;
local HUDKillingFloor HKF;
local float MaxDistanceSquared;
MaxDistanceSquared = 640000;
MaxDistanceSquared *= GetHealthBarsDistanceMulti(KFPRI)**2;
HKF = HUDKillingFloor(C.ViewPort.Actor.myHUD);
if(HKF == none || C.ViewPort.Actor.Pawn == none || MaxDistanceSquared <= 0)
return;
foreach C.ViewPort.Actor.DynamicActors(class'KFMonster', KFEnemy){
if(KFEnemy.Health > 0 && (!KFEnemy.Cloaked() || KFEnemy.bZapped || KFEnemy.bSpotted) && VSizeSquared(KFEnemy.Location - C.ViewPort.Actor.Pawn.Location) < MaxDistanceSquared)
HKF.DrawHealthBar(C, KFEnemy, KFEnemy.Health, KFEnemy.HealthMax , 50.0);
}
}
// Is player standing still?
static function bool IsStandingStill(KFPlayerReplicationInfo KFPRI){
if(KFPRI != none && PlayerController(KFPRI.Owner) != none && PlayerController(KFPRI.Owner).Pawn != none && VSize(PlayerController(KFPRI.Owner).Pawn.Velocity) > 0.0)
return false;
return true;
}
// Is player aiming?
static function bool IsAiming(KFPlayerReplicationInfo KFPRI){
local KFWeapon kfWeap;
if(KFPRI != none && PlayerController(KFPRI.Owner) != none && PlayerController(KFPRI.Owner).Pawn != none)
kfWeap = KFWeapon(PlayerController(KFPRI.Owner).Pawn.weapon);
if(kfWeap == none)
return false;
return kfWeap.bAimingRifle;
}
// Just display the same fixed bonuses for the new type perks
static function string GetVetInfoText(byte Level, byte Type, optional byte RequirementNum){
if(Type == 1 && default.bNewTypePerk)
return default.CustomLevelInfo;
return Super.GetVetInfoText(Level, Type, RequirementNum);
}
static function class<Grenade> GetNadeType(KFPlayerReplicationInfo KFPRI){
return class'NicePack.NiceNade';
}
static function SetupAbilities(KFPlayerReplicationInfo KFPRI){}
defaultproperties
{
SkillGroupA(0)=Class'NicePack.NiceSkill'
SkillGroupA(1)=Class'NicePack.NiceSkill'
SkillGroupA(2)=Class'NicePack.NiceSkill'
SkillGroupA(3)=Class'NicePack.NiceSkill'
SkillGroupA(4)=Class'NicePack.NiceSkill'
SkillGroupB(0)=Class'NicePack.NiceSkill'
SkillGroupB(1)=Class'NicePack.NiceSkill'
SkillGroupB(2)=Class'NicePack.NiceSkill'
SkillGroupB(3)=Class'NicePack.NiceSkill'
SkillGroupB(4)=Class'NicePack.NiceSkill'
}

View File

@ -1,9 +1,10 @@
class NiceDamageTypeVetSharpshooter extends NiceWeaponDamageType class NiceDamageTypeVetSharpshooter extends NiceWeaponDamageType
abstract; abstract;
static function ScoredNiceHeadshot(KFSteamStatsAndAchievements KFStatsAndAchievements, class<KFMonster> monsterClass, int HL){ static function ScoredNiceHeadshot(KFSteamStatsAndAchievements KFStatsAndAchievements, class<KFMonster> monsterClass, int HL){
if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none) SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetSharpshooterExp', Int(class'NicePack'.default.vetSharpHeadshotExpCost * getScale(HL))); if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none)
super.ScoredNiceHeadshot(KFStatsAndAchievements, monsterClass, HL); SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetSharpshooterExp', Int(class'NicePack'.default.vetSharpHeadshotExpCost * getScale(HL)));
} super.ScoredNiceHeadshot(KFStatsAndAchievements, monsterClass, HL);
defaultproperties }
{ defaultproperties
} {
}

View File

@ -1,4 +1,5 @@
class NiceVetSharpshooterExp extends SRCustomProgressInt; class NiceVetSharpshooterExp extends SRCustomProgressInt;
defaultproperties defaultproperties
{ ProgressName="Sharpshooter exp." {
} ProgressName="Sharpshooter exp."
}

View File

@ -1,56 +1,111 @@
class NiceTSCGame extends TSCGame; class NiceTSCGame extends TSCGame;
// Copy-pasted from NiceGameType // Copy-pasted from NiceGameType
var NicePack NicePackMutator; var NicePack NicePackMutator;
function RegisterMutator(NicePack activePack){ function RegisterMutator(NicePack activePack){
NicePackMutator = activePack; NicePackMutator = activePack;
} }
function SetupWave(){ function SetupWave(){
Super.SetupWave(); Super.SetupWave();
// Event call // Event call
NicePackMutator.WaveStart(); NicePackMutator.WaveStart();
} }
function RestartPlayer(Controller aPlayer){ function RestartPlayer(Controller aPlayer){
Super.RestartPlayer(aPlayer); Super.RestartPlayer(aPlayer);
if(aPlayer.Pawn != none && NicePlayerController(aPlayer) != none) NicePlayerController(aPlayer).PawnSpawned(); if(aPlayer.Pawn != none && NicePlayerController(aPlayer) != none)
} NicePlayerController(aPlayer).PawnSpawned();
State MatchInProgress{ }
function BeginState(){ Super(Invasion).BeginState(); State MatchInProgress{
WaveNum = InitialWave; InvasionGameReplicationInfo(GameReplicationInfo).WaveNumber = WaveNum; function BeginState(){
if(NicePackMutator.bInitialTrader) WaveCountDown = NicePackMutator.initialTraderTime + 10; else WaveCountDown = 10; Super(Invasion).BeginState();
SetupPickups(); // Event call NicePackMutator.MatchBegan();
} WaveNum = InitialWave;
function DoWaveEnd(){ Super.DoWaveEnd(); // Event call NicePackMutator.TraderStart(); InvasionGameReplicationInfo(GameReplicationInfo).WaveNumber = WaveNum;
}
} if(NicePackMutator.bInitialTrader)
function DramaticEvent(float BaseZedTimePossibility, optional float DesiredZedTimeDuration){ WaveCountDown = NicePackMutator.initialTraderTime + 10;
local bool bWasZedTime; else
bWasZedTime = bZEDTimeActive; WaveCountDown = 10;
Super.DramaticEvent(BaseZedTimePossibility, DesiredZedTimeDuration);
// Call events SetupPickups();
if(!bWasZedTime && bZEDTimeActive) NicePackMutator.ZedTimeActivated(); // Event call
} NicePackMutator.MatchBegan();
event Tick(float DeltaTime){ }
local float TrueTimeFactor; function DoWaveEnd(){
local Controller C; Super.DoWaveEnd();
if(bZEDTimeActive){ TrueTimeFactor = 1.1 / Level.TimeDilation; CurrentZEDTimeDuration -= DeltaTime * TrueTimeFactor; if(CurrentZEDTimeDuration < (ZEDTimeDuration*0.166) && CurrentZEDTimeDuration > 0 ){ if(!bSpeedingBackUp){ bSpeedingBackUp = true; // Event call
for(C = Level.ControllerList;C != none;C = C.NextController){ if(KFPlayerController(C)!= none) KFPlayerController(C).ClientExitZedTime(); } } SetGameSpeed(Lerp( (CurrentZEDTimeDuration/(ZEDTimeDuration*0.166)), 1.0, 0.2 )); } if(CurrentZEDTimeDuration <= 0){ if(bZEDTimeActive) NicePackMutator.ZedTimeDeactivated(); bZEDTimeActive = false; bSpeedingBackUp = false; SetGameSpeed(1.0); ZedTimeExtensionsUsed = 0; } NicePackMutator.TraderStart();
} }
} }
function Killed(Controller Killer, Controller Killed, Pawn KilledPawn, class<DamageType> dmgType){ function DramaticEvent(float BaseZedTimePossibility, optional float DesiredZedTimeDuration){
local KFSteamStatsAndAchievements StatsAndAchievements; local bool bWasZedTime;
Super.Killed(Killer, Killed, KilledPawn, dmgType); bWasZedTime = bZEDTimeActive;
if(PlayerController(Killer) != none){ if (NiceMonster(KilledPawn) != none && Killed != Killer){ StatsAndAchievements = KFSteamStatsAndAchievements(PlayerController(Killer).SteamStatsAndAchievements); if(StatsAndAchievements != none){ if(KilledPawn.IsA('NiceZombieStalker') || KilledPawn.IsA('MeanZombieStalker')){ if(class<NiceDamTypeWinchester>(dmgType) != none) StatsAndAchievements.AddStalkerKillWithLAR(); } else if(KilledPawn.IsA('NiceZombieClot') || KilledPawn.IsA('MeanZombieClot')){ if(class<NiceDamTypeWinchester>(dmgType) != none) KFSteamStatsAndAchievements(PlayerController(Killer).SteamStatsAndAchievements).AddClotKillWithLAR(); } } } Super.DramaticEvent(BaseZedTimePossibility, DesiredZedTimeDuration);
} // Call events
} if(!bWasZedTime && bZEDTimeActive)
// Reloaded to award damage NicePackMutator.ZedTimeActivated();
function int ReduceDamage(int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType){ }
local NiceMonster niceZed; event Tick(float DeltaTime){
local KFPlayerController PC; local float TrueTimeFactor;
niceZed = NiceMonster(Injured); local Controller C;
if(niceZed != none){ if(instigatedBy != none){ PC = KFPlayerController(instigatedBy.Controller); if(class<NiceWeaponDamageType>(damageType) != none && PC != none) class<NiceWeaponDamageType>(damageType).Static.AwardNiceDamage(KFSteamStatsAndAchievements(PC.SteamStatsAndAchievements), Clamp(Damage, 1, Injured.Health), niceZed.scrnRules.HardcoreLevel); } if(bZEDTimeActive){
} TrueTimeFactor = 1.1 / Level.TimeDilation;
return Super.ReduceDamage(Damage, injured, InstigatedBy, HitLocation, Momentum, DamageType); CurrentZEDTimeDuration -= DeltaTime * TrueTimeFactor;
} if(CurrentZEDTimeDuration < (ZEDTimeDuration*0.166) && CurrentZEDTimeDuration > 0 ){
defaultproperties if(!bSpeedingBackUp){
{ GameName="Nice Team Survival Competition" Description="Nice Edition of Team Survival Competition (TSCGame)." bSpeedingBackUp = true;
}
for(C = Level.ControllerList;C != none;C = C.NextController){
if(KFPlayerController(C)!= none)
KFPlayerController(C).ClientExitZedTime();
}
}
SetGameSpeed(Lerp( (CurrentZEDTimeDuration/(ZEDTimeDuration*0.166)), 1.0, 0.2 ));
}
if(CurrentZEDTimeDuration <= 0){
if(bZEDTimeActive)
NicePackMutator.ZedTimeDeactivated();
bZEDTimeActive = false;
bSpeedingBackUp = false;
SetGameSpeed(1.0);
ZedTimeExtensionsUsed = 0;
}
}
}
function Killed(Controller Killer, Controller Killed, Pawn KilledPawn, class<DamageType> dmgType){
local KFSteamStatsAndAchievements StatsAndAchievements;
Super.Killed(Killer, Killed, KilledPawn, dmgType);
if(PlayerController(Killer) != none){
if (NiceMonster(KilledPawn) != none && Killed != Killer){
StatsAndAchievements = KFSteamStatsAndAchievements(PlayerController(Killer).SteamStatsAndAchievements);
if(StatsAndAchievements != none){
if(KilledPawn.IsA('NiceZombieStalker') || KilledPawn.IsA('MeanZombieStalker')){
if(class<NiceDamTypeWinchester>(dmgType) != none)
StatsAndAchievements.AddStalkerKillWithLAR();
}
else if(KilledPawn.IsA('NiceZombieClot') || KilledPawn.IsA('MeanZombieClot')){
if(class<NiceDamTypeWinchester>(dmgType) != none)
KFSteamStatsAndAchievements(PlayerController(Killer).SteamStatsAndAchievements).AddClotKillWithLAR();
}
}
}
}
}
// Reloaded to award damage
function int ReduceDamage(int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType){
local NiceMonster niceZed;
local KFPlayerController PC;
niceZed = NiceMonster(Injured);
if(niceZed != none){
if(instigatedBy != none){
PC = KFPlayerController(instigatedBy.Controller);
if(class<NiceWeaponDamageType>(damageType) != none && PC != none)
class<NiceWeaponDamageType>(damageType).Static.AwardNiceDamage(KFSteamStatsAndAchievements(PC.SteamStatsAndAchievements), Clamp(Damage, 1, Injured.Health), niceZed.scrnRules.HardcoreLevel);
}
}
return Super.ReduceDamage(Damage, injured, InstigatedBy, HitLocation, Momentum, DamageType);
}
defaultproperties
{
GameName="Nice Team Survival Competition"
Description="Nice Edition of Team Survival Competition (TSCGame)."
}

Some files were not shown because too many files have changed in this diff Show More