First commit
This commit is contained in:
commit
5b48414900
263 changed files with 24830 additions and 0 deletions
14
sources/Weapons/Playable/Grenades/NiceBallisticNade.uc
Normal file
14
sources/Weapons/Playable/Grenades/NiceBallisticNade.uc
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class NiceBallisticNade extends NiceBullet;
|
||||
defaultproperties
|
||||
{
|
||||
//charMinExplosionDist=250.000000
|
||||
bDisableComplexMovement=False
|
||||
//movementAcceleration=(Z=-490.000000)
|
||||
//movementFallTime=1.000000
|
||||
TrailClass=Class'ROEffects.PanzerfaustTrail'
|
||||
trailXClass=None
|
||||
explosionImpact=(bImportanEffect=True,decalClass=Class'KFMod.KFScorchMark',EmitterClass=Class'KFMod.KFNadeLExplosion',emitterShiftWall=20.000000,emitterShiftPawn=20.000000,noiseRef="KF_GrenadeSnd.Nade_Explode_1",noiseVolume=2.000000)
|
||||
disintegrationImpact=(EmitterClass=Class'KFMod.SirenNadeDeflect',noiseRef="Inf_Weapons.faust_explode_distant02",noiseVolume=2.000000)
|
||||
//StaticMeshRef="kf_generic_sm.40mm_Warhead"
|
||||
DrawScale=3.000000
|
||||
}
|
||||
88
sources/Weapons/Playable/Grenades/NiceCryoNade.uc
Normal file
88
sources/Weapons/Playable/Grenades/NiceCryoNade.uc
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
// ScrN copy
|
||||
class NiceCryoNade extends Nade;
|
||||
#exec OBJ LOAD FILE=KF_GrenadeSnd.uax
|
||||
#exec OBJ LOAD FILE=Inf_WeaponsTwo.uax
|
||||
#exec OBJ LOAD FILE=KF_LAWSnd.uax
|
||||
// How many times do freezing
|
||||
var int totalFreezes;
|
||||
// How often to do freezeing
|
||||
var float freezeRate;
|
||||
// The next time that this nade will freeze
|
||||
var float nextFreezeTime;
|
||||
// The sound of nade's explosion
|
||||
var sound explosionSound;
|
||||
// Whether or not effects have been played yet
|
||||
var bool bNeedToPlayEffects;
|
||||
replication
|
||||
{
|
||||
reliable if (Role==ROLE_Authority)
bNeedToPlayEffects;
|
||||
}
|
||||
simulated function PostNetReceive()
|
||||
{
|
||||
super.PostNetReceive();
|
||||
if(!bHasExploded && bNeedToPlayEffects){
bNeedToPlayEffects = false;
Explode(Location, vect(0,0,1));
|
||||
}
|
||||
}
|
||||
simulated function Explode(vector hitLocation, vector hitNormal){
|
||||
bHasExploded = true;
|
||||
BlowUp(hitLocation);
|
||||
PlaySound(ExplosionSound,,TransientSoundVolume);
|
||||
if(Role == ROLE_Authority){
bNeedToPlayEffects = true;
AmbientSound=Sound'Inf_WeaponsTwo.smoke_loop';
|
||||
}
|
||||
if(EffectIsRelevant(location, false)){
Spawn(class'NiceCryoNadeCloud',,, hitLocation, rotator(vect(0,0,1)));
Spawn(explosionDecal, self,, hitLocation, rotator(-hitNormal));
if(level.detailMode >= DM_High)
Spawn(class'NiceNitroGroundEffect', self,, location);
|
||||
}
|
||||
}
|
||||
function Timer(){
|
||||
if(!bHidden){
if(!bHasExploded)
Explode(location, vect(0,0,1));
|
||||
}
|
||||
else if(bDisintegrated){
AmbientSound = none;
Destroy();
|
||||
}
|
||||
}
|
||||
simulated function BlowUp(vector hitLocation){
|
||||
DoFreeze(damage, damageRadius, MyDamageType, momentumTransfer, hitLocation);
|
||||
if(role == ROLE_Authority)
MakeNoise(1.0);
|
||||
}
|
||||
function DoFreeze( float DamageAmount, float DamageRadius,
class<DamageType> DamageType,
float Momentum, vector HitLocation){
|
||||
local NiceMonster niceZed;
|
||||
if(bHurtEntry)
return;
|
||||
bHurtEntry = true;
|
||||
nextFreezeTime = level.timeSeconds + freezeRate;
|
||||
foreach CollidingActors(class 'NiceMonster', niceZed,
damageRadius, hitLocation){
if(niceZed.Health <= 0) continue;
if(instigator == none || instigator.controller == none)
niceZed.SetDelayedDamageInstigatorController(instigatorController);
niceZed.TakeDamage( damageAmount, instigator, niceZed.location,
vect(0,0,0), damageType);
|
||||
}
|
||||
bHurtEntry = false;
|
||||
}
|
||||
function TakeDamage(int Damage, Pawn InstigatedBy, Vector hitlocation,
Vector momentum, class<DamageType> damageType,
optional int HitIndex){
|
||||
if(damageType == class'SirenScreamDamage')
Disintegrate(HitLocation, vect(0,0,1));
|
||||
}
|
||||
// Overridden to tweak the handling of the impact sound
|
||||
simulated function HitWall(vector hitNormal, Actor wall){
|
||||
local Vector vnorm;
|
||||
local PlayerController player;
|
||||
if(Pawn(wall) != none || GameObjective(wall) != none){
Explode(Location, HitNormal);
return;
|
||||
}
|
||||
if(!bTimerSet){
SetTimer(ExplodeTimer, false);
bTimerSet = true;
|
||||
}
|
||||
// Reflect off Wall w/damping
|
||||
vnorm = (velocity dot hitNormal) * hitNormal;
|
||||
Velocity = -vnorm * DampenFactor +
(Velocity - vnorm) * dampenFactorParallel;
|
||||
RandSpin(100000);
|
||||
desiredRotation.roll = 0;
|
||||
RotationRate.roll = 0;
|
||||
speed = VSize(velocity);
|
||||
if(speed < 20){
bBounce = False;
PrePivot.Z = -1.5;
SetPhysics(PHYS_None);
Timer();
SetTimer(0.0,False);
desiredRotation = Rotation;
desiredRotation.Roll = 0;
desiredRotation.Pitch = 0;
SetRotation(desiredRotation);
if(trail != none)
trail.mRegen = false;
return;
|
||||
}
|
||||
if(level.NetMode != NM_DedicatedServer && Speed > 50)
PlaySound(ImpactSound, SLOT_Misc );
|
||||
else{
bFixedRotationDir = false;
bRotateToDesired = true;
DesiredRotation.Pitch = 0;
RotationRate.Pitch = 50000;
|
||||
}
|
||||
|
||||
if(level.bDropDetail || level.DetailMode == DM_Low)
return;
|
||||
if( (level.TimeSeconds - lastSparkTime > 0.5)
&& EffectIsRelevant(location, false)){
player = level.GetLocalPlayerController();
if( player.viewTarget != none
&& VSize(player.viewTarget.location - location) < 6000)
Spawn(HitEffectClass,,, Location, Rotator(HitNormal));
LastSparkTime = Level.TimeSeconds;
|
||||
}
|
||||
}
|
||||
function Tick(float deltaTime){
|
||||
if( totalFreezes > 0 && nextFreezeTime > 0
&& nextFreezeTime < level.timeSeconds){
totalFreezes--;
DoFreeze(damage, damageRadius, myDamageType, momentumTransfer, location);
if(totalFreezes == 0)
ambientSound = none;
|
||||
}
|
||||
}
|
||||
defaultproperties
|
||||
{
totalFreezes=100
freezeRate=0.030000
ExplosionSound=SoundGroup'KF_GrenadeSnd.NadeBase.MedicNade_Explode'
Damage=0.000000
DamageRadius=175.000000
MyDamageType=Class'NicePack.NiceDamTypeCryoNade'
ExplosionDecal=Class'NicePack.NiceNitroDecal'
StaticMesh=StaticMesh'KF_pickups5_Trip.nades.MedicNade_Pickup'
LifeSpan=8.000000
DrawScale=1.000000
SoundVolume=150
SoundRadius=100.000000
TransientSoundVolume=2.000000
TransientSoundRadius=200.000000
|
||||
}
|
||||
23
sources/Weapons/Playable/Grenades/NiceCryoNadeCloud.uc
Normal file
23
sources/Weapons/Playable/Grenades/NiceCryoNadeCloud.uc
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// ScrN copy
|
||||
class NiceCryoNadeCloud extends Emitter;
|
||||
var bool bFlashed;
|
||||
simulated function PostBeginPlay(){
|
||||
super.PostBeginPlay();
|
||||
NadeLight();
|
||||
}
|
||||
simulated function NadeLight(){
|
||||
if(instigator == none) return;
|
||||
if(Level.bDropDetail) return;
|
||||
if( (Level.TimeSeconds - LastRenderTime < 0.2)
|| (PlayerController(instigator.controller) != none)){
|
||||
bDynamicLight = true;
|
||||
SetTimer(0.25, false);
|
||||
}
|
||||
else
Timer();
|
||||
}
|
||||
simulated function Timer(){
|
||||
bDynamicLight = false;
|
||||
}
|
||||
defaultproperties
|
||||
{
Begin Object Class=SpriteEmitter Name=SpriteEmitter0
UseColorScale=True
RespawnDeadParticles=False
SpinParticles=True
UseSizeScale=True
UseRegularSizeScale=False
UniformSize=True
AutomaticInitialSpawning=False
BlendBetweenSubdivisions=True
ColorScale(0)=(Color=(B=255,G=235,R=215,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=245,G=225,R=205,A=255))
FadeOutFactor=(W=0.000000,X=0.000000,Y=0.000000,Z=0.000000)
FadeOutStartTime=5.000000
SpinsPerSecondRange=(Y=(Min=0.050000,Max=0.100000),Z=(Min=0.050000,Max=0.100000))
StartSpinRange=(X=(Min=-0.500000,Max=0.500000),Y=(Max=1.000000),Z=(Max=1.000000))
SizeScale(0)=(RelativeSize=1.000000)
SizeScale(1)=(RelativeTime=1.000000,RelativeSize=5.000000)
StartSizeRange=(X=(Min=40.000000,Max=40.000000),Y=(Min=40.000000,Max=40.000000),Z=(Min=40.000000,Max=40.000000))
InitialParticlesPerSecond=5000.000000
DrawStyle=PTDS_AlphaBlend
Texture=Texture'kf_fx_trip_t.Misc.smoke_animated'
TextureUSubdivisions=8
TextureVSubdivisions=8
LifetimeRange=(Min=3.000000,Max=3.000000)
StartVelocityRange=(X=(Min=-750.000000,Max=750.000000),Y=(Min=-750.000000,Max=750.000000))
VelocityLossRange=(X=(Min=10.000000,Max=10.000000),Y=(Min=10.000000,Max=10.000000),Z=(Min=10.000000,Max=10.000000))
End Object
Emitters(0)=SpriteEmitter'NicePack.NiceCryoNadeCloud.SpriteEmitter0'
|
||||
AutoDestroy=True
bNoDelete=False
RemoteRole=ROLE_SimulatedProxy
bNotOnDedServer=False
|
||||
}
|
||||
5
sources/Weapons/Playable/Grenades/NiceDamTypeCryoNade.uc
Normal file
5
sources/Weapons/Playable/Grenades/NiceDamTypeCryoNade.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class NiceDamTypeCryoNade extends NiceWeaponDamageType
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
freezePower=200.000000
|
||||
}
|
||||
28
sources/Weapons/Playable/Grenades/NiceDamTypeEnforcerNade.uc
Normal file
28
sources/Weapons/Playable/Grenades/NiceDamTypeEnforcerNade.uc
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
class NiceDamTypeEnforcerNade extends NiceDamageTypeVetEnforcer
|
||||
abstract;
|
||||
static function GetHitEffects(out class<xEmitter> HitEffects[4], int VictimHealth){
|
||||
HitEffects[0] = class'HitSmoke';
|
||||
if(VictimHealth <= 0)
|
||||
HitEffects[1] = class'KFHitFlame';
|
||||
else if(FRand() < 0.8)
|
||||
HitEffects[1] = class'KFHitFlame';
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
bIsExplosive=True
|
||||
bCheckForHeadShots=False
|
||||
//WeaponClass=Class'NicePack.NiceShotgun'//meantodo
|
||||
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=2500.000000
|
||||
KDeathVel=300.000000
|
||||
KDeathUpKick=200.000000
|
||||
HumanObliterationThreshhold=150
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceDamTypeFlameNade extends NiceDamTypeFire
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
WeaponClass=None
DeathString="%k incinerated %o (flame grenade)."
FemaleSuicide="%o roasted herself alive (flame grenade)."
MaleSuicide="%o roasted himself alive (flame grenade)."
|
||||
}
|
||||
166
sources/Weapons/Playable/Grenades/NiceMedicNade.uc
Normal file
166
sources/Weapons/Playable/Grenades/NiceMedicNade.uc
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
//=============================================================================
|
||||
// MedicNade
|
||||
//=============================================================================
|
||||
// Medic grenade that heals friends and hurts enemies
|
||||
//=============================================================================
|
||||
// Killing Floor Source
|
||||
// Copyright (C) 2012 Tripwire Interactive
|
||||
// Author - John "Ramm-Jaeger" Gibson
|
||||
//=============================================================================
|
||||
class NiceMedicNade extends Nade;
|
||||
#exec OBJ LOAD FILE=KF_GrenadeSnd.uax
|
||||
#exec OBJ LOAD FILE=Inf_WeaponsTwo.uax
|
||||
#exec OBJ LOAD FILE=KF_LAWSnd.uax
|
||||
var() int HealBoostAmount;// How much we heal a player by default with the medic nade
|
||||
var int TotalHeals; // The total number of times this nade has healed (or hurt enemies)
|
||||
var() int MaxHeals; // The total number of times this nade will heal (or hurt enemies) until its done healing
|
||||
var float NextHealTime; // The next time that this nade will heal friendlies or hurt enemies
|
||||
var() float HealInterval; // How often to do healing
|
||||
var() sound ExplosionSound; // The sound of the rocket exploding
|
||||
var localized string SuccessfulHealMessage;
|
||||
var int MaxNumberOfPlayers;
|
||||
var bool bNeedToPlayEffects; // Whether or not effects have been played yet
|
||||
replication
|
||||
{
|
||||
reliable if (Role==ROLE_Authority)
bNeedToPlayEffects;
|
||||
}
|
||||
simulated function PostNetReceive()
|
||||
{
|
||||
super.PostNetReceive();
|
||||
if( !bHasExploded && bNeedToPlayEffects )
|
||||
{
bNeedToPlayEffects = false;
Explode(Location, vect(0,0,1));
|
||||
}
|
||||
}
|
||||
simulated function Explode(vector HitLocation, vector HitNormal)
|
||||
{
|
||||
bHasExploded = True;
|
||||
BlowUp(HitLocation);
|
||||
PlaySound(ExplosionSound,,TransientSoundVolume);
|
||||
if( Role == ROLE_Authority )
|
||||
{
bNeedToPlayEffects = true;
AmbientSound=Sound'Inf_WeaponsTwo.smoke_loop';
|
||||
}
|
||||
if ( EffectIsRelevant(Location,false) )
|
||||
{
Spawn(Class'NicePack.NiceNadeHealing',,, HitLocation, rotator(vect(0,0,1)));
|
||||
}
|
||||
}
|
||||
function Timer()
|
||||
{
|
||||
if( !bHidden )
|
||||
{
if( !bHasExploded )
{
Explode(Location, vect(0,0,1));
}
|
||||
}
|
||||
else if( bDisintegrated )
|
||||
{
AmbientSound=none;
Destroy();
|
||||
}
|
||||
}
|
||||
simulated function BlowUp(vector HitLocation)
|
||||
{
|
||||
HealOrHurt(Damage,DamageRadius, MyDamageType, MomentumTransfer, HitLocation);
|
||||
if ( Role == ROLE_Authority )
MakeNoise(1.0);
|
||||
}
|
||||
function HealOrHurt(float DamageAmount, float DamageRadius, class<DamageType> DamageType, float Momentum, vector HitLocation)
|
||||
{
|
||||
local actor Victims;
|
||||
local float damageScale;
|
||||
local vector dir;
|
||||
local int NumKilled;
|
||||
local KFMonster KFMonsterVictim;
|
||||
local Pawn P;
|
||||
local KFPawn KFP;
|
||||
local array<Pawn> CheckedPawns;
|
||||
local int i;
|
||||
local bool bAlreadyChecked;
|
||||
// Healing
|
||||
local KFPlayerReplicationInfo PRI;
|
||||
local int MedicReward;
|
||||
local float HealSum; // for modifying based on perks
|
||||
local int PlayersHealed;
|
||||
if ( bHurtEntry )
return;
|
||||
NextHealTime = Level.TimeSeconds + HealInterval;
|
||||
bHurtEntry = true;
|
||||
if( Fear != none )
|
||||
{
Fear.StartleBots();
|
||||
}
|
||||
foreach CollidingActors (class 'Actor', Victims, DamageRadius, HitLocation)
|
||||
{
// don't let blast damage affect fluid - VisibleCollisingActors doesn't really work for them - jag
if( (Victims != self) && (Hurtwall != Victims) && (Victims.Role == ROLE_Authority) && !Victims.IsA('FluidSurfaceInfo')
&& ExtendedZCollision(Victims)==none )
{
if( (Instigator==none || Instigator.Health<=0) && KFPawn(Victims)!=none )
Continue;
|
||||
damageScale = 1.0;
|
||||
if ( Instigator == none || Instigator.Controller == none )
{
Victims.SetDelayedDamageInstigatorController( InstigatorController );
}
|
||||
P = Pawn(Victims);
|
||||
if( P != none )
{
for (i = 0; i < CheckedPawns.Length; i++)
{
if (CheckedPawns[i] == P)
{
bAlreadyChecked = true;
break;
}
}
|
||||
if( bAlreadyChecked )
{
bAlreadyChecked = false;
P = none;
continue;
}
|
||||
KFMonsterVictim = KFMonster(Victims);
|
||||
if( KFMonsterVictim != none && KFMonsterVictim.Health <= 0 )
{
KFMonsterVictim = none;
}
|
||||
KFP = KFPawn(Victims);
|
||||
if( KFMonsterVictim != none )
{
damageScale *= KFMonsterVictim.GetExposureTo(Location + 15 * -Normal(PhysicsVolume.Gravity));
}
else if( KFP != none )
{
damageScale *= KFP.GetExposureTo(Location + 15 * -Normal(PhysicsVolume.Gravity));
}
|
||||
CheckedPawns[CheckedPawns.Length] = P;
|
||||
if ( damageScale <= 0)
{
P = none;
continue;
}
else
{
//Victims = P;
P = none;
}
}
else
{
continue;
}
|
||||
if( KFP == none )
{
//log(Level.TimeSeconds@"Hurting "$Victims$" for "$(damageScale * DamageAmount)$" damage");
|
||||
if( Pawn(Victims) != none && Pawn(Victims).Health > 0 )
{
Victims.TakeDamage(damageScale * DamageAmount,Instigator,Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius)
* dir,(damageScale * Momentum * dir),DamageType);
|
||||
if( Role == ROLE_Authority && KFMonsterVictim != none && KFMonsterVictim.Health <= 0 )
{
NumKilled++;
}
}
}
else
{
if(Instigator != none && KFP.Health > 0)
{
if ( KFP.bCanBeHealed )
{
PlayersHealed += 1;
MedicReward = HealBoostAmount;
|
||||
PRI = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo);
|
||||
if ( PRI != none && PRI.ClientVeteranSkill != none )
{
MedicReward *= PRI.ClientVeteranSkill.Static.GetHealPotency(PRI);
}
|
||||
HealSum = MedicReward;
|
||||
if ( (KFP.Health + KFP.healthToGive + MedicReward) > KFP.HealthMax )
{
MedicReward = KFP.HealthMax - (KFP.Health + KFP.healthToGive);
if ( MedicReward < 0 )
{
MedicReward = 0;
}
}
|
||||
//log(Level.TimeSeconds@"Healing "$KFP$" for "$HealSum$" base healamount "$HealBoostAmount$" health");
KFP.GiveHealth(HealSum, KFP.HealthMax);
KFP.ShieldStrength += HealSum * 0.25;
if(KFP.ShieldStrength > KFP.ShieldStrengthMax)
KFP.ShieldStrength = KFP.ShieldStrengthMax;
|
||||
if ( PRI != none )
{
if ( MedicReward > 0 && KFSteamStatsAndAchievements(PRI.SteamStatsAndAchievements) != none )
{
KFSteamStatsAndAchievements(PRI.SteamStatsAndAchievements).AddDamageHealed(MedicReward, false, true);
}
|
||||
// Give the medic reward money as a percentage of how much of the person's health they healed
MedicReward = int((FMin(float(MedicReward),KFP.HealthMax)/KFP.HealthMax) * 60);
|
||||
PRI.ReceiveRewardForHealing( MedicReward, KFP );
|
||||
if ( KFHumanPawn(Instigator) != none )
{
KFHumanPawn(Instigator).AlphaAmount = 255;
}
|
||||
if( PlayerController(Instigator.Controller) != none )
{
PlayerController(Instigator.Controller).ClientMessage(SuccessfulHealMessage$KFP.GetPlayerName(), 'CriticalEvent');
}
}
}
}
}
|
||||
KFP = none;
}
|
||||
if (PlayersHealed >= MaxNumberOfPlayers)
{
if (PRI != none)
{
KFSteamStatsAndAchievements(PRI.SteamStatsAndAchievements).HealedTeamWithMedicGrenade();
}
}
|
||||
}
|
||||
bHurtEntry = false;
|
||||
}
|
||||
// Shoot nades in mid-air
|
||||
// Alex
|
||||
function TakeDamage( int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex)
|
||||
{
|
||||
if ( Monster(instigatedBy) != none || instigatedBy == Instigator )
|
||||
{
if( damageType == class'SirenScreamDamage')
{
Disintegrate(HitLocation, vect(0,0,1));
}
|
||||
}
|
||||
}
|
||||
// Overridden to tweak the handling of the impact sound
|
||||
simulated function HitWall( vector HitNormal, actor Wall )
|
||||
{
|
||||
local Vector VNorm;
|
||||
local PlayerController PC;
|
||||
if ( (Pawn(Wall) != none) || (GameObjective(Wall) != none) )
|
||||
{
Explode(Location, HitNormal);
return;
|
||||
}
|
||||
if (!bTimerSet)
|
||||
{
SetTimer(ExplodeTimer, false);
bTimerSet = true;
|
||||
}
|
||||
// Reflect off Wall w/damping
|
||||
VNorm = (Velocity dot HitNormal) * HitNormal;
|
||||
Velocity = -VNorm * DampenFactor + (Velocity - VNorm) * DampenFactorParallel;
|
||||
RandSpin(100000);
|
||||
DesiredRotation.Roll = 0;
|
||||
RotationRate.Roll = 0;
|
||||
Speed = VSize(Velocity);
|
||||
if ( Speed < 20 )
|
||||
{
bBounce = False;
PrePivot.Z = -1.5;
SetPhysics(PHYS_none);
Timer();
SetTimer(0.0,False);
DesiredRotation = Rotation;
DesiredRotation.Roll = 0;
DesiredRotation.Pitch = 0;
SetRotation(DesiredRotation);
|
||||
if( Fear == none )
{
//(jc) Changed to use MedicNade-specific grenade that's overridden to not make the ringmaster fear it
Fear = Spawn(class'AvoidMarker_MedicNade');
Fear.SetCollisionSize(DamageRadius,DamageRadius);
Fear.StartleBots();
}
|
||||
if ( Trail != none )
Trail.mRegen = false; // stop the emitter from regenerating
|
||||
}
|
||||
else
|
||||
{
if ( (Level.NetMode != NM_DedicatedServer) && (Speed > 50) )
PlaySound(ImpactSound, SLOT_Misc );
else
{
bFixedRotationDir = false;
bRotateToDesired = true;
DesiredRotation.Pitch = 0;
RotationRate.Pitch = 50000;
}
if ( !Level.bDropDetail && (Level.DetailMode != DM_Low) && (Level.TimeSeconds - LastSparkTime > 0.5) && EffectIsRelevant(Location,false) )
{
PC = Level.GetLocalPlayerController();
if ( (PC.ViewTarget != none) && VSize(PC.ViewTarget.Location - Location) < 6000 )
Spawn(HitEffectClass,,, Location, Rotator(HitNormal));
LastSparkTime = Level.TimeSeconds;
}
|
||||
}
|
||||
}
|
||||
function Tick( float DeltaTime )
|
||||
{
|
||||
if( Role < ROLE_Authority )
|
||||
{
return;
|
||||
}
|
||||
// if( class'ROEngine.ROLevelInfo'.static.RODebugMode() )
|
||||
// {
|
||||
// DrawDebugSphere( Location, DamageRadius, 12, 255, 0, 0);
|
||||
// }
|
||||
if( TotalHeals < MaxHeals && NextHealTime > 0 && NextHealTime < Level.TimeSeconds )
|
||||
{
TotalHeals += 1;
|
||||
HealOrHurt(Damage,DamageRadius, MyDamageType, MomentumTransfer, Location);
|
||||
if( TotalHeals >= MaxHeals )
{
AmbientSound=none;
}
|
||||
}
|
||||
}
|
||||
defaultproperties
|
||||
{
HealBoostAmount=10
MaxHeals=8
HealInterval=1.000000
ExplosionSound=SoundGroup'KF_GrenadeSnd.NadeBase.MedicNade_Explode'
SuccessfulHealMessage="You healed "
MaxNumberOfPlayers=6
Damage=50.000000
DamageRadius=175.000000
MyDamageType=Class'KFMod.DamTypeMedicNade'
StaticMesh=StaticMesh'KF_pickups5_Trip.nades.MedicNade_Pickup'
DrawScale=1.000000
SoundVolume=150
SoundRadius=100.000000
TransientSoundVolume=2.000000
TransientSoundRadius=200.000000
|
||||
}
|
||||
158
sources/Weapons/Playable/Grenades/NiceMedicNadePoison.uc
Normal file
158
sources/Weapons/Playable/Grenades/NiceMedicNadePoison.uc
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
class NiceMedicNadePoison extends Nade;
|
||||
#exec OBJ LOAD FILE=KF_GrenadeSnd.uax
|
||||
#exec OBJ LOAD FILE=Inf_WeaponsTwo.uax
|
||||
#exec OBJ LOAD FILE=KF_LAWSnd.uax
|
||||
var() int HealBoostAmount;// How much we heal a player by default with the medic nade
|
||||
var int TotalHeals; // The total number of times this nade has healed (or hurt enemies)
|
||||
var() int MaxHeals; // The total number of times this nade will heal (or hurt enemies) until its done healing
|
||||
var float NextHealTime; // The next time that this nade will heal friendlies or hurt enemies
|
||||
var() float HealInterval; // How often to do healing
|
||||
var() sound ExplosionSound; // The sound of the rocket exploding
|
||||
var localized string SuccessfulHealMessage;
|
||||
var int MaxNumberOfPlayers;
|
||||
var bool bNeedToPlayEffects; // Whether or not effects have been played yet
|
||||
replication
|
||||
{
|
||||
reliable if (Role==ROLE_Authority)
bNeedToPlayEffects;
|
||||
}
|
||||
simulated function PostNetReceive()
|
||||
{
|
||||
super.PostNetReceive();
|
||||
if( !bHasExploded && bNeedToPlayEffects )
|
||||
{
bNeedToPlayEffects = false;
Explode(Location, vect(0,0,1));
|
||||
}
|
||||
}
|
||||
simulated function Explode(vector HitLocation, vector HitNormal)
|
||||
{
|
||||
bHasExploded = True;
|
||||
BlowUp(HitLocation);
|
||||
PlaySound(ExplosionSound,,TransientSoundVolume);
|
||||
if( Role == ROLE_Authority )
|
||||
{
bNeedToPlayEffects = true;
AmbientSound=Sound'Inf_WeaponsTwo.smoke_loop';
|
||||
}
|
||||
if ( EffectIsRelevant(Location,false) )
|
||||
{
Spawn(Class'NicePack.NiceNadeHealingFast',,, HitLocation, rotator(vect(0,0,1)));
|
||||
}
|
||||
}
|
||||
function Timer()
|
||||
{
|
||||
if( !bHidden )
|
||||
{
if( !bHasExploded )
{
Explode(Location, vect(0,0,1));
}
|
||||
}
|
||||
else if( bDisintegrated )
|
||||
{
AmbientSound=none;
Destroy();
|
||||
}
|
||||
}
|
||||
simulated function BlowUp(vector HitLocation)
|
||||
{
|
||||
HealOrHurt(Damage,DamageRadius, MyDamageType, MomentumTransfer, HitLocation);
|
||||
if ( Role == ROLE_Authority )
MakeNoise(1.0);
|
||||
}
|
||||
function HealOrHurt(float DamageAmount, float DamageRadius, class<DamageType> DamageType, float Momentum, vector HitLocation)
|
||||
{
|
||||
local actor Victims;
|
||||
local float damageScale;
|
||||
local vector dir;
|
||||
local int NumKilled;
|
||||
local KFMonster KFMonsterVictim;
|
||||
local Pawn P;
|
||||
local KFPawn KFP;
|
||||
local array<Pawn> CheckedPawns;
|
||||
local int i;
|
||||
local bool bAlreadyChecked;
|
||||
// Healing
|
||||
local KFPlayerReplicationInfo PRI;
|
||||
local int MedicReward;
|
||||
local float HealSum; // for modifying based on perks
|
||||
local int PlayersHealed;
|
||||
local NiceMonster niceZed;
|
||||
if ( bHurtEntry )
return;
|
||||
NextHealTime = Level.TimeSeconds + HealInterval;
|
||||
bHurtEntry = true;
|
||||
if( Fear != none )
|
||||
{
Fear.StartleBots();
|
||||
}
|
||||
foreach CollidingActors (class 'Actor', Victims, DamageRadius, HitLocation)
|
||||
{
// don't let blast damage affect fluid - VisibleCollisingActors doesn't really work for them - jag
if( (Victims != self) && (Hurtwall != Victims) && (Victims.Role == ROLE_Authority) && !Victims.IsA('FluidSurfaceInfo')
&& ExtendedZCollision(Victims)==none )
{
if( (Instigator==none || Instigator.Health<=0) && KFPawn(Victims)!=none )
Continue;
|
||||
damageScale = 1.0;
|
||||
if ( Instigator == none || Instigator.Controller == none )
{
Victims.SetDelayedDamageInstigatorController( InstigatorController );
}
|
||||
P = Pawn(Victims);
|
||||
if( P != none )
{
for (i = 0; i < CheckedPawns.Length; i++)
{
if (CheckedPawns[i] == P)
{
bAlreadyChecked = true;
break;
}
}
|
||||
if( bAlreadyChecked )
{
bAlreadyChecked = false;
P = none;
continue;
}
|
||||
KFMonsterVictim = KFMonster(Victims);
|
||||
if( KFMonsterVictim != none && KFMonsterVictim.Health <= 0 )
{
KFMonsterVictim = none;
}
|
||||
KFP = KFPawn(Victims);
|
||||
if( KFMonsterVictim != none )
{
damageScale *= KFMonsterVictim.GetExposureTo(Location + 15 * -Normal(PhysicsVolume.Gravity));
}
else if( KFP != none )
{
damageScale *= KFP.GetExposureTo(Location + 15 * -Normal(PhysicsVolume.Gravity));
}
|
||||
CheckedPawns[CheckedPawns.Length] = P;
|
||||
if ( damageScale <= 0)
{
P = none;
continue;
}
else
{
//Victims = P;
P = none;
}
}
else
{
continue;
}
|
||||
if( KFP == none )
{
//log(Level.TimeSeconds@"Hurting "$Victims$" for "$(damageScale * DamageAmount)$" damage");
|
||||
if(Pawn(Victims) != none && Pawn(Victims).Health > 0){
niceZed = NiceMonster(Victims);
if(niceZed != none && niceZed.default.Health <= 500){
niceZed.madnessCountDown = FMax(5.0, niceZed.madnessCountDown);
KFMonsterController(niceZed.Controller).FindNewEnemy();
}
Victims.TakeDamage(damageScale * DamageAmount,Instigator,Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius)
* dir,(damageScale * Momentum * dir),DamageType);
|
||||
if(Role == ROLE_Authority && KFMonsterVictim != none && KFMonsterVictim.Health <= 0)
NumKilled ++;
}
}
else
{
if( Instigator != none && KFP.Health > 0 && KFP.Health < KFP.HealthMax )
{
if ( KFP.bCanBeHealed )
{
PlayersHealed += 1;
MedicReward = HealBoostAmount;
|
||||
PRI = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo);
|
||||
if ( PRI != none && PRI.ClientVeteranSkill != none )
{
MedicReward *= PRI.ClientVeteranSkill.Static.GetHealPotency(PRI);
}
|
||||
HealSum = MedicReward;
|
||||
if ( (KFP.Health + KFP.healthToGive + MedicReward) > KFP.HealthMax )
{
MedicReward = KFP.HealthMax - (KFP.Health + KFP.healthToGive);
if ( MedicReward < 0 )
{
MedicReward = 0;
}
}
|
||||
//log(Level.TimeSeconds@"Healing "$KFP$" for "$HealSum$" base healamount "$HealBoostAmount$" health");
KFP.GiveHealth(HealSum, KFP.HealthMax);
|
||||
if ( PRI != none )
{
if ( MedicReward > 0 && KFSteamStatsAndAchievements(PRI.SteamStatsAndAchievements) != none )
{
KFSteamStatsAndAchievements(PRI.SteamStatsAndAchievements).AddDamageHealed(MedicReward, false, true);
}
|
||||
// Give the medic reward money as a percentage of how much of the person's health they healed
MedicReward = int((FMin(float(MedicReward),KFP.HealthMax)/KFP.HealthMax) * 60);
|
||||
PRI.ReceiveRewardForHealing( MedicReward, KFP );
|
||||
if ( KFHumanPawn(Instigator) != none )
{
KFHumanPawn(Instigator).AlphaAmount = 255;
}
|
||||
if( PlayerController(Instigator.Controller) != none )
{
PlayerController(Instigator.Controller).ClientMessage(SuccessfulHealMessage$KFP.GetPlayerName(), 'CriticalEvent');
}
}
}
}
}
|
||||
KFP = none;
}
|
||||
if (PlayersHealed >= MaxNumberOfPlayers)
{
if (PRI != none)
{
KFSteamStatsAndAchievements(PRI.SteamStatsAndAchievements).HealedTeamWithMedicGrenade();
}
}
|
||||
}
|
||||
bHurtEntry = false;
|
||||
}
|
||||
// Shoot nades in mid-air
|
||||
// Alex
|
||||
function TakeDamage( int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex)
|
||||
{
|
||||
if ( Monster(instigatedBy) != none || instigatedBy == Instigator )
|
||||
{
if( damageType == class'SirenScreamDamage')
{
Disintegrate(HitLocation, vect(0,0,1));
}
|
||||
}
|
||||
}
|
||||
// Overridden to tweak the handling of the impact sound
|
||||
simulated function HitWall( vector HitNormal, actor Wall )
|
||||
{
|
||||
local Vector VNorm;
|
||||
local PlayerController PC;
|
||||
if ( (Pawn(Wall) != none) || (GameObjective(Wall) != none) )
|
||||
{
Explode(Location, HitNormal);
return;
|
||||
}
|
||||
if (!bTimerSet)
|
||||
{
SetTimer(ExplodeTimer, false);
bTimerSet = true;
|
||||
}
|
||||
// Reflect off Wall w/damping
|
||||
VNorm = (Velocity dot HitNormal) * HitNormal;
|
||||
Velocity = -VNorm * DampenFactor + (Velocity - VNorm) * DampenFactorParallel;
|
||||
RandSpin(100000);
|
||||
DesiredRotation.Roll = 0;
|
||||
RotationRate.Roll = 0;
|
||||
Speed = VSize(Velocity);
|
||||
if ( Speed < 20 )
|
||||
{
bBounce = False;
PrePivot.Z = -1.5;
SetPhysics(PHYS_none);
Timer();
SetTimer(0.0,False);
DesiredRotation = Rotation;
DesiredRotation.Roll = 0;
DesiredRotation.Pitch = 0;
SetRotation(DesiredRotation);
|
||||
if( Fear == none )
{
//(jc) Changed to use MedicNade-specific grenade that's overridden to not make the ringmaster fear it
Fear = Spawn(class'AvoidMarker_MedicNade');
Fear.SetCollisionSize(DamageRadius,DamageRadius);
Fear.StartleBots();
}
|
||||
if ( Trail != none )
Trail.mRegen = false; // stop the emitter from regenerating
|
||||
}
|
||||
else
|
||||
{
if ( (Level.NetMode != NM_DedicatedServer) && (Speed > 50) )
PlaySound(ImpactSound, SLOT_Misc );
else
{
bFixedRotationDir = false;
bRotateToDesired = true;
DesiredRotation.Pitch = 0;
RotationRate.Pitch = 50000;
}
if ( !Level.bDropDetail && (Level.DetailMode != DM_Low) && (Level.TimeSeconds - LastSparkTime > 0.5) && EffectIsRelevant(Location,false) )
{
PC = Level.GetLocalPlayerController();
if ( (PC.ViewTarget != none) && VSize(PC.ViewTarget.Location - Location) < 6000 )
Spawn(HitEffectClass,,, Location, Rotator(HitNormal));
LastSparkTime = Level.TimeSeconds;
}
|
||||
}
|
||||
}
|
||||
function Tick( float DeltaTime )
|
||||
{
|
||||
if( Role < ROLE_Authority )
|
||||
{
return;
|
||||
}
|
||||
// if( class'ROEngine.ROLevelInfo'.static.RODebugMode() )
|
||||
// {
|
||||
// DrawDebugSphere( Location, DamageRadius, 12, 255, 0, 0);
|
||||
// }
|
||||
if( TotalHeals < MaxHeals && NextHealTime > 0 && NextHealTime < Level.TimeSeconds )
|
||||
{
TotalHeals += 1;
|
||||
HealOrHurt(Damage,DamageRadius, MyDamageType, MomentumTransfer, Location);
|
||||
if( TotalHeals >= MaxHeals )
{
AmbientSound=none;
}
|
||||
}
|
||||
}
|
||||
defaultproperties
|
||||
{
HealBoostAmount=10
MaxHeals=4
HealInterval=1.000000
ExplosionSound=SoundGroup'KF_GrenadeSnd.NadeBase.MedicNade_Explode'
SuccessfulHealMessage="You healed "
MaxNumberOfPlayers=6
Damage=50.000000
DamageRadius=175.000000
MyDamageType=Class'KFMod.DamTypeMedicNade'
StaticMesh=StaticMesh'KF_pickups5_Trip.nades.MedicNade_Pickup'
LifeSpan=8.000000
DrawScale=1.000000
SoundVolume=150
SoundRadius=100.000000
TransientSoundVolume=2.000000
TransientSoundRadius=200.000000
|
||||
}
|
||||
91
sources/Weapons/Playable/Grenades/NiceNade.uc
Normal file
91
sources/Weapons/Playable/Grenades/NiceNade.uc
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
class NiceNade extends ScrnNade;
|
||||
var class<NiceAvoidMarker> AvoidMarkerClass;
|
||||
var class<NiceWeaponDamageType> niceExplosiveDamage;
|
||||
// Overloaded to implement nade skills
|
||||
simulated function Explode(vector HitLocation, vector HitNormal){
|
||||
local PlayerController LocalPlayer;
|
||||
local Projectile P;
|
||||
local byte i;
|
||||
bHasExploded = true;
|
||||
BlowUp(HitLocation);
|
||||
// null reference fix
|
||||
if(ExplodeSounds.length > 0)
PlaySound(ExplodeSounds[rand(ExplodeSounds.length)],,2.0);
|
||||
for(i = Rand(6);i < 10;i ++){
P = Spawn(ShrapnelClass,,,,RotRand(True));
if(P != none)
P.RemoteRole = ROLE_None;
|
||||
}
|
||||
for(i = Rand(6);i < 10;i ++){
P = Spawn(ShrapnelClass,,,,RotRand(True));
if(P != none)
P.RemoteRole = ROLE_none;
|
||||
}
|
||||
if(EffectIsRelevant(Location,false)){
Spawn(Class'KFmod.KFNadeExplosion',,, HitLocation, rotator(vect(0,0,1)));
Spawn(ExplosionDecal, self,, HitLocation, rotator(-HitNormal));
|
||||
}
|
||||
// Shake nearby players screens
|
||||
LocalPlayer = Level.GetLocalPlayerController();
|
||||
if((LocalPlayer != none) && (VSize(Location - LocalPlayer.ViewTarget.Location) < (DamageRadius * 1.5)))
LocalPlayer.ShakeView(RotMag, RotRate, RotTime, OffsetMag, OffsetRate, OffsetTime);
|
||||
Destroy();
|
||||
}
|
||||
function TakeDamage(int Damage, Pawn InstigatedBy, Vector HitLocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex){
|
||||
if(Monster(instigatedBy) != none || instigatedBy == Instigator){
if(DamageType == class'SirenScreamDamage')
Disintegrate(HitLocation, vect(0,0,1));
else
Explode(HitLocation, vect(0,0,1));
|
||||
}
|
||||
}
|
||||
simulated function HurtRadius( float DamageAmount, float DamageRadius, class<DamageType> DamageType, float Momentum, vector HitLocation )
|
||||
{
|
||||
local actor Victims;
|
||||
local float damageScale, dist;
|
||||
local vector dir;
|
||||
local int NumKilled;
|
||||
local KFMonster KFMonsterVictim;
|
||||
local bool bMonster;
|
||||
local Pawn P;
|
||||
local KFPawn KFP;
|
||||
local array<Pawn> CheckedPawns;
|
||||
local int i;
|
||||
local bool bAlreadyChecked;
|
||||
local SRStatsBase Stats;
|
||||
|
||||
if ( bHurtEntry )
return;
|
||||
bHurtEntry = true;
|
||||
|
||||
if( Role == ROLE_Authority && Instigator != none && Instigator.PlayerReplicationInfo != none )
Stats = SRStatsBase(Instigator.PlayerReplicationInfo.SteamStatsAndAchievements);
|
||||
foreach CollidingActors (class 'Actor', Victims, DamageRadius, HitLocation)
|
||||
{
P = none;
KFMonsterVictim = none;
bMonster = false;
KFP = none;
bAlreadyChecked = false;
|
||||
// don't let blast damage affect fluid - VisibleCollisingActors doesn't really work for them - jag
if( (Victims != self) && (Hurtwall != Victims) && (Victims.Role == ROLE_Authority) && !Victims.IsA('FluidSurfaceInfo')
&& ExtendedZCollision(Victims)==None )
{
if( (Instigator==None || Instigator.Health<=0) && KFPawn(Victims)!=None )
Continue;
dir = Victims.Location - HitLocation;
dist = FMax(1,VSize(dir));
dir = dir/dist;
damageScale = 1 - FMax(0,(dist - Victims.CollisionRadius)/DamageRadius);
|
||||
if ( Instigator == None || Instigator.Controller == None )
{
Victims.SetDelayedDamageInstigatorController( InstigatorController );
}
|
||||
P = Pawn(Victims);
if( P != none ) {
for (i = 0; i < CheckedPawns.Length; i++) {
if (CheckedPawns[i] == P) {
bAlreadyChecked = true;
break;
}
}
if( bAlreadyChecked )
continue;
CheckedPawns[CheckedPawns.Length] = P;
|
||||
KFMonsterVictim = KFMonster(Victims);
if( KFMonsterVictim != none && KFMonsterVictim.Health <= 0 )
KFMonsterVictim = none;
|
||||
KFP = KFPawn(Victims);
|
||||
if( KFMonsterVictim != none ) {
damageScale *= KFMonsterVictim.GetExposureTo(Location + 15 * -Normal(PhysicsVolume.Gravity));
bMonster = true; // in case TakeDamage() and further Die() deletes the monster
}
else if( KFP != none ) {
damageScale *= KFP.GetExposureTo(Location + 15 * -Normal(PhysicsVolume.Gravity));
}
|
||||
if ( damageScale <= 0)
continue;
|
||||
// Scrake Nader ach
if ( Role == ROLE_Authority && KFMonsterVictim != none && ZombieScrake(KFMonsterVictim) != none ) {
// need to check Scrake's stun before dealing damage, because he can unstun by himself from damage received
ScrakeNader(damageScale * DamageAmount, ZombieScrake(KFMonsterVictim), Stats);
}
}
if(NiceMonster(Victims) != none)
Victims.TakeDamage(damageScale * DamageAmount,Instigator,Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir
,(damageScale * Momentum * dir), niceExplosiveDamage);
else
Victims.TakeDamage(damageScale * DamageAmount,Instigator,Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir
,(damageScale * Momentum * dir), DamageType);
|
||||
if( bMonster && (KFMonsterVictim == none || KFMonsterVictim.Health < 1) ) {
NumKilled++;
}
|
||||
if (Vehicle(Victims) != None && Vehicle(Victims).Health > 0)
{
Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation);
}
}
|
||||
}
|
||||
|
||||
if( Role == ROLE_Authority )
|
||||
{
if ( bBlewInHands && NumKilled >= 5 && Stats != none )
class'ScrnBalanceSrv.ScrnAchievements'.static.ProgressAchievementByID(Stats.Rep, 'SuicideBomber', 1);
|
||||
if ( NumKilled >= 4 )
{
KFGameType(Level.Game).DramaticEvent(0.05);
}
else if ( NumKilled >= 2 )
{
KFGameType(Level.Game).DramaticEvent(0.03);
}
|
||||
}
|
||||
bHurtEntry = false;
|
||||
}
|
||||
// Overridden to spawn different AvoidMarker
|
||||
simulated function HitWall( vector HitNormal, actor Wall ){
|
||||
local Vector VNorm;
|
||||
local PlayerController PC;
|
||||
if((Pawn(Wall) != none) || (GameObjective(Wall) != none)){
Explode(Location, HitNormal);
return;
|
||||
}
|
||||
if(!bTimerSet){
SetTimer(ExplodeTimer, false);
bTimerSet = true;
|
||||
}
|
||||
// Reflect off Wall w/damping
|
||||
VNorm = (Velocity dot HitNormal) * HitNormal;
|
||||
Velocity = -VNorm * DampenFactor + (Velocity - VNorm) * DampenFactorParallel;
|
||||
RandSpin(100000);
|
||||
DesiredRotation.Roll = 0;
|
||||
RotationRate.Roll = 0;
|
||||
Speed = VSize(Velocity);
|
||||
if(Speed < 20){
bBounce = false;
PrePivot.Z = -1.5;
SetPhysics(PHYS_none);
DesiredRotation = Rotation;
DesiredRotation.Roll = 0;
DesiredRotation.Pitch = 0;
SetRotation(DesiredRotation);
|
||||
if(Fear == none){
Fear = Spawn(AvoidMarkerClass);
Fear.SetCollisionSize(DamageRadius, DamageRadius);
Fear.StartleBots();
}
|
||||
if(Trail != none)
Trail.mRegen = false; // stop the emitter from regenerating
|
||||
}
|
||||
else{
if((Level.NetMode != NM_DedicatedServer) && (Speed > 50))
PlaySound(ImpactSound, SLOT_Misc );
else{
bFixedRotationDir = false;
bRotateToDesired = true;
DesiredRotation.Pitch = 0;
RotationRate.Pitch = 50000;
}
if(!Level.bDropDetail && (Level.DetailMode != DM_Low) && (Level.TimeSeconds - LastSparkTime > 0.5) && EffectIsRelevant(Location,false)){
PC = Level.GetLocalPlayerController();
if ( (PC.ViewTarget != none) && VSize(PC.ViewTarget.Location - Location) < 6000 )
Spawn(HitEffectClass,,, Location, Rotator(HitNormal));
LastSparkTime = Level.TimeSeconds;
}
|
||||
}
|
||||
}
|
||||
defaultproperties
|
||||
{
AvoidMarkerClass=Class'NicePack.NiceAvoidMarkerExplosive'
niceExplosiveDamage=Class'NicePack.NiceDamTypeDemoExplosion'
|
||||
}
|
||||
22
sources/Weapons/Playable/Grenades/NiceNadeHealing.uc
Normal file
22
sources/Weapons/Playable/Grenades/NiceNadeHealing.uc
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
class NiceNadeHealing extends Emitter;
|
||||
var bool bFlashed;
|
||||
simulated function PostBeginPlay()
|
||||
{
|
||||
Super.Postbeginplay();
|
||||
NadeLight();
|
||||
}
|
||||
simulated function NadeLight()
|
||||
{
|
||||
if ( !Level.bDropDetail && (Instigator != none)
&& ((Level.TimeSeconds - LastRenderTime < 0.2) || (PlayerController(Instigator.Controller) != none)) )
|
||||
{
bDynamicLight = true;
SetTimer(0.25, false);
|
||||
}
|
||||
else Timer();
|
||||
}
|
||||
simulated function Timer()
|
||||
{
|
||||
bDynamicLight = false;
|
||||
}
|
||||
defaultproperties
|
||||
{
Begin Object Class=SpriteEmitter Name=SpriteEmitter0
UseColorScale=True
RespawnDeadParticles=False
SpinParticles=True
UseSizeScale=True
UseRegularSizeScale=False
UniformSize=True
AutomaticInitialSpawning=False
BlendBetweenSubdivisions=True
ColorScale(0)=(Color=(B=255,G=128,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=161,G=61,R=61,A=255))
FadeOutFactor=(W=0.000000,X=0.000000,Y=0.000000,Z=0.000000)
FadeOutStartTime=5.000000
SpinsPerSecondRange=(Y=(Min=0.050000,Max=0.100000),Z=(Min=0.050000,Max=0.100000))
StartSpinRange=(X=(Min=-0.500000,Max=0.500000),Y=(Max=1.000000),Z=(Max=1.000000))
SizeScale(0)=(RelativeSize=1.000000)
SizeScale(1)=(RelativeTime=1.000000,RelativeSize=5.000000)
StartSizeRange=(X=(Min=40.000000,Max=40.000000),Y=(Min=40.000000,Max=40.000000),Z=(Min=40.000000,Max=40.000000))
InitialParticlesPerSecond=5000.000000
DrawStyle=PTDS_AlphaBlend
Texture=Texture'kf_fx_trip_t.Misc.smoke_animated'
TextureUSubdivisions=8
TextureVSubdivisions=8
LifetimeRange=(Min=7.000000,Max=7.000000)
StartVelocityRange=(X=(Min=-750.000000,Max=750.000000),Y=(Min=-750.000000,Max=750.000000))
VelocityLossRange=(X=(Min=10.000000,Max=10.000000),Y=(Min=10.000000,Max=10.000000),Z=(Min=10.000000,Max=10.000000))
End Object
Emitters(0)=SpriteEmitter'NicePack.NiceNadeHealing.SpriteEmitter0'
|
||||
AutoDestroy=True
bNoDelete=False
RemoteRole=ROLE_SimulatedProxy
bNotOnDedServer=False
|
||||
}
|
||||
22
sources/Weapons/Playable/Grenades/NiceNadeHealingFast.uc
Normal file
22
sources/Weapons/Playable/Grenades/NiceNadeHealingFast.uc
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
class NiceNadeHealingFast extends Emitter;
|
||||
var bool bFlashed;
|
||||
simulated function PostBeginPlay()
|
||||
{
|
||||
Super.Postbeginplay();
|
||||
NadeLight();
|
||||
}
|
||||
simulated function NadeLight()
|
||||
{
|
||||
if ( !Level.bDropDetail && (Instigator != none)
&& ((Level.TimeSeconds - LastRenderTime < 0.2) || (PlayerController(Instigator.Controller) != none)) )
|
||||
{
bDynamicLight = true;
SetTimer(0.25, false);
|
||||
}
|
||||
else Timer();
|
||||
}
|
||||
simulated function Timer()
|
||||
{
|
||||
bDynamicLight = false;
|
||||
}
|
||||
defaultproperties
|
||||
{
Begin Object Class=SpriteEmitter Name=SpriteEmitter0
UseColorScale=True
RespawnDeadParticles=False
SpinParticles=True
UseSizeScale=True
UseRegularSizeScale=False
UniformSize=True
AutomaticInitialSpawning=False
BlendBetweenSubdivisions=True
ColorScale(0)=(Color=(G=255,R=200,A=255))
ColorScale(1)=(RelativeTime=1.000000,Color=(B=61,G=105,R=105,A=255))
FadeOutFactor=(W=0.000000,X=0.000000,Y=0.000000,Z=0.000000)
FadeOutStartTime=5.000000
SpinsPerSecondRange=(Y=(Min=0.050000,Max=0.100000),Z=(Min=0.050000,Max=0.100000))
StartSpinRange=(X=(Min=-0.500000,Max=0.500000),Y=(Max=1.000000),Z=(Max=1.000000))
SizeScale(0)=(RelativeSize=1.000000)
SizeScale(1)=(RelativeTime=1.000000,RelativeSize=5.000000)
StartSizeRange=(X=(Min=40.000000,Max=40.000000),Y=(Min=40.000000,Max=40.000000),Z=(Min=40.000000,Max=40.000000))
InitialParticlesPerSecond=5000.000000
DrawStyle=PTDS_AlphaBlend
Texture=Texture'kf_fx_trip_t.Misc.smoke_animated'
TextureUSubdivisions=8
TextureVSubdivisions=8
LifetimeRange=(Min=3.000000,Max=3.000000)
StartVelocityRange=(X=(Min=-750.000000,Max=750.000000),Y=(Min=-750.000000,Max=750.000000))
VelocityLossRange=(X=(Min=10.000000,Max=10.000000),Y=(Min=10.000000,Max=10.000000),Z=(Min=10.000000,Max=10.000000))
End Object
Emitters(0)=SpriteEmitter'NicePack.NiceNadeHealingFast.SpriteEmitter0'
|
||||
AutoDestroy=True
bNoDelete=False
RemoteRole=ROLE_SimulatedProxy
bNotOnDedServer=False
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
class NiceDamTypeWinGun extends NiceDamageTypeVetSharpshooter
|
||||
abstract;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
stunMultiplier=1.500000
|
||||
bIsProjectile=True
|
||||
HeadShotDamageMult=200.000000
|
||||
bSniperWeapon=True
|
||||
WeaponClass=Class'NicePack.NiceWinchester'
|
||||
DeathString="%k killed %o (Winchester)."
|
||||
FemaleSuicide="%o shot herself in the foot."
|
||||
MaleSuicide="%o shot himself in the foot."
|
||||
bRagdollBullet=True
|
||||
bBulletHit=True
|
||||
PawnDamageEmitter=Class'ROEffects.ROBloodPuff'
|
||||
LowGoreDamageEmitter=Class'ROEffects.ROBloodPuffNoGore'
|
||||
LowDetailEmitter=Class'ROEffects.ROBloodPuffSmall'
|
||||
FlashFog=(X=600.000000)
|
||||
KDamageImpulse=2250.000000
|
||||
KDeathVel=115.000000
|
||||
KDeathUpKick=5.000000
|
||||
VehicleDamageScaling=0.700000
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
class NiceDamTypeWinchester extends NiceDamageTypeVetSharpshooter
|
||||
abstract;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
stunMultiplier=1.500000
|
||||
bIsProjectile=True
|
||||
HeadShotDamageMult=2.000000
|
||||
bSniperWeapon=True
|
||||
WeaponClass=Class'NicePack.NiceWinchester'
|
||||
DeathString="%k killed %o (Winchester)."
|
||||
FemaleSuicide="%o shot herself in the foot."
|
||||
MaleSuicide="%o shot himself in the foot."
|
||||
bRagdollBullet=True
|
||||
bBulletHit=True
|
||||
PawnDamageEmitter=Class'ROEffects.ROBloodPuff'
|
||||
LowGoreDamageEmitter=Class'ROEffects.ROBloodPuffNoGore'
|
||||
LowDetailEmitter=Class'ROEffects.ROBloodPuffSmall'
|
||||
FlashFog=(X=600.000000)
|
||||
KDamageImpulse=2250.000000
|
||||
KDeathVel=115.000000
|
||||
KDeathUpKick=5.000000
|
||||
VehicleDamageScaling=0.700000
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
class NiceWinchester extends NiceWeapon;
|
||||
|
||||
simulated function fillSubReloadStages(){
|
||||
// Loading 10 shells during 256 frames tops, with first shell loaded at frame 18, with 23 frames between load moments
|
||||
generateReloadStages(10, 256, 18, 23);
|
||||
}
|
||||
|
||||
static function FillInAppearance(){
|
||||
local WeaponVariant variant;
|
||||
local WeaponModel model;
|
||||
local WeaponSkin skin, fancySkin;
|
||||
local WeaponSoundSet soundSet;
|
||||
local WeaponAnimationSet anims;
|
||||
local NiceAmmoType ammoType;
|
||||
local NiceAmmoEffects ammoEffects;
|
||||
soundSet.selectSoundRef = "KF_RifleSnd.Rifle_Select";
|
||||
soundSet.fireSoundRefs[0] = "KF_RifleSnd.Rifle_Fire";
|
||||
soundSet.stereoFireSoundRefs[0] = "KF_RifleSnd.Rifle_FireST";
|
||||
soundSet.noAmmoSoundRefs[0] = "KF_RifleSnd.Rifle_DryFire";
|
||||
skin.ID = "Lever Action Rifle";
|
||||
skin.paintRefs[0] = "KF_Weapons_Trip_T.Rifles.winchester_cmb";
|
||||
fancySkin.ID = "Winchester";
|
||||
fancySkin.paintRefs[0] = "NicePackT.Skins1st.OldLAR_cmb";
|
||||
model.ID = "Winchester";
|
||||
model.firstMeshRef = "KF_Weapons_Trip.Winchester_Trip";
|
||||
model.hudImageRef = "KillingFloorHUD.WeaponSelect.winchester_unselected";
|
||||
model.selectedHudImageRef = "KillingFloorHUD.WeaponSelect.Winchester";
|
||||
model.skins[0] = skin;
|
||||
model.skins[1] = fancySkin;
|
||||
model.soundSet = soundSet;
|
||||
anims.idleAnim = 'Idle';
|
||||
anims.idleAimedAnim = 'AimIdle';
|
||||
anims.selectAnim = 'Select';
|
||||
anims.putDownAnim = 'PutDown';
|
||||
anims.reloadAnim = 'Reload';
|
||||
anims.fireAnimSets[0].justFire.anim = 'Fire';
|
||||
anims.fireAnimSets[0].justFire.rate = 1.6;
|
||||
anims.fireAnimSets[0].aimed.anim = 'AimFire';
|
||||
anims.fireAnimSets[0].aimed.rate = 1.6;
|
||||
model.animations = anims;
|
||||
model.playerViewOffset = Vect(8.0, 14.0, -8.0);
|
||||
model.effectOffset = Vect(100.0, 25.0, -10.0);
|
||||
variant.models[0] = model;
|
||||
ammoEffects.ammoID = "regular";
|
||||
ammoEffects.fireTypeID = "crude";
|
||||
variant.ammoEffects[0] = ammoEffects;
|
||||
ammoEffects.ammoID = "irregular";
|
||||
ammoEffects.fireTypeID = "fine";
|
||||
variant.ammoEffects[1] = ammoEffects;
|
||||
default.variants[0] = variant;
|
||||
// Ammo
|
||||
ammoType.ID = "regular";
|
||||
ammoType.spaceMult = 1.0;
|
||||
ammoType.amount = 20;
|
||||
default.availableAmmoTypes[0] = ammoType;
|
||||
ammoType.ID = "irregular";
|
||||
ammoType.spaceMult = 1.0;
|
||||
ammoType.amount = 20;
|
||||
default.availableAmmoTypes[1] = ammoType;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bChangeClipIcon=true
|
||||
hudClipTexture=Texture'KillingFloorHUD.HUD.Hud_Single_Bullet'
|
||||
reloadType=RTYPE_SINGLE
|
||||
MagCapacity=10
|
||||
ReloadRate=0.416667
|
||||
ReloadAnimRate=1.600000
|
||||
bHoldToReload=True
|
||||
Weight=6.000000
|
||||
bHasAimingMode=True
|
||||
StandardDisplayFOV=70.000000
|
||||
DisplayFOV=70.000000
|
||||
PlayerIronSightFOV=70.000000
|
||||
ZoomedDisplayFOV=50.000000
|
||||
SleeveNum=2
|
||||
TraderInfoTexture=Texture'KillingFloorHUD.Trader_Weapon_Images.Trader_Winchester'
|
||||
FireModeClass(0)=Class'NicePack.NiceWinchesterFire'
|
||||
FireModeClass(1)=Class'KFMod.NoFire'
|
||||
bShowChargingBar=True
|
||||
Description="A rugged and reliable single-shot rifle."
|
||||
Priority=85
|
||||
InventoryGroup=3
|
||||
GroupOffset=3
|
||||
PickupClass=Class'NicePack.NiceWinchesterPickup'
|
||||
AttachmentClass=Class'NicePack.NiceWinchesterAttachment'
|
||||
ItemName="Winchester"
|
||||
TransientSoundVolume=50.000000
|
||||
BobDamping=6.000000
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
class NiceWinchesterAmmo extends NiceAmmo;
|
||||
|
||||
#EXEC OBJ LOAD FILE=InterfaceContent.utx
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
WeaponPickupClass=Class'NicePack.NiceWinchesterPickup'
|
||||
AmmoPickupAmount=10
|
||||
MaxAmmo=80
|
||||
InitialAmount=20
|
||||
PickupClass=Class'NicePack.NiceWinchesterAmmoPickup'
|
||||
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
|
||||
IconCoords=(X1=338,Y1=40,X2=393,Y2=79)
|
||||
ItemName="Winchester bullets"
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
class NiceWinchesterAmmoPickup extends NiceAmmoPickup;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
AmmoAmount=10
|
||||
InventoryType=Class'NicePack.NiceWinchesterAmmo'
|
||||
PickupMessage=".44 rounds"
|
||||
StaticMesh=None
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
class NiceWinchesterAttachment extends NiceAttachment;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
mMuzFlashClass=Class'ROEffects.MuzzleFlash3rdSTG'
|
||||
mTracerClass=Class'KFMod.KFLargeTracer'
|
||||
MovementAnims(0)="JogF_Winchester"
|
||||
MovementAnims(1)="JogB_Winchester"
|
||||
MovementAnims(2)="JogL_Winchester"
|
||||
MovementAnims(3)="JogR_Winchester"
|
||||
TurnLeftAnim="TurnL_Winchester"
|
||||
TurnRightAnim="TurnR_Winchester"
|
||||
CrouchAnims(0)="CHwalkF_Winchester"
|
||||
CrouchAnims(1)="CHwalkB_Winchester"
|
||||
CrouchAnims(2)="CHwalkL_Winchester"
|
||||
CrouchAnims(3)="CHwalkR_Winchester"
|
||||
WalkAnims(0)="WalkF_Winchester"
|
||||
WalkAnims(1)="WalkB_Winchester"
|
||||
WalkAnims(2)="WalkL_Winchester"
|
||||
WalkAnims(3)="WalkR_Winchester"
|
||||
CrouchTurnRightAnim="CH_TurnR_Winchester"
|
||||
CrouchTurnLeftAnim="CH_TurnL_Winchester"
|
||||
IdleCrouchAnim="CHIdle_Winchester"
|
||||
IdleWeaponAnim="Idle_Winchester"
|
||||
IdleRestAnim="Idle_Winchester"
|
||||
IdleChatAnim="Idle_Winchester"
|
||||
IdleHeavyAnim="Idle_Winchester"
|
||||
IdleRifleAnim="Idle_Winchester"
|
||||
FireAnims(0)="Fire_Winchester"
|
||||
FireAnims(1)="Fire_Winchester"
|
||||
FireAnims(2)="Fire_Winchester"
|
||||
FireAnims(3)="Fire_Winchester"
|
||||
FireAltAnims(0)="Fire_Winchester"
|
||||
FireAltAnims(1)="Fire_Winchester"
|
||||
FireAltAnims(2)="Fire_Winchester"
|
||||
FireAltAnims(3)="Fire_Winchester"
|
||||
FireCrouchAnims(0)="CHFire_Winchester"
|
||||
FireCrouchAnims(1)="CHFire_Winchester"
|
||||
FireCrouchAnims(2)="CHFire_Winchester"
|
||||
FireCrouchAnims(3)="CHFire_Winchester"
|
||||
FireCrouchAltAnims(0)="CHFire_Winchester"
|
||||
FireCrouchAltAnims(1)="CHFire_Winchester"
|
||||
FireCrouchAltAnims(2)="CHFire_Winchester"
|
||||
FireCrouchAltAnims(3)="CHFire_Winchester"
|
||||
HitAnims(0)="HitF_Winchester"
|
||||
HitAnims(1)="HitB_Winchester"
|
||||
HitAnims(2)="HitL_Winchester"
|
||||
HitAnims(3)="HitR_Winchester"
|
||||
PostFireBlendStandAnim="Blend_Winchester"
|
||||
PostFireBlendCrouchAnim="CHBlend_Winchester"
|
||||
MeshRef="KF_Weapons3rd_Trip.Winchester_3rd"
|
||||
bHeavy=True
|
||||
SplashEffect=Class'ROEffects.BulletSplashEmitter'
|
||||
CullDistance=5000.000000
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
class NiceWinchesterFire extends NiceFire;
|
||||
|
||||
simulated function FillFireType(){
|
||||
local NWFireType fireType;
|
||||
fireType.fireTypeName = "crude";
|
||||
fireType.weapon.bulletsAmount = 1;
|
||||
fireType.weapon.ammoPerFire = 1;
|
||||
fireType.weapon.bCanFireIncomplete = false;
|
||||
fireType.weapon.fireRate = 0.562500;
|
||||
fireType.movement.bulletClass = class'NiceBullet';
|
||||
fireType.movement.speed = 37950.0;
|
||||
fireType.rebound.recoilVertical = 150;
|
||||
fireType.rebound.recoilHorizontal = 64;
|
||||
fireType.bullet.damage = 136;
|
||||
fireType.bullet.momentum = 18000;
|
||||
fireType.bullet.shotDamageType = class'NicePack.NiceDamTypeWinchester';
|
||||
fireTypes[0] = fireType;
|
||||
fireType.fireTypeName = "fine";
|
||||
fireType.bullet.damage = 10;
|
||||
fireType.bullet.shotDamageType = class'NicePack.NiceDamTypeWinGun';
|
||||
fireTypes[1] = fireType;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DamageType=Class'NicePack.NiceDamTypeWinchester'
|
||||
bPawnRapidFireAnim=true
|
||||
bWaitForRelease=false
|
||||
bModeExclusive=False
|
||||
bAttachSmokeEmitter=True
|
||||
TransientSoundVolume=1.800000
|
||||
AmmoClass=Class'NicePack.NiceWinchesterAmmo'
|
||||
ShakeRotMag=(X=100.000000,Y=100.000000,Z=500.000000)
|
||||
ShakeRotRate=(X=10000.000000,Y=10000.000000,Z=10000.000000)
|
||||
ShakeRotTime=2.000000
|
||||
ShakeOffsetMag=(X=10.000000,Y=3.000000,Z=12.000000)
|
||||
ShakeOffsetRate=(X=1000.000000,Y=1000.000000,Z=1000.000000)
|
||||
ShakeOffsetTime=2.000000
|
||||
FlashEmitterClass=Class'ROEffects.MuzzleFlash1stKar'
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
class NiceWinchesterPickup extends NiceWeaponPickup;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Weight=6.000000
|
||||
cost=200
|
||||
BuyClipSize=10
|
||||
PowerValue=50
|
||||
SpeedValue=35
|
||||
RangeValue=90
|
||||
Description="A rugged and reliable single-shot rifle."
|
||||
ItemName="Winchester"
|
||||
ItemShortName="Winchester"
|
||||
AmmoItemName="Winchester bullets"
|
||||
CorrespondingPerkIndex=2
|
||||
EquipmentCategoryID=2
|
||||
InventoryType=Class'NicePack.NiceWinchester'
|
||||
PickupMessage="You got Winchester"
|
||||
PickupSound=Sound'KF_RifleSnd.RifleBase.Rifle_Pickup'
|
||||
PickupForce="AssaultRiflePickup"
|
||||
StaticMesh=StaticMesh'KF_pickups_Trip.Rifle.LeverAction_pickup'
|
||||
CollisionRadius=30.000000
|
||||
CollisionHeight=5.000000
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue