Fix new line symbol issues
This commit is contained in:
parent
51bb9add5b
commit
d66d86b2b1
846 changed files with 33896 additions and 12983 deletions
|
|
@ -1,4 +1,6 @@
|
|||
class NiceDamTypeFlareProjectileFire extends NiceDamTypeFire;
|
||||
defaultproperties
|
||||
{
HeadShotDamageMult=2.000000
WeaponClass=Class'NicePack.NiceFlareRevolver'
|
||||
}
|
||||
class NiceDamTypeFlareProjectileFire extends NiceDamTypeFire;
|
||||
defaultproperties
|
||||
{
|
||||
HeadShotDamageMult=2.000000
|
||||
WeaponClass=Class'NicePack.NiceFlareRevolver'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,42 +1,76 @@
|
|||
class NiceDualFlareRevolver extends ScrnDualFlareRevolver;
|
||||
function bool HandlePickupQuery( pickup Item )
|
||||
{
|
||||
if ( Item.InventoryType==Class'NicePack.NiceFlareRevolver' )
|
||||
{
if( LastHasGunMsgTime < Level.TimeSeconds && PlayerController(Instigator.Controller) != none )
{
LastHasGunMsgTime = Level.TimeSeconds + 0.5;
PlayerController(Instigator.Controller).ReceiveLocalizedMessage(Class'KFMainMessages', 1);
}
|
||||
return True;
|
||||
}
|
||||
return Super.HandlePickupQuery(Item);
|
||||
}
|
||||
function DropFrom(vector StartLocation)
|
||||
{
|
||||
local int m;
|
||||
local KFWeaponPickup Pickup;
|
||||
local int AmmoThrown, OtherAmmo;
|
||||
local KFWeapon SinglePistol;
|
||||
if( !bCanThrow )
return;
|
||||
AmmoThrown = AmmoAmount(0);
|
||||
ClientWeaponThrown();
|
||||
for (m = 0; m < NUM_FIRE_MODES; m++)
|
||||
{
if (FireMode[m].bIsFiring)
StopFire(m);
|
||||
}
|
||||
if ( Instigator != none )
DetachFromPawn(Instigator);
|
||||
if( Instigator.Health > 0 )
|
||||
{
OtherAmmo = AmmoThrown / 2;
AmmoThrown -= OtherAmmo;
SinglePistol = Spawn(Class'NicePack.NiceFlareRevolver');
SinglePistol.SellValue = SellValue / 2;
SinglePistol.GiveTo(Instigator);
SinglePistol.Ammo[0].AmmoAmount = OtherAmmo;
SinglePistol.MagAmmoRemaining = MagAmmoRemaining / 2;
MagAmmoRemaining = Max(MagAmmoRemaining-SinglePistol.MagAmmoRemaining,0);
|
||||
}
|
||||
Pickup = Spawn(class'NicePack.NiceFlareRevolverPickup',,, StartLocation);
|
||||
if ( Pickup != none )
|
||||
{
Pickup.InitDroppedPickupFor(self);
Pickup.DroppedBy = PlayerController(Instigator.Controller);
Pickup.Velocity = Velocity;
//fixing dropping exploit
Pickup.SellValue = SellValue / 2;
Pickup.Cost = Pickup.SellValue / 0.75;
Pickup.AmmoAmount[0] = AmmoThrown;
Pickup.MagAmmoRemaining = MagAmmoRemaining;
if (Instigator.Health > 0)
Pickup.bThrown = true;
|
||||
}
|
||||
Destroyed();
|
||||
Destroy();
|
||||
}
|
||||
simulated function bool PutDown()
|
||||
{
|
||||
if ( Instigator.PendingWeapon == none || Instigator.PendingWeapon.class == class'NicePack.NiceFlareRevolver' )
|
||||
{
bIsReloading = false;
|
||||
}
|
||||
return super.PutDown();
|
||||
}
|
||||
defaultproperties
|
||||
{
AppID=0
FireModeClass(0)=Class'NicePack.NiceDualFlareRevolverFire'
DemoReplacement=Class'NicePack.NiceFlareRevolver'
PickupClass=Class'NicePack.NiceDualFlareRevolverPickup'
ItemName="Dual Flare revolvers NW"
|
||||
}
|
||||
class NiceDualFlareRevolver extends ScrnDualFlareRevolver;
|
||||
function bool HandlePickupQuery( pickup Item )
|
||||
{
|
||||
if ( Item.InventoryType==Class'NicePack.NiceFlareRevolver' )
|
||||
{
|
||||
if( LastHasGunMsgTime < Level.TimeSeconds && PlayerController(Instigator.Controller) != none )
|
||||
{
|
||||
LastHasGunMsgTime = Level.TimeSeconds + 0.5;
|
||||
PlayerController(Instigator.Controller).ReceiveLocalizedMessage(Class'KFMainMessages', 1);
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
return Super.HandlePickupQuery(Item);
|
||||
}
|
||||
function DropFrom(vector StartLocation)
|
||||
{
|
||||
local int m;
|
||||
local KFWeaponPickup Pickup;
|
||||
local int AmmoThrown, OtherAmmo;
|
||||
local KFWeapon SinglePistol;
|
||||
if( !bCanThrow )
|
||||
return;
|
||||
AmmoThrown = AmmoAmount(0);
|
||||
ClientWeaponThrown();
|
||||
for (m = 0; m < NUM_FIRE_MODES; m++)
|
||||
{
|
||||
if (FireMode[m].bIsFiring)
|
||||
StopFire(m);
|
||||
}
|
||||
if ( Instigator != none )
|
||||
DetachFromPawn(Instigator);
|
||||
if( Instigator.Health > 0 )
|
||||
{
|
||||
OtherAmmo = AmmoThrown / 2;
|
||||
AmmoThrown -= OtherAmmo;
|
||||
SinglePistol = Spawn(Class'NicePack.NiceFlareRevolver');
|
||||
SinglePistol.SellValue = SellValue / 2;
|
||||
SinglePistol.GiveTo(Instigator);
|
||||
SinglePistol.Ammo[0].AmmoAmount = OtherAmmo;
|
||||
SinglePistol.MagAmmoRemaining = MagAmmoRemaining / 2;
|
||||
MagAmmoRemaining = Max(MagAmmoRemaining-SinglePistol.MagAmmoRemaining,0);
|
||||
}
|
||||
Pickup = Spawn(class'NicePack.NiceFlareRevolverPickup',,, StartLocation);
|
||||
if ( Pickup != none )
|
||||
{
|
||||
Pickup.InitDroppedPickupFor(self);
|
||||
Pickup.DroppedBy = PlayerController(Instigator.Controller);
|
||||
Pickup.Velocity = Velocity;
|
||||
//fixing dropping exploit
|
||||
Pickup.SellValue = SellValue / 2;
|
||||
Pickup.Cost = Pickup.SellValue / 0.75;
|
||||
Pickup.AmmoAmount[0] = AmmoThrown;
|
||||
Pickup.MagAmmoRemaining = MagAmmoRemaining;
|
||||
if (Instigator.Health > 0)
|
||||
Pickup.bThrown = true;
|
||||
}
|
||||
Destroyed();
|
||||
Destroy();
|
||||
}
|
||||
simulated function bool PutDown()
|
||||
{
|
||||
if ( Instigator.PendingWeapon == none || Instigator.PendingWeapon.class == class'NicePack.NiceFlareRevolver' )
|
||||
{
|
||||
bIsReloading = false;
|
||||
}
|
||||
return super.PutDown();
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
AppID=0
|
||||
FireModeClass(0)=Class'NicePack.NiceDualFlareRevolverFire'
|
||||
DemoReplacement=Class'NicePack.NiceFlareRevolver'
|
||||
PickupClass=Class'NicePack.NiceDualFlareRevolverPickup'
|
||||
ItemName="Dual Flare revolvers NW"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
class NiceDualFlareRevolverAmmo extends ScrnDualFlareRevolverAmmo;
|
||||
defaultproperties
|
||||
{
PickupClass=Class'NicePack.NiceDualFlareRevolverAmmoPickup'
|
||||
}
|
||||
class NiceDualFlareRevolverAmmo extends ScrnDualFlareRevolverAmmo;
|
||||
defaultproperties
|
||||
{
|
||||
PickupClass=Class'NicePack.NiceDualFlareRevolverAmmoPickup'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
class NiceDualFlareRevolverAmmoPickup extends ScrnDualFlareRevolverAmmoPickup;
|
||||
defaultproperties
|
||||
{
InventoryType=Class'NicePack.NiceDualFlareRevolverAmmo'
|
||||
}
|
||||
class NiceDualFlareRevolverAmmoPickup extends ScrnDualFlareRevolverAmmoPickup;
|
||||
defaultproperties
|
||||
{
|
||||
InventoryType=Class'NicePack.NiceDualFlareRevolverAmmo'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
class NiceDualFlareRevolverFire extends ScrnDualFlareRevolverFire;
|
||||
defaultproperties
|
||||
{
AmmoClass=Class'NicePack.NiceDualFlareRevolverAmmo'
ProjectileClass=Class'NicePack.NiceFlareRevolverProjectile'
|
||||
}
|
||||
class NiceDualFlareRevolverFire extends ScrnDualFlareRevolverFire;
|
||||
defaultproperties
|
||||
{
|
||||
AmmoClass=Class'NicePack.NiceDualFlareRevolverAmmo'
|
||||
ProjectileClass=Class'NicePack.NiceFlareRevolverProjectile'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
class NiceDualFlareRevolverPickup extends ScrnDualFlareRevolverPickup;
|
||||
defaultproperties
|
||||
{
ItemName="Dual Flare Revolvers NW"
ItemShortName="Dual Flare Rev. NW"
InventoryType=Class'NicePack.NiceDualFlareRevolver'
|
||||
}
|
||||
class NiceDualFlareRevolverPickup extends ScrnDualFlareRevolverPickup;
|
||||
defaultproperties
|
||||
{
|
||||
ItemName="Dual Flare Revolvers NW"
|
||||
ItemShortName="Dual Flare Rev. NW"
|
||||
InventoryType=Class'NicePack.NiceDualFlareRevolver'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,30 @@
|
|||
class NiceFlareRevolver extends ScrnFlareRevolver;
|
||||
simulated function bool PutDown()
|
||||
{
|
||||
if ( Instigator.PendingWeapon.class == class'NicePack.NiceDualFlareRevolver' )
|
||||
{
bIsReloading = false;
|
||||
}
|
||||
return super(KFWeapon).PutDown();
|
||||
}
|
||||
|
||||
function GiveTo( pawn Other, optional Pickup Pickup )
|
||||
{
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local KFWeaponPickup WeapPickup;
|
||||
KFPRI = KFPlayerReplicationInfo(Other.PlayerReplicationInfo);
|
||||
WeapPickup = KFWeaponPickup(Pickup);
|
||||
//pick the lowest sell value
|
||||
if ( WeapPickup != none && KFPRI != none && KFPRI.ClientVeteranSkill != none ) {
SellValue = 0.75 * min(WeapPickup.Cost, WeapPickup.default.Cost
* KFPRI.ClientVeteranSkill.static.GetCostScaling(KFPRI, WeapPickup.class));
|
||||
}
|
||||
Super.GiveTo(Other,Pickup);
|
||||
}
|
||||
defaultproperties
|
||||
{
AppID=0
FireModeClass(0)=Class'NicePack.NiceFlareRevolverFire'
PickupClass=Class'NicePack.NiceFlareRevolverPickup'
ItemName="Flare Revolver NW"
|
||||
}
|
||||
class NiceFlareRevolver extends ScrnFlareRevolver;
|
||||
simulated function bool PutDown()
|
||||
{
|
||||
if ( Instigator.PendingWeapon.class == class'NicePack.NiceDualFlareRevolver' )
|
||||
{
|
||||
bIsReloading = false;
|
||||
}
|
||||
return super(KFWeapon).PutDown();
|
||||
}
|
||||
|
||||
function GiveTo( pawn Other, optional Pickup Pickup )
|
||||
{
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local KFWeaponPickup WeapPickup;
|
||||
KFPRI = KFPlayerReplicationInfo(Other.PlayerReplicationInfo);
|
||||
WeapPickup = KFWeaponPickup(Pickup);
|
||||
//pick the lowest sell value
|
||||
if ( WeapPickup != none && KFPRI != none && KFPRI.ClientVeteranSkill != none ) {
|
||||
SellValue = 0.75 * min(WeapPickup.Cost, WeapPickup.default.Cost
|
||||
* KFPRI.ClientVeteranSkill.static.GetCostScaling(KFPRI, WeapPickup.class));
|
||||
}
|
||||
Super.GiveTo(Other,Pickup);
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
AppID=0
|
||||
FireModeClass(0)=Class'NicePack.NiceFlareRevolverFire'
|
||||
PickupClass=Class'NicePack.NiceFlareRevolverPickup'
|
||||
ItemName="Flare Revolver NW"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
class NiceFlareRevolverAmmo extends ScrnFlareRevolverAmmo;
|
||||
defaultproperties
|
||||
{
PickupClass=Class'NicePack.NiceFlareRevolverAmmoPickup'
|
||||
}
|
||||
class NiceFlareRevolverAmmo extends ScrnFlareRevolverAmmo;
|
||||
defaultproperties
|
||||
{
|
||||
PickupClass=Class'NicePack.NiceFlareRevolverAmmoPickup'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
class NiceFlareRevolverAmmoPickup extends ScrnFlareRevolverAmmoPickup;
|
||||
defaultproperties
|
||||
{
InventoryType=Class'NicePack.NiceFlareRevolverAmmo'
|
||||
}
|
||||
class NiceFlareRevolverAmmoPickup extends ScrnFlareRevolverAmmoPickup;
|
||||
defaultproperties
|
||||
{
|
||||
InventoryType=Class'NicePack.NiceFlareRevolverAmmo'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
class NiceFlareRevolverFire extends ScrnFlareRevolverFire;
|
||||
defaultproperties
|
||||
{
AmmoClass=Class'NicePack.NiceFlareRevolverAmmo'
ProjectileClass=Class'NicePack.NiceFlareRevolverProjectile'
|
||||
}
|
||||
class NiceFlareRevolverFire extends ScrnFlareRevolverFire;
|
||||
defaultproperties
|
||||
{
|
||||
AmmoClass=Class'NicePack.NiceFlareRevolverAmmo'
|
||||
ProjectileClass=Class'NicePack.NiceFlareRevolverProjectile'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,64 @@
|
|||
class NiceFlareRevolverPickup extends ScrnFlareRevolverPickup;
|
||||
function inventory SpawnCopy( pawn Other ) {
|
||||
local Inventory CurInv;
|
||||
local KFWeapon PistolInInventory;
|
||||
For( CurInv=Other.Inventory; CurInv!=none; CurInv=CurInv.Inventory ) {
PistolInInventory = KFWeapon(CurInv);
if( PistolInInventory != none && PistolInInventory.class == default.InventoryType ) {
// destroy the inventory to force parent SpawnCopy() to make a new instance of class
// we specified below
if( Inventory!=none )
Inventory.Destroy();
// spawn dual guns instead of another instance of single
InventoryType = DualInventoryType;
// Make dualies to cost twice of lowest value in case of PERKED+UNPERKED pistols
SellValue = 2 * min(SellValue, PistolInInventory.SellValue);
AmmoAmount[0]+= PistolInInventory.AmmoAmount(0);
MagAmmoRemaining+= PistolInInventory.MagAmmoRemaining;
CurInv.Destroyed();
CurInv.Destroy();
Return Super(KFWeaponPickup).SpawnCopy(Other);
}
|
||||
}
|
||||
InventoryType = Default.InventoryType;
|
||||
Return Super(KFWeaponPickup).SpawnCopy(Other);
|
||||
}
|
||||
function bool CheckCanCarry(KFHumanPawn Hm) {
|
||||
local Inventory CurInv;
|
||||
local bool bHasSinglePistol;
|
||||
local float AddWeight;
|
||||
AddWeight = class<KFWeapon>(default.InventoryType).default.Weight;
|
||||
for ( CurInv = Hm.Inventory; CurInv != none; CurInv = CurInv.Inventory ) {
if ( CurInv.class == default.DualInventoryType ) {
//already have duals, can't carry a single
if ( LastCantCarryTime < Level.TimeSeconds && PlayerController(Hm.Controller) != none )
{
LastCantCarryTime = Level.TimeSeconds + 0.5;
PlayerController(Hm.Controller).ReceiveLocalizedMessage(Class'KFMainMessages', 2);
}
return false;
}
else if ( CurInv.class == default.InventoryType ) {
bHasSinglePistol = true;
AddWeight = default.DualInventoryType.default.Weight - AddWeight;
break;
}
|
||||
}
|
||||
if ( !Hm.CanCarry(AddWeight) ) {
if ( LastCantCarryTime < Level.TimeSeconds && PlayerController(Hm.Controller) != none )
{
LastCantCarryTime = Level.TimeSeconds + 0.5;
PlayerController(Hm.Controller).ReceiveLocalizedMessage(Class'KFMainMessages', 2);
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
defaultproperties
|
||||
{
DualInventoryType=Class'NicePack.NiceDualFlareRevolver'
ItemName="Flare Revolver NW"
ItemShortName="Flare Rev. NW"
InventoryType=Class'NicePack.NiceFlareRevolver'
|
||||
}
|
||||
class NiceFlareRevolverPickup extends ScrnFlareRevolverPickup;
|
||||
function inventory SpawnCopy( pawn Other ) {
|
||||
local Inventory CurInv;
|
||||
local KFWeapon PistolInInventory;
|
||||
For( CurInv=Other.Inventory; CurInv!=none; CurInv=CurInv.Inventory ) {
|
||||
PistolInInventory = KFWeapon(CurInv);
|
||||
if( PistolInInventory != none && PistolInInventory.class == default.InventoryType ) {
|
||||
// destroy the inventory to force parent SpawnCopy() to make a new instance of class
|
||||
// we specified below
|
||||
if( Inventory!=none )
|
||||
Inventory.Destroy();
|
||||
// spawn dual guns instead of another instance of single
|
||||
InventoryType = DualInventoryType;
|
||||
// Make dualies to cost twice of lowest value in case of PERKED+UNPERKED pistols
|
||||
SellValue = 2 * min(SellValue, PistolInInventory.SellValue);
|
||||
AmmoAmount[0]+= PistolInInventory.AmmoAmount(0);
|
||||
MagAmmoRemaining+= PistolInInventory.MagAmmoRemaining;
|
||||
CurInv.Destroyed();
|
||||
CurInv.Destroy();
|
||||
Return Super(KFWeaponPickup).SpawnCopy(Other);
|
||||
}
|
||||
}
|
||||
InventoryType = Default.InventoryType;
|
||||
Return Super(KFWeaponPickup).SpawnCopy(Other);
|
||||
}
|
||||
function bool CheckCanCarry(KFHumanPawn Hm) {
|
||||
local Inventory CurInv;
|
||||
local bool bHasSinglePistol;
|
||||
local float AddWeight;
|
||||
AddWeight = class<KFWeapon>(default.InventoryType).default.Weight;
|
||||
for ( CurInv = Hm.Inventory; CurInv != none; CurInv = CurInv.Inventory ) {
|
||||
if ( CurInv.class == default.DualInventoryType ) {
|
||||
//already have duals, can't carry a single
|
||||
if ( LastCantCarryTime < Level.TimeSeconds && PlayerController(Hm.Controller) != none )
|
||||
{
|
||||
LastCantCarryTime = Level.TimeSeconds + 0.5;
|
||||
PlayerController(Hm.Controller).ReceiveLocalizedMessage(Class'KFMainMessages', 2);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if ( CurInv.class == default.InventoryType ) {
|
||||
bHasSinglePistol = true;
|
||||
AddWeight = default.DualInventoryType.default.Weight - AddWeight;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( !Hm.CanCarry(AddWeight) ) {
|
||||
if ( LastCantCarryTime < Level.TimeSeconds && PlayerController(Hm.Controller) != none )
|
||||
{
|
||||
LastCantCarryTime = Level.TimeSeconds + 0.5;
|
||||
PlayerController(Hm.Controller).ReceiveLocalizedMessage(Class'KFMainMessages', 2);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
DualInventoryType=Class'NicePack.NiceDualFlareRevolver'
|
||||
ItemName="Flare Revolver NW"
|
||||
ItemShortName="Flare Rev. NW"
|
||||
InventoryType=Class'NicePack.NiceFlareRevolver'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,43 +1,151 @@
|
|||
class NiceFlareRevolverProjectile extends ScrnFlareRevolverProjectile;
|
||||
//overrided to 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 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) && (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;
}
|
||||
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;
}
}
|
||||
Victims.TakeDamage
(
damageScale * DamageAmount,
Instigator,
Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dirs,
(damageScale * Momentum * dirs),
DamageType//Class'NicePack.NiceDamTypeFlareProjectileFire'
);
if (Vehicle(Victims) != none && Vehicle(Victims).Health > 0)
Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController,
DamageType,//Class'NicePack.NiceDamTypeFlareProjectileFire',
Momentum, HitLocation);
|
||||
if( Role == ROLE_Authority && KFMonsterVictim != none && KFMonsterVictim.Health <= 0 )
{
NumKilled++;
}
}
|
||||
}
|
||||
/*
|
||||
if ( (LastTouched != none) && (LastTouched != self) && (LastTouched != Instigator) &&
(LastTouched.Role == ROLE_Authority) && !LastTouched.IsA('FluidSurfaceInfo') )
|
||||
{
Victims = LastTouched;
LastTouched = none;
dirs = Victims.Location - HitLocation;
dist = FMax(1,VSize(dirs));
dirs = dirs/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);
|
||||
log("Part 2 Doing "$(damageScale * DamageAmount)$" damage to "$Victims);
Victims.TakeDamage
(
damageScale * DamageAmount,
Instigator,
Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dirs,
(damageScale * Momentum * dirs),
DamageType
);
if (Vehicle(Victims) != none && Vehicle(Victims).Health > 0)
Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation);
|
||||
}
|
||||
*/
|
||||
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
|
||||
{
ImpactDamageType=Class'NicePack.NiceDamTypeFlareProjectileImpact'
MyDamageType=Class'NicePack.NiceDamTypeFlareProjectileFire'
|
||||
}
|
||||
class NiceFlareRevolverProjectile extends ScrnFlareRevolverProjectile;
|
||||
//overrided to 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 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) && (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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Victims.TakeDamage
|
||||
(
|
||||
damageScale * DamageAmount,
|
||||
Instigator,
|
||||
Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dirs,
|
||||
(damageScale * Momentum * dirs),
|
||||
DamageType//Class'NicePack.NiceDamTypeFlareProjectileFire'
|
||||
);
|
||||
if (Vehicle(Victims) != none && Vehicle(Victims).Health > 0)
|
||||
Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController,
|
||||
DamageType,//Class'NicePack.NiceDamTypeFlareProjectileFire',
|
||||
Momentum, HitLocation);
|
||||
|
||||
if( Role == ROLE_Authority && KFMonsterVictim != none && KFMonsterVictim.Health <= 0 )
|
||||
{
|
||||
NumKilled++;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
if ( (LastTouched != none) && (LastTouched != self) && (LastTouched != Instigator) &&
|
||||
(LastTouched.Role == ROLE_Authority) && !LastTouched.IsA('FluidSurfaceInfo') )
|
||||
{
|
||||
Victims = LastTouched;
|
||||
LastTouched = none;
|
||||
dirs = Victims.Location - HitLocation;
|
||||
dist = FMax(1,VSize(dirs));
|
||||
dirs = dirs/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);
|
||||
|
||||
log("Part 2 Doing "$(damageScale * DamageAmount)$" damage to "$Victims);
|
||||
Victims.TakeDamage
|
||||
(
|
||||
damageScale * DamageAmount,
|
||||
Instigator,
|
||||
Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dirs,
|
||||
(damageScale * Momentum * dirs),
|
||||
DamageType
|
||||
);
|
||||
if (Vehicle(Victims) != none && Vehicle(Victims).Health > 0)
|
||||
Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation);
|
||||
}
|
||||
*/
|
||||
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
|
||||
{
|
||||
ImpactDamageType=Class'NicePack.NiceDamTypeFlareProjectileImpact'
|
||||
MyDamageType=Class'NicePack.NiceDamTypeFlareProjectileFire'
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue