Fix new line symbol issues

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

View file

@ -1,5 +1,10 @@
class NiceDamTypeHuskGun extends NiceDamTypeFire
abstract;
defaultproperties
{ bCheckForHeadShots=True WeaponClass=Class'NicePack.NiceHuskGun' DeathString="%k killed %o (Husk Gun)." FemaleSuicide="%o blew up." MaleSuicide="%o blew up."
}
class NiceDamTypeHuskGun extends NiceDamTypeFire
abstract;
defaultproperties
{
bCheckForHeadShots=True
WeaponClass=Class'NicePack.NiceHuskGun'
DeathString="%k killed %o (Husk Gun)."
FemaleSuicide="%o blew up."
MaleSuicide="%o blew up."
}

View file

@ -1,14 +1,33 @@
class NiceDamTypeHuskGunProjectileImpact extends NiceDamTypeFire;
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';
}
static function AwardDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount)
{
KFStatsAndAchievements.AddFlameThrowerDamage(Amount);
}
defaultproperties
{ HeadShotDamageMult=1.500000 bCheckForHeadShots=True WeaponClass=Class'NicePack.NiceHuskGun' DeathString="%k killed %o (Husk Gun)." FemaleSuicide="%o blew up." MaleSuicide="%o blew up." bRagdollBullet=True bBulletHit=True PawnDamageEmitter=Class'ROEffects.ROBloodPuff' LowGoreDamageEmitter=Class'ROEffects.ROBloodPuffNoGore' LowDetailEmitter=Class'ROEffects.ROBloodPuffSmall' DeathOverlayMaterial=Combiner'Effects_Tex.GoreDecals.PlayerDeathOverlay' DeathOverlayTime=999.000000 KDamageImpulse=10000.000000 KDeathVel=300.000000 KDeathUpKick=100.000000 HumanObliterationThreshhold=200
}
class NiceDamTypeHuskGunProjectileImpact extends NiceDamTypeFire;
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';
}
static function AwardDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount)
{
KFStatsAndAchievements.AddFlameThrowerDamage(Amount);
}
defaultproperties
{
HeadShotDamageMult=1.500000
bCheckForHeadShots=True
WeaponClass=Class'NicePack.NiceHuskGun'
DeathString="%k killed %o (Husk Gun)."
FemaleSuicide="%o blew up."
MaleSuicide="%o blew up."
bRagdollBullet=True
bBulletHit=True
PawnDamageEmitter=Class'ROEffects.ROBloodPuff'
LowGoreDamageEmitter=Class'ROEffects.ROBloodPuffNoGore'
LowDetailEmitter=Class'ROEffects.ROBloodPuffSmall'
DeathOverlayMaterial=Combiner'Effects_Tex.GoreDecals.PlayerDeathOverlay'
DeathOverlayTime=999.000000
KDamageImpulse=10000.000000
KDeathVel=300.000000
KDeathUpKick=100.000000
HumanObliterationThreshhold=200
}

View file

@ -1,5 +1,10 @@
class NiceDamTypeHuskGun_Alt extends NiceDamTypeHuskGun
abstract;
defaultproperties
{ HeadShotDamageMult=1.000000 bCheckForHeadShots=False DeathString="%k burned down %o with Napalm." FemaleSuicide="%o burned her pretty butt up." MaleSuicide="%o burned his a** up."
}
class NiceDamTypeHuskGun_Alt extends NiceDamTypeHuskGun
abstract;
defaultproperties
{
HeadShotDamageMult=1.000000
bCheckForHeadShots=False
DeathString="%k burned down %o with Napalm."
FemaleSuicide="%o burned her pretty butt up."
MaleSuicide="%o burned his a** up."
}

View file

@ -1,52 +1,126 @@
/**
* Attempt to make Husk Gun actually usefull.
*/
class NiceHuskGun extends ScrnHuskGun;
/*
// both fire modes share the same ammo pool, so don't give ammo twice
function GiveAmmo(int m, WeaponPickup WP, bool bJustSpawned)
{
local bool bJustSpawnedAmmo;
local int addAmount, InitialAmount;
local float AddMultiplier;
UpdateMagCapacity(Instigator.PlayerReplicationInfo);
if ( FireMode[m] != none && FireMode[m].AmmoClass != none )
{ Ammo[m] = Ammunition(Instigator.FindInventoryType(FireMode[m].AmmoClass)); bJustSpawnedAmmo = false;
if ( bNoAmmoInstances ) { if ( (FireMode[m].AmmoClass == none) || ((m != 0) && (FireMode[m].AmmoClass == FireMode[0].AmmoClass)) ) return;
InitialAmount = FireMode[m].AmmoClass.Default.InitialAmount;
if(WP!=none && WP.bThrown==true) InitialAmount = WP.AmmoAmount[m]; else { // Other change - if not thrown, give the gun a full clip MagAmmoRemaining = MagCapacity; }
if ( Ammo[m] != none ) { addamount = InitialAmount + Ammo[m].AmmoAmount; Ammo[m].Destroy(); } else addAmount = InitialAmount;
AddAmmo(addAmount,m); } else { if ( (Ammo[m] == none) && (FireMode[m].AmmoClass != none) ) { Ammo[m] = Spawn(FireMode[m].AmmoClass, Instigator); Instigator.AddInventory(Ammo[m]); bJustSpawnedAmmo = true; } else if ( (m == 0) || (FireMode[m].AmmoClass != FireMode[0].AmmoClass) ) bJustSpawnedAmmo = ( bJustSpawned || ((WP != none) && !WP.bWeaponStay) );
// and here is the modification for instanced ammo actors
if(WP!=none && WP.bThrown==true) { addAmount = WP.AmmoAmount[m]; } else if ( bJustSpawnedAmmo ) { if ( KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo) != none && KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill != none ) { AddMultiplier = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill.static.AddExtraAmmoFor(KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo), FireMode[m].AmmoClass); } else { AddMultiplier = 1.0; }
if (default.MagCapacity == 0) addAmount = 0; // prevent division by zero. else addAmount = Ammo[m].InitialAmount * (float(MagCapacity) / float(default.MagCapacity)) * AddMultiplier; }
//removed: WP.Class == class'BoomstickPickup' -- (c) PooSH if ( WP != none && m > 0 ) { return; }
Ammo[m].AddAmmo(addAmount); Ammo[m].GotoState(''); }
}
}
*/
/*
simulated function bool ConsumeAmmo( int Mode, float Load, optional bool bAmountNeededIsMax )
{
return super.ConsumeAmmo(0, Load, bAmountNeededIsMax);
}
simulated function int AmmoAmount(int mode)
{
return super.AmmoAmount(0);
}
*/
/*
//v2.60: Reload speed bonus affects charge rate
simulated function bool StartFire(int Mode)
{
local ScrnHuskGunFire f;
local KFPlayerReplicationInfo KFPRI;
if ( super.StartFire(Mode) ) { f = ScrnHuskGunFire(FireMode[Mode]); if ( Mode == 0 && f != none ) { f.MaxChargeTime = f.default.MaxChargeTime; KFPRI = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo); if ( KFPRI != none && KFPRI.ClientVeteranSkill != none) f.MaxChargeTime /= KFPRI.ClientVeteranSkill.static.GetReloadSpeedModifier(KFPRI, self); } return true;
}
return false;
}
*/
defaultproperties
{ Weight=8.000000 FireModeClass(0)=Class'NicePack.NiceHuskGunFire' FireModeClass(1)=Class'NicePack.NiceHuskGunAltFire' PickupClass=Class'NicePack.NiceHuskGunPickup' ItemName="Husk Gun / Napalm Launcher NW"
}
/**
* Attempt to make Husk Gun actually usefull.
*/
class NiceHuskGun extends ScrnHuskGun;
/*
// both fire modes share the same ammo pool, so don't give ammo twice
function GiveAmmo(int m, WeaponPickup WP, bool bJustSpawned)
{
local bool bJustSpawnedAmmo;
local int addAmount, InitialAmount;
local float AddMultiplier;
UpdateMagCapacity(Instigator.PlayerReplicationInfo);
if ( FireMode[m] != none && FireMode[m].AmmoClass != none )
{
Ammo[m] = Ammunition(Instigator.FindInventoryType(FireMode[m].AmmoClass));
bJustSpawnedAmmo = false;
if ( bNoAmmoInstances )
{
if ( (FireMode[m].AmmoClass == none) || ((m != 0) && (FireMode[m].AmmoClass == FireMode[0].AmmoClass)) )
return;
InitialAmount = FireMode[m].AmmoClass.Default.InitialAmount;
if(WP!=none && WP.bThrown==true)
InitialAmount = WP.AmmoAmount[m];
else
{
// Other change - if not thrown, give the gun a full clip
MagAmmoRemaining = MagCapacity;
}
if ( Ammo[m] != none )
{
addamount = InitialAmount + Ammo[m].AmmoAmount;
Ammo[m].Destroy();
}
else
addAmount = InitialAmount;
AddAmmo(addAmount,m);
}
else
{
if ( (Ammo[m] == none) && (FireMode[m].AmmoClass != none) )
{
Ammo[m] = Spawn(FireMode[m].AmmoClass, Instigator);
Instigator.AddInventory(Ammo[m]);
bJustSpawnedAmmo = true;
}
else if ( (m == 0) || (FireMode[m].AmmoClass != FireMode[0].AmmoClass) )
bJustSpawnedAmmo = ( bJustSpawned || ((WP != none) && !WP.bWeaponStay) );
// and here is the modification for instanced ammo actors
if(WP!=none && WP.bThrown==true)
{
addAmount = WP.AmmoAmount[m];
}
else if ( bJustSpawnedAmmo )
{
if ( KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo) != none && KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill != none )
{
AddMultiplier = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill.static.AddExtraAmmoFor(KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo), FireMode[m].AmmoClass);
}
else
{
AddMultiplier = 1.0;
}
if (default.MagCapacity == 0)
addAmount = 0; // prevent division by zero.
else
addAmount = Ammo[m].InitialAmount * (float(MagCapacity) / float(default.MagCapacity)) * AddMultiplier;
}
//removed: WP.Class == class'BoomstickPickup' -- (c) PooSH
if ( WP != none && m > 0 )
{
return;
}
Ammo[m].AddAmmo(addAmount);
Ammo[m].GotoState('');
}
}
}
*/
/*
simulated function bool ConsumeAmmo( int Mode, float Load, optional bool bAmountNeededIsMax )
{
return super.ConsumeAmmo(0, Load, bAmountNeededIsMax);
}
simulated function int AmmoAmount(int mode)
{
return super.AmmoAmount(0);
}
*/
/*
//v2.60: Reload speed bonus affects charge rate
simulated function bool StartFire(int Mode)
{
local ScrnHuskGunFire f;
local KFPlayerReplicationInfo KFPRI;
if ( super.StartFire(Mode) ) {
f = ScrnHuskGunFire(FireMode[Mode]);
if ( Mode == 0 && f != none ) {
f.MaxChargeTime = f.default.MaxChargeTime;
KFPRI = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo);
if ( KFPRI != none && KFPRI.ClientVeteranSkill != none)
f.MaxChargeTime /= KFPRI.ClientVeteranSkill.static.GetReloadSpeedModifier(KFPRI, self);
}
return true;
}
return false;
}
*/
defaultproperties
{
Weight=8.000000
FireModeClass(0)=Class'NicePack.NiceHuskGunFire'
FireModeClass(1)=Class'NicePack.NiceHuskGunAltFire'
PickupClass=Class'NicePack.NiceHuskGunPickup'
ItemName="Husk Gun / Napalm Launcher NW"
}

View file

@ -1,29 +1,33 @@
// NAPALM THROWER
class NiceHuskGunAltFire extends ScrnHuskGunAltFire;
/*
//instant shot, without holding
function ModeHoldFire() { }
function Charge() { }
function PlayPreFire() { }
function Timer() { }
function class<Projectile> GetDesiredProjectileClass()
{
return ProjectileClass;
}
function PostSpawnProjectile(Projectile P)
{
super(KFShotgunFire).PostSpawnProjectile(P); // bypass HuskGunFire
}
simulated function bool AllowFire()
{
return (Weapon.AmmoAmount(ThisModeNum) >= MaxChargeAmmo);
}
function ModeDoFire()
{
if (!AllowFire()) return; Weapon.ConsumeAmmo(ThisModeNum, MaxChargeAmmo-1); // +1 will be consumed in parent function
super(KFShotgunFire).ModeDoFire();
}
*/
defaultproperties
{ MaxChargeAmmo=30 ProjectileClass=Class'NicePack.NiceHuskGunProjectile_Alt'
}
// NAPALM THROWER
class NiceHuskGunAltFire extends ScrnHuskGunAltFire;
/*
//instant shot, without holding
function ModeHoldFire() { }
function Charge() { }
function PlayPreFire() { }
function Timer() { }
function class<Projectile> GetDesiredProjectileClass()
{
return ProjectileClass;
}
function PostSpawnProjectile(Projectile P)
{
super(KFShotgunFire).PostSpawnProjectile(P); // bypass HuskGunFire
}
simulated function bool AllowFire()
{
return (Weapon.AmmoAmount(ThisModeNum) >= MaxChargeAmmo);
}
function ModeDoFire()
{
if (!AllowFire())
return;
Weapon.ConsumeAmmo(ThisModeNum, MaxChargeAmmo-1); // +1 will be consumed in parent function
super(KFShotgunFire).ModeDoFire();
}
*/
defaultproperties
{
MaxChargeAmmo=30
ProjectileClass=Class'NicePack.NiceHuskGunProjectile_Alt'
}

View file

@ -1,4 +1,7 @@
class NiceHuskGunAmmo extends ScrnHuskGunAmmo;
defaultproperties
{ MaxAmmo=150 InitialAmount=75 PickupClass=Class'NicePack.NiceHuskGunAmmoPickup'
}
class NiceHuskGunAmmo extends ScrnHuskGunAmmo;
defaultproperties
{
MaxAmmo=150
InitialAmount=75
PickupClass=Class'NicePack.NiceHuskGunAmmoPickup'
}

View file

@ -1,4 +1,5 @@
class NiceHuskGunAmmoPickup extends ScrnHuskGunAmmoPickup;
defaultproperties
{ InventoryType=Class'NicePack.NiceHuskGunAmmo'
}
class NiceHuskGunAmmoPickup extends ScrnHuskGunAmmoPickup;
defaultproperties
{
InventoryType=Class'NicePack.NiceHuskGunAmmo'
}

View file

@ -1,93 +1,160 @@
class NiceHuskGunFire extends ScrnHuskGunFire;
/*
var int AmmoInCharge; //current charged amount var() int MaxChargeAmmo; //maximum charge
function Timer()
{
//local PlayerController Player;
//consume ammo while charging
if ( HoldTime > 0.0 && !bNowWaiting && AmmoInCharge < MaxChargeAmmo && Weapon.AmmoAmount(ThisModeNum) > 0 ) { Charge(); // if (AmmoInCharge == MaxChargeAmmo) { // Player = Level.GetLocalPlayerController(); // if (Player != none) // Player.ReceiveLocalizedMessage(class'ScrnBalanceSrv.ScrnPlayerMessage',0); // }
}
super.Timer();
}
function Charge()
{
local int AmmoShouldConsumed;
if( HoldTime < MaxChargeTime) AmmoShouldConsumed = clamp(round(MaxChargeAmmo*HoldTime/MaxChargeTime), 1, MaxChargeAmmo);
else AmmoShouldConsumed = MaxChargeAmmo;// full charge
if (AmmoShouldConsumed != AmmoInCharge) { if (AmmoShouldConsumed - AmmoInCharge > Weapon.AmmoAmount(ThisModeNum)) AmmoShouldConsumed = Weapon.AmmoAmount(ThisModeNum) + AmmoInCharge; Weapon.ConsumeAmmo(ThisModeNum, AmmoShouldConsumed - AmmoInCharge); AmmoInCharge = AmmoShouldConsumed; ScrnHuskGun(Weapon).ChargeAmount = GetChargeAmount();
}
}
function float GetChargeAmount()
{
return float(AmmoInCharge) / float(MaxChargeAmmo);
}
simulated function bool AllowFire()
{
return (Weapon.AmmoAmount(ThisModeNum) >= AmmoPerFire);
}
*/
//overrided to restore old damage radius
//(c) PooSH
function PostSpawnProjectile(Projectile P)
{
local HuskGunProjectile HGP;
super(KFShotgunFire).PostSpawnProjectile(P);
HGP = HuskGunProjectile(p);
if ( HGP != none ) { if( AmmoInCharge < MaxChargeAmmo ) { HGP.ImpactDamage *= AmmoInCharge; HGP.Damage *= 1.0 + GetChargeAmount(); // up to 2x damage HGP.DamageRadius *= 1.0 + 2 * GetChargeAmount();// up 2x the damage radius } else { HGP.ImpactDamage *= MaxChargeAmmo; //50*10 = 500 HGP.Damage *= 2.0; // up from 2x HGP.DamageRadius *= 3.0; // down from x3 } AmmoInCharge = 0; //reset charge after spawning a projectile ScrnHuskGun(Weapon).ChargeAmount = 0;
}
}
/*
//copy pasted and cutted out ammo consuming, because we did it in time
function ModeDoFire()
{
local float Rec;
if (!AllowFire() && HoldTime ~= 0) return;
Spread = Default.Spread;
Rec = 1;
if ( KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo) != none && KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill != none )
{ Spread *= KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill.Static.ModifyRecoilSpread(KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo), self, Rec);
}
if( !bFiringDoesntAffectMovement )
{ if (FireRate > 0.25) { Instigator.Velocity.x *= 0.1; Instigator.Velocity.y *= 0.1; } else { Instigator.Velocity.x *= 0.5; Instigator.Velocity.y *= 0.5; }
}
if (!AllowFire() && HoldTime ~= 0) return;
if (MaxHoldTime > 0.0) HoldTime = FMin(HoldTime, MaxHoldTime);
// server
if (Weapon.Role == ROLE_Authority)
{ Charge();
DoFireEffect(); HoldTime = 0; // if bot decides to stop firing, HoldTime must be reset first if ( (Instigator == none) || (Instigator.Controller == none) ) return;
if ( AIController(Instigator.Controller) != none ) AIController(Instigator.Controller).WeaponFireAgain(BotRefireRate, true);
Instigator.DeactivateSpawnProtection();
}
// client
if (Instigator.IsLocallyControlled())
{ ShakeView(); PlayFiring(); FlashMuzzleFlash(); StartMuzzleSmoke();
}
else // server
{ ServerPlayFiring();
}
Weapon.IncrementFlashCount(ThisModeNum);
// set the next firing time. must be careful here so client and server do not get out of sync
if (bFireOnRelease)
{ if (bIsFiring) NextFireTime += MaxHoldTime + FireRate; else NextFireTime = Level.TimeSeconds + FireRate;
}
else
{ NextFireTime += FireRate; NextFireTime = FMax(NextFireTime, Level.TimeSeconds);
}
Load = AmmoPerFire;
HoldTime = 0;
AmmoInCharge = 0;
if (Instigator.PendingWeapon != Weapon && Instigator.PendingWeapon != none)
{ bIsFiring = false; Weapon.PutDown();
}
// client
if (Instigator.IsLocallyControlled())
{ HandleRecoil(Rec);
}
}
*/
defaultproperties
{ WeakProjectileClass=Class'NicePack.NiceHuskGunProjectile_Weak' StrongProjectileClass=Class'NicePack.NiceHuskGunProjectile_Strong' AmmoClass=Class'NicePack.NiceHuskGunAmmo' ProjectileClass=Class'NicePack.NiceHuskGunProjectile'
}
class NiceHuskGunFire extends ScrnHuskGunFire;
/*
var int AmmoInCharge; //current charged amount var() int MaxChargeAmmo; //maximum charge
function Timer()
{
//local PlayerController Player;
//consume ammo while charging
if ( HoldTime > 0.0 && !bNowWaiting && AmmoInCharge < MaxChargeAmmo && Weapon.AmmoAmount(ThisModeNum) > 0 ) {
Charge();
// if (AmmoInCharge == MaxChargeAmmo) {
// Player = Level.GetLocalPlayerController();
// if (Player != none)
// Player.ReceiveLocalizedMessage(class'ScrnBalanceSrv.ScrnPlayerMessage',0);
// }
}
super.Timer();
}
function Charge()
{
local int AmmoShouldConsumed;
if( HoldTime < MaxChargeTime)
AmmoShouldConsumed = clamp(round(MaxChargeAmmo*HoldTime/MaxChargeTime), 1, MaxChargeAmmo);
else
AmmoShouldConsumed = MaxChargeAmmo;// full charge
if (AmmoShouldConsumed != AmmoInCharge) {
if (AmmoShouldConsumed - AmmoInCharge > Weapon.AmmoAmount(ThisModeNum))
AmmoShouldConsumed = Weapon.AmmoAmount(ThisModeNum) + AmmoInCharge;
Weapon.ConsumeAmmo(ThisModeNum, AmmoShouldConsumed - AmmoInCharge);
AmmoInCharge = AmmoShouldConsumed;
ScrnHuskGun(Weapon).ChargeAmount = GetChargeAmount();
}
}
function float GetChargeAmount()
{
return float(AmmoInCharge) / float(MaxChargeAmmo);
}
simulated function bool AllowFire()
{
return (Weapon.AmmoAmount(ThisModeNum) >= AmmoPerFire);
}
*/
//overrided to restore old damage radius
//(c) PooSH
function PostSpawnProjectile(Projectile P)
{
local HuskGunProjectile HGP;
super(KFShotgunFire).PostSpawnProjectile(P);
HGP = HuskGunProjectile(p);
if ( HGP != none ) {
if( AmmoInCharge < MaxChargeAmmo )
{
HGP.ImpactDamage *= AmmoInCharge;
HGP.Damage *= 1.0 + GetChargeAmount(); // up to 2x damage
HGP.DamageRadius *= 1.0 + 2 * GetChargeAmount();// up 2x the damage radius
}
else
{
HGP.ImpactDamage *= MaxChargeAmmo; //50*10 = 500
HGP.Damage *= 2.0; // up from 2x
HGP.DamageRadius *= 3.0; // down from x3
}
AmmoInCharge = 0; //reset charge after spawning a projectile
ScrnHuskGun(Weapon).ChargeAmount = 0;
}
}
/*
//copy pasted and cutted out ammo consuming, because we did it in time
function ModeDoFire()
{
local float Rec;
if (!AllowFire() && HoldTime ~= 0)
return;
Spread = Default.Spread;
Rec = 1;
if ( KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo) != none && KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill != none )
{
Spread *= KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill.Static.ModifyRecoilSpread(KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo), self, Rec);
}
if( !bFiringDoesntAffectMovement )
{
if (FireRate > 0.25)
{
Instigator.Velocity.x *= 0.1;
Instigator.Velocity.y *= 0.1;
}
else
{
Instigator.Velocity.x *= 0.5;
Instigator.Velocity.y *= 0.5;
}
}
if (!AllowFire() && HoldTime ~= 0)
return;
if (MaxHoldTime > 0.0)
HoldTime = FMin(HoldTime, MaxHoldTime);
// server
if (Weapon.Role == ROLE_Authority)
{
Charge();
DoFireEffect();
HoldTime = 0; // if bot decides to stop firing, HoldTime must be reset first
if ( (Instigator == none) || (Instigator.Controller == none) )
return;
if ( AIController(Instigator.Controller) != none )
AIController(Instigator.Controller).WeaponFireAgain(BotRefireRate, true);
Instigator.DeactivateSpawnProtection();
}
// client
if (Instigator.IsLocallyControlled())
{
ShakeView();
PlayFiring();
FlashMuzzleFlash();
StartMuzzleSmoke();
}
else // server
{
ServerPlayFiring();
}
Weapon.IncrementFlashCount(ThisModeNum);
// set the next firing time. must be careful here so client and server do not get out of sync
if (bFireOnRelease)
{
if (bIsFiring)
NextFireTime += MaxHoldTime + FireRate;
else
NextFireTime = Level.TimeSeconds + FireRate;
}
else
{
NextFireTime += FireRate;
NextFireTime = FMax(NextFireTime, Level.TimeSeconds);
}
Load = AmmoPerFire;
HoldTime = 0;
AmmoInCharge = 0;
if (Instigator.PendingWeapon != Weapon && Instigator.PendingWeapon != none)
{
bIsFiring = false;
Weapon.PutDown();
}
// client
if (Instigator.IsLocallyControlled())
{
HandleRecoil(Rec);
}
}
*/
defaultproperties
{
WeakProjectileClass=Class'NicePack.NiceHuskGunProjectile_Weak'
StrongProjectileClass=Class'NicePack.NiceHuskGunProjectile_Strong'
AmmoClass=Class'NicePack.NiceHuskGunAmmo'
ProjectileClass=Class'NicePack.NiceHuskGunProjectile'
}

View file

@ -1,4 +1,8 @@
class NiceHuskGunPickup extends ScrnHuskGunPickup;
defaultproperties
{ Weight=8.000000 ItemName="Husk Gun / Napalm Launcher NW" ItemShortName="Husk Gun NW" InventoryType=Class'NicePack.NiceHuskGun'
}
class NiceHuskGunPickup extends ScrnHuskGunPickup;
defaultproperties
{
Weight=8.000000
ItemName="Husk Gun / Napalm Launcher NW"
ItemShortName="Husk Gun NW"
InventoryType=Class'NicePack.NiceHuskGun'
}

View file

@ -1,74 +1,188 @@
class NiceHuskGunProjectile extends ScrnHuskGunProjectile;
simulated function ProcessTouch(Actor Other, Vector HitLocation)
{
local vector X;
local Vector TempHitLocation, HitNormal;
local array<int> HitPoints;
local KFPawn HitPawn;
// Don't let it hit this player, or blow up on another player
if ( Other == none || Other == Instigator || Other.Base == Instigator ) return;
// Don't collide with bullet whip attachments
if( KFBulletWhipAttachment(Other) != none )
{ return;
}
// Don't allow hits on poeple on the same team
if( KFHumanPawn(Other) != none && Instigator != none && KFHumanPawn(Other).PlayerReplicationInfo.Team.TeamIndex == Instigator.PlayerReplicationInfo.Team.TeamIndex )
{ return;
}
if( !bDud )
{ Explode(HitLocation,Normal(HitLocation-Other.Location));
}
// Use the instigator's location if it exists. This fixes issues with
// the original location of the projectile being really far away from
// the real Origloc due to it taking a couple of milliseconds to
// replicate the location to the client and the first replicated location has
// already moved quite a bit.
if( Instigator != none )
{ OrigLoc = Instigator.Location;
}
X = Vector(Rotation);
if( Role == ROLE_Authority )
{ if( ROBulletWhipAttachment(Other) != none ) { if(!Other.Base.bDeleteMe) { Other = Instigator.HitPointTrace(TempHitLocation, HitNormal, HitLocation + (200 * X), HitPoints, HitLocation,, 1);
if( Other == none || HitPoints.Length == 0 ) return;
HitPawn = KFPawn(Other);
if (Role == ROLE_Authority) { if ( HitPawn != none ) { // Hit detection debugging /*log("Bullet hit "$HitPawn.PlayerReplicationInfo.PlayerName); HitPawn.HitStart = HitLocation; HitPawn.HitEnd = HitLocation + (65535 * X);*/
if( !HitPawn.bDeleteMe ) HitPawn.ProcessLocationalDamage(ImpactDamage, Instigator, TempHitLocation, MomentumTransfer * Normal(Velocity), ImpactDamageType,HitPoints);
// Hit detection debugging //if( Level.NetMode == NM_Standalone) // HitPawn.DrawBoneLocation(); } } } } else { if (Pawn(Other) != none && Pawn(Other).IsHeadShot(HitLocation, X, 1.0)) { Pawn(Other).TakeDamage(ImpactDamage * HeadShotDamageMult, Instigator, HitLocation, MomentumTransfer * Normal(Velocity), ImpactDamageType); } else { Other.TakeDamage(ImpactDamage, Instigator, HitLocation, MomentumTransfer * Normal(Velocity), ImpactDamageType); } }
}
}
// Overrided to not use alternate burning mechanism
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 Pawn P;
local KFMonster KFMonsterVictim;
local KFPawn KFP;
local array<Pawn> CheckedPawns;
local int i;
local bool bAlreadyChecked;
//local int OldHealth;
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; if(Victims == none) continue; // don't let blast damage affect fluid - VisibleCollisingActors doesn't really work for them - jag if( (Victims != self) && (Victims != Instigator) &&(Hurtwall != Victims) && (Victims.Role == ROLE_Authority) && !Victims.IsA('FluidSurfaceInfo') && ExtendedZCollision(Victims)==none && KFBulletWhipAttachment(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; }
if( KFMonsterVictim != none && KFMonsterVictim.Health <= 0 ) { KFMonsterVictim = none; }
KFMonsterVictim = KFMonster(Victims); 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) continue; }
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;
}
defaultproperties
{ HeadShotDamageMult=1.500000 ImpactDamageType=Class'NicePack.NiceDamTypeHuskGunProjectileImpact' ImpactDamage=50
}
class NiceHuskGunProjectile extends ScrnHuskGunProjectile;
simulated function ProcessTouch(Actor Other, Vector HitLocation)
{
local vector X;
local Vector TempHitLocation, HitNormal;
local array<int> HitPoints;
local KFPawn HitPawn;
// Don't let it hit this player, or blow up on another player
if ( Other == none || Other == Instigator || Other.Base == Instigator )
return;
// Don't collide with bullet whip attachments
if( KFBulletWhipAttachment(Other) != none )
{
return;
}
// Don't allow hits on poeple on the same team
if( KFHumanPawn(Other) != none && Instigator != none
&& KFHumanPawn(Other).PlayerReplicationInfo.Team.TeamIndex == Instigator.PlayerReplicationInfo.Team.TeamIndex )
{
return;
}
if( !bDud )
{
Explode(HitLocation,Normal(HitLocation-Other.Location));
}
// Use the instigator's location if it exists. This fixes issues with
// the original location of the projectile being really far away from
// the real Origloc due to it taking a couple of milliseconds to
// replicate the location to the client and the first replicated location has
// already moved quite a bit.
if( Instigator != none )
{
OrigLoc = Instigator.Location;
}
X = Vector(Rotation);
if( Role == ROLE_Authority )
{
if( ROBulletWhipAttachment(Other) != none )
{
if(!Other.Base.bDeleteMe)
{
Other = Instigator.HitPointTrace(TempHitLocation, HitNormal, HitLocation + (200 * X), HitPoints, HitLocation,, 1);
if( Other == none || HitPoints.Length == 0 )
return;
HitPawn = KFPawn(Other);
if (Role == ROLE_Authority)
{
if ( HitPawn != none )
{
// Hit detection debugging
/*log("Bullet hit "$HitPawn.PlayerReplicationInfo.PlayerName);
HitPawn.HitStart = HitLocation;
HitPawn.HitEnd = HitLocation + (65535 * X);*/
if( !HitPawn.bDeleteMe )
HitPawn.ProcessLocationalDamage(ImpactDamage, Instigator, TempHitLocation, MomentumTransfer * Normal(Velocity), ImpactDamageType,HitPoints);
// Hit detection debugging
//if( Level.NetMode == NM_Standalone)
// HitPawn.DrawBoneLocation();
}
}
}
}
else
{
if (Pawn(Other) != none && Pawn(Other).IsHeadShot(HitLocation, X, 1.0))
{
Pawn(Other).TakeDamage(ImpactDamage * HeadShotDamageMult, Instigator, HitLocation, MomentumTransfer * Normal(Velocity), ImpactDamageType);
}
else
{
Other.TakeDamage(ImpactDamage, Instigator, HitLocation, MomentumTransfer * Normal(Velocity), ImpactDamageType);
}
}
}
}
// Overrided to not use alternate burning mechanism
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 Pawn P;
local KFMonster KFMonsterVictim;
local KFPawn KFP;
local array<Pawn> CheckedPawns;
local int i;
local bool bAlreadyChecked;
//local int OldHealth;
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;
if(Victims == none)
continue;
// don't let blast damage affect fluid - VisibleCollisingActors doesn't really work for them - jag
if( (Victims != self) && (Victims != Instigator) &&(Hurtwall != Victims)
&& (Victims.Role == ROLE_Authority) && !Victims.IsA('FluidSurfaceInfo')
&& ExtendedZCollision(Victims)==none && KFBulletWhipAttachment(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;
}
if( KFMonsterVictim != none && KFMonsterVictim.Health <= 0 ) {
KFMonsterVictim = none;
}
KFMonsterVictim = KFMonster(Victims);
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)
continue;
}
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;
}
defaultproperties
{
HeadShotDamageMult=1.500000
ImpactDamageType=Class'NicePack.NiceDamTypeHuskGunProjectileImpact'
ImpactDamage=50
}

View file

@ -1,43 +1,60 @@
class NiceHuskGunProjectile_Alt extends NiceHuskGunProjectile_Strong;
/*
//can't be destroyed by Siren's scream
//Explode only by heavy explosive damage
function TakeDamage( int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex)
{
if ( !bDud && !bHasExploded && Damage >= 100 && class<KFWeaponDamageType>(damageType) != none && class<KFWeaponDamageType>(damageType).default.bIsExplosive ) { Explode(HitLocation, vect(0,0,0));
}
}
*/
/*
simulated function float MosterDamageMult( KFMonster Victim )
{
float mult;
mult = super.MosterDamageMult();
// prevent big monsters from 1-shot be killed by hitting all projectiles
if ( KFMonsterVictim.bBurnified && KFMonsterVictim.default.Health >= 1000 ) mult *= 0.5;
return mult;
}
*/
/*
// copy-pasted with deletion of impact damage
simulated function ProcessTouch(Actor Other, Vector HitLocation)
{
// Don't let it hit this player, or blow up on another player
if ( Other == none || Other == Instigator || Other.Base == Instigator ) return;
// Don't collide with bullet whip attachments
if( ROBulletWhipAttachment(Other) != none )
{ return;
}
// Don't allow hits on people on the same team
//if( KFHumanPawn(Other) != none && Instigator != none
// && KFHumanPawn(Other).PlayerReplicationInfo.Team.TeamIndex == Instigator.PlayerReplicationInfo.Team.TeamIndex )
//{
// return;
//}
if( !bDud && !bHasExploded )
{ Explode(HitLocation,Normal(HitLocation-Other.Location));
}
}*/
defaultproperties
{ HeadShotDamageMult=1.000000 ExplosionSoundVolume=1.000000 ImpactDamageType=Class'NicePack.NiceDamTypeHuskGun_Alt' ImpactDamage=0 AmbientVolumeScale=1.000000 Speed=750.000000 MaxSpeed=1000.000000 Damage=35.000000 DamageRadius=500.000000 MyDamageType=Class'NicePack.NiceDamTypeHuskGun_Alt' LifeSpan=5.000000
}
class NiceHuskGunProjectile_Alt extends NiceHuskGunProjectile_Strong;
/*
//can't be destroyed by Siren's scream
//Explode only by heavy explosive damage
function TakeDamage( int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex)
{
if ( !bDud && !bHasExploded && Damage >= 100 && class<KFWeaponDamageType>(damageType) != none
&& class<KFWeaponDamageType>(damageType).default.bIsExplosive ) {
Explode(HitLocation, vect(0,0,0));
}
}
*/
/*
simulated function float MosterDamageMult( KFMonster Victim )
{
float mult;
mult = super.MosterDamageMult();
// prevent big monsters from 1-shot be killed by hitting all projectiles
if ( KFMonsterVictim.bBurnified && KFMonsterVictim.default.Health >= 1000 )
mult *= 0.5;
return mult;
}
*/
/*
// copy-pasted with deletion of impact damage
simulated function ProcessTouch(Actor Other, Vector HitLocation)
{
// Don't let it hit this player, or blow up on another player
if ( Other == none || Other == Instigator || Other.Base == Instigator )
return;
// Don't collide with bullet whip attachments
if( ROBulletWhipAttachment(Other) != none )
{
return;
}
// Don't allow hits on people on the same team
//if( KFHumanPawn(Other) != none && Instigator != none
// && KFHumanPawn(Other).PlayerReplicationInfo.Team.TeamIndex == Instigator.PlayerReplicationInfo.Team.TeamIndex )
//{
// return;
//}
if( !bDud && !bHasExploded )
{
Explode(HitLocation,Normal(HitLocation-Other.Location));
}
}*/
defaultproperties
{
HeadShotDamageMult=1.000000
ExplosionSoundVolume=1.000000
ImpactDamageType=Class'NicePack.NiceDamTypeHuskGun_Alt'
ImpactDamage=0
AmbientVolumeScale=1.000000
Speed=750.000000
MaxSpeed=1000.000000
Damage=35.000000
DamageRadius=500.000000
MyDamageType=Class'NicePack.NiceDamTypeHuskGun_Alt'
LifeSpan=5.000000
}

View file

@ -1,4 +1,8 @@
class NiceHuskGunProjectile_Strong extends NiceHuskGunProjectile;
defaultproperties
{ ExplosionEmitter=Class'KFMod.FlameImpact_Strong' FlameTrailEmitterClass=Class'KFMod.FlameThrowerHusk_Strong' ExplosionSoundVolume=2.000000 ExplosionDecal=Class'KFMod.FlameThrowerBurnMark_Large'
}
class NiceHuskGunProjectile_Strong extends NiceHuskGunProjectile;
defaultproperties
{
ExplosionEmitter=Class'KFMod.FlameImpact_Strong'
FlameTrailEmitterClass=Class'KFMod.FlameThrowerHusk_Strong'
ExplosionSoundVolume=2.000000
ExplosionDecal=Class'KFMod.FlameThrowerBurnMark_Large'
}

View file

@ -1,4 +1,8 @@
class NiceHuskGunProjectile_Weak extends NiceHuskGunProjectile;
defaultproperties
{ ExplosionEmitter=Class'KFMod.FlameImpact_Weak' FlameTrailEmitterClass=Class'KFMod.FlameThrowerHusk_Weak' ExplosionSoundVolume=1.250000 ExplosionDecal=Class'KFMod.FlameThrowerBurnMark_Small'
}
class NiceHuskGunProjectile_Weak extends NiceHuskGunProjectile;
defaultproperties
{
ExplosionEmitter=Class'KFMod.FlameImpact_Weak'
FlameTrailEmitterClass=Class'KFMod.FlameThrowerHusk_Weak'
ExplosionSoundVolume=1.250000
ExplosionDecal=Class'KFMod.FlameThrowerBurnMark_Small'
}