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
5
sources/Weapons/Grenades/NiceDamTypeNadeNail.uc
Normal file
5
sources/Weapons/Grenades/NiceDamTypeNadeNail.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class NiceDamTypeNadeNail extends NiceDamTypeNailGun
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
stunMultiplier=10.000000
|
||||
}
|
||||
5
sources/Weapons/Grenades/NiceDamTypeSmallNail.uc
Normal file
5
sources/Weapons/Grenades/NiceDamTypeSmallNail.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class NiceDamTypeSmallNail extends NiceDamTypeNailGun
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
headSizeModifier=2.000000
HeadShotDamageMult=1.000000
|
||||
}
|
||||
61
sources/Weapons/Grenades/NiceDelayedNade.uc
Normal file
61
sources/Weapons/Grenades/NiceDelayedNade.uc
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
class NiceDelayedNade extends NiceNailNade;
|
||||
var float EarlyExplodeTimer;
|
||||
simulated function Tick(float DeltaTime){
|
||||
if(EarlyExplodeTimer >= 0 && Physics == PHYS_None)
|
||||
EarlyExplodeTimer -= DeltaTime;
|
||||
Super.Tick(DeltaTime);
|
||||
if(!bHasExploded && !bDisintegrated && EarlyExplodeTimer < 0)
|
||||
Explode(Location, vect(0,0,1));
|
||||
if(LifeSpan < 0.1){
|
||||
ReleaseNails(true);
|
||||
Disintegrate(Location, vect(0,0,1));
|
||||
}
|
||||
}
|
||||
simulated function bool TooClose(){
|
||||
local Vector Diff;
|
||||
local float distance;
|
||||
if(Instigator == none)
|
||||
return false;
|
||||
Diff = Location - Instigator.Location;
|
||||
distance = Sqrt(Diff Dot Diff);
|
||||
return (distance < DamageRadius);
|
||||
}
|
||||
// Overloaded to implement nade skills
|
||||
simulated function Explode(vector HitLocation, vector HitNormal){
|
||||
local PlayerController LocalPlayer;
|
||||
// Variables for skill-detection
|
||||
local NiceHumanPawn nicePawn;
|
||||
local class<NiceVeterancyTypes> niceVet;
|
||||
// Do we need to blow up?
|
||||
if(!TooClose()){
|
||||
bHasExploded = true;
|
||||
nicePawn = NiceHumanPawn(Instigator);
|
||||
if(nicePawn != none)
|
||||
niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(nicePawn.PlayerReplicationInfo);
|
||||
BlowUp(HitLocation);
|
||||
|
||||
// null reference fix
|
||||
if(ExplodeSounds.length > 0)
|
||||
PlaySound(ExplodeSounds[rand(ExplodeSounds.length)],,2.0);
|
||||
|
||||
// Real shrapnel
|
||||
ReleaseNails();
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
EarlyExplodeTimer=2.000000
|
||||
ExplodeTimer=5.000000
|
||||
LifeSpan=5.100000
|
||||
}
|
||||
72
sources/Weapons/Grenades/NiceNailNade.uc
Normal file
72
sources/Weapons/Grenades/NiceNailNade.uc
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
class NiceNailNade extends NiceNade;
|
||||
var int numberOfShards;
|
||||
var NiceFire.ShotType shotParams;
|
||||
var NiceFire.FireModeContext fireContext;
|
||||
simulated function ReleaseNails(optional bool bServerOnly){
|
||||
local byte i;
|
||||
local NicePack niceMut;
|
||||
fireContext.continiousBonus = 1.0;
|
||||
fireContext.burstLength = 1;
|
||||
fireContext.instigator = NiceHumanPawn(instigator);
|
||||
shotParams.bShouldBounce = true;
|
||||
shotParams.damage = 52;
|
||||
shotParams.projSpeed = 3500.0;
|
||||
shotParams.momentum = 50000;
|
||||
shotParams.shotDamageType = class'NicePack.NiceDamTypeNailGun';
|
||||
shotParams.bulletClass = class'NicePack.NiceNail';
|
||||
shotParams.bCausePain = true;
|
||||
if(fireContext.instigator != none)
|
||||
niceMut = class'NicePack'.static.Myself(fireContext.Instigator.Level);
|
||||
if(bServerOnly){
|
||||
if(niceMut == none)
|
||||
return;
|
||||
for(i = 0;i < niceMut.playersList.Length;i ++)
|
||||
niceMut.playersList[i].ClientNailsExplosion(numberOfShards, location, shotParams, fireContext,
|
||||
niceMut.playersList[i] != fireContext.Instigator.Controller);
|
||||
}
|
||||
else if(Role < Role_AUTHORITY)
|
||||
for(i = 0;i < numberOfShards;i ++)
|
||||
class'NiceProjectileSpawner'.static.MakeProjectile(location, RotRand(true), shotParams, fireContext);
|
||||
}
|
||||
// Overloaded to implement nade skills
|
||||
simulated function Explode(vector HitLocation, vector HitNormal){
|
||||
local PlayerController LocalPlayer;
|
||||
// Variables for skill-detection
|
||||
local NiceHumanPawn nicePawn;
|
||||
local class<NiceVeterancyTypes> niceVet;
|
||||
nicePawn = NiceHumanPawn(Instigator);
|
||||
if(nicePawn != none)
|
||||
niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(nicePawn.PlayerReplicationInfo);
|
||||
bHasExploded = true;
|
||||
BlowUp(HitLocation);
|
||||
// null reference fix
|
||||
if(ExplodeSounds.length > 0)
|
||||
PlaySound(ExplodeSounds[rand(ExplodeSounds.length)],,2.0);
|
||||
// Real shrapnel
|
||||
ReleaseNails();
|
||||
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'){
|
||||
ReleaseNails(true);
|
||||
Disintegrate(HitLocation, vect(0,0,1));
|
||||
}
|
||||
else
|
||||
Explode(HitLocation, vect(0,0,1));
|
||||
}
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
numberOfShards=50
|
||||
Damage=50.000000
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue