Revert weapon conversion
This patch reverts first step of global weapon conversion that would have halted the release of the next version for too long.
This commit is contained in:
parent
3c46801714
commit
12d95e387e
757 changed files with 10788 additions and 4046 deletions
|
|
@ -0,0 +1,5 @@
|
|||
class NiceDamTypeFT extends NiceDamTypeFire
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
WeaponClass=Class'NicePack.NiceFlameThrower'
DeathString="%k incinerated %o (Flamethrower)."
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
class NiceFlameAmmo extends ScrnFlameAmmo;
|
||||
defaultproperties
|
||||
{
AmmoPickupAmount=30
MaxAmmo=200
InitialAmount=60
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
//
|
||||
//=============================================================================
|
||||
class NiceFlameBurstFire extends ScrnFlameBurstFire ;
|
||||
defaultproperties
|
||||
{
AmmoClass=Class'NicePack.NiceFlameAmmo'
ProjectileClass=Class'NicePack.NiceFlameTendril'
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
class NiceFlameNade extends NiceNade;
|
||||
#exec OBJ LOAD FILE=KF_GrenadeSnd.uax
|
||||
simulated function HurtRadius(float DamageAmount, float DamageRadius, class<DamageType> DamageType, float Momentum, vector HitLocation){
|
||||
local actor Victims;
|
||||
local float damageScale, dist;
|
||||
local vector dirs;
|
||||
local int NumKilled;
|
||||
local KFMonster KFMonsterVictim;
|
||||
local Pawn P;
|
||||
local KFPawn KFP;
|
||||
local array<Pawn> CheckedPawns;
|
||||
local int i;
|
||||
local bool bAlreadyChecked;
|
||||
if(bHurtEntry)
return;
|
||||
bHurtEntry = true;
|
||||
foreach CollidingActors(class 'Actor', Victims, DamageRadius, HitLocation){
// null pawn variables here just to be sure they didn't left from previous iteration
// and waste another day of my life to looking for this fucking bug -- PooSH /totallyPissedOff!!!
P = none;
KFMonsterVictim = none;
KFP = none;
// 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 ){
dirs = Victims.Location - HitLocation;
dist = FMax(1,VSize(dirs));
dirs = dirs/dist;
damageScale = 1 - FMax(0,(dist - Victims.CollisionRadius)/DamageRadius);
if(Instigator == none || Instigator.Controller == none)
Victims.SetDelayedDamageInstigatorController(InstigatorController);
if(Victims == LastTouched)
LastTouched = none;
|
||||
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(HitLocation);
else if(KFP != none)
damageScale *= KFP.GetExposureTo(HitLocation);
|
||||
CheckedPawns[CheckedPawns.Length] = P;
|
||||
if(damageScale <= 0){
P = none;
continue;
}
else
P = none;
}
|
||||
if(KFP != none || KFMonsterVictim != none || Nade(Victims) != none)
Victims.TakeDamage
(
damageScale * DamageAmount,
Instigator,
Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dirs,
(damageScale * Momentum * dirs),
DamageType
);
|
||||
if(Role == ROLE_Authority && KFMonsterVictim != none && KFMonsterVictim.Health <= 0)
NumKilled++;
}
|
||||
}
|
||||
if(Role == ROLE_Authority){
if(NumKilled >= 4)
KFGameType(Level.Game).DramaticEvent(0.05);
else if(NumKilled >= 2)
KFGameType(Level.Game).DramaticEvent(0.03);
|
||||
}
|
||||
bHurtEntry = false;
|
||||
}
|
||||
simulated function Explode(vector HitLocation, vector HitNormal){
|
||||
local PlayerController LocalPlayer;
|
||||
bHasExploded = True;
|
||||
BlowUp(HitLocation);
|
||||
// Incendiary Effects..
|
||||
PlaySound(sound'KF_GrenadeSnd.FlameNade_Explode',, 100.5 * TransientSoundVolume);
|
||||
if(EffectIsRelevant(Location, false)){
Spawn(Class'KFIncendiaryExplosion',,, 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();
|
||||
}
|
||||
defaultproperties
|
||||
{
AvoidMarkerClass=Class'NicePack.NiceAvoidMarkerFlame'
MyDamageType=Class'NicePack.NiceDamTypeFlameNade'
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
//=============================================================================
|
||||
// Flame
|
||||
//=============================================================================
|
||||
class NiceFlameTendril extends ScrnFlameTendril;
|
||||
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 KFMonster KFMonsterVictim;
|
||||
|
||||
if ( bHurtEntry )
return;
|
||||
bHurtEntry = true;
|
||||
foreach VisibleCollidingActors( class 'Actor', Victims, DamageRadius, HitLocation )
|
||||
{
KFMonsterVictim = none; //tbs
// 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') )
{
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 );
if ( Victims == LastTouched )
LastTouched = none;
KFMonsterVictim = KFMonster(Victims);
|
||||
if( KFMonsterVictim != none && KFMonsterVictim.Health <= 0 )
{
KFMonsterVictim = none;
} Victims.TakeDamage
(
damageScale * DamageAmount,
Instigator,
Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir,
(damageScale * Momentum * dir),
DamageType
);
if (Vehicle(Victims) != none && Vehicle(Victims).Health > 0)
Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation);
|
||||
}
|
||||
}
|
||||
/*
|
||||
if ( (LastTouched != none) && (LastTouched != self) && (LastTouched.Role == ROLE_Authority) && !LastTouched.IsA('FluidSurfaceInfo') )
|
||||
{
Victims = LastTouched;
LastTouched = none;
dir = Victims.Location - HitLocation;
dist = FMax(1,VSize(dir));
dir = dir/dist;
damageScale = FMax(Victims.CollisionRadius/(Victims.CollisionRadius + Victims.CollisionHeight),1 - FMax(0,(dist - Victims.CollisionRadius)/DamageRadius));
if ( Instigator == none || Instigator.Controller == none )
Victims.SetDelayedDamageInstigatorController(InstigatorController);
Victims.TakeDamage
(
damageScale * DamageAmount,
Instigator,
Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir,
(damageScale * Momentum * dir),
DamageType
);
if (Vehicle(Victims) != none && Vehicle(Victims).Health > 0)
Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation);
|
||||
}
|
||||
*/
|
||||
bHurtEntry = false;
|
||||
}
|
||||
defaultproperties
|
||||
{
Damage=16.000000
MyDamageType=Class'NicePack.NiceDamTypeFT'
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
//=============================================================================
|
||||
// FlameChucker
|
||||
//=============================================================================
|
||||
class NiceFlameThrower extends ScrnFlameThrower;
|
||||
var bool bFiring;
|
||||
simulated function bool StartFire(int Mode)
|
||||
{
|
||||
if(MagAmmoRemaining >= 1 && FireMode[Mode].AllowFire())
|
||||
bFiring = true;
|
||||
return Super.StartFire(Mode);
|
||||
}
|
||||
simulated event StopFire(int Mode)
|
||||
{
|
||||
if(MagAmmoRemaining < 1 || Mode != 0){
|
||||
bFiring = false;
|
||||
Super.StopFire(0);
|
||||
}
|
||||
}
|
||||
simulated function bool PutDown()
|
||||
{
|
||||
if ( bFiring && Instigator != none && Instigator.PendingWeapon != none && AmmoAmount(0) > 0 ) {
Instigator.PendingWeapon = none;
return false;
|
||||
}
|
||||
return Super.PutDown();
|
||||
}
|
||||
function bool AllowReload()
|
||||
{
|
||||
if ( bFiring )
return false;
return Super.AllowReload();
|
||||
}
|
||||
simulated function WeaponTick(float dt)
|
||||
{
|
||||
if(MagAmmoRemaining < 1 && bFiring)
|
||||
StartFire(0);
|
||||
Super.WeaponTick(dt);
|
||||
// if(FireMode[0].bIsFiring)
|
||||
// Skins[4] = Shader 'KillingFloorWeapons.FlameThrower.FTFireShader';
|
||||
// else
|
||||
// Skins[4] = default.Skins[4];
|
||||
}
|
||||
defaultproperties
|
||||
{
MagCapacity=30
Weight=8.000000
bModeZeroCanDryFire=False
FireModeClass(0)=Class'NicePack.NiceFlameBurstFire'
PickupClass=Class'NicePack.NiceFlameThrowerPickup'
ItemName="FlameThrower NW"
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
//=============================================================================
|
||||
// L85 Pickup.
|
||||
//=============================================================================
|
||||
class NiceFlameThrowerPickup extends ScrnFlameThrowerPickup;
|
||||
defaultproperties
|
||||
{
ItemName="FlameThrower NW"
ItemShortName="Flamer NW"
InventoryType=Class'NicePack.NiceFlameThrower'
PickupMessage="You got the Flamethrower NW."
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue