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:
Anton Tarasenko 2020-04-17 23:06:41 +07:00
commit 12d95e387e
757 changed files with 10788 additions and 4046 deletions

View file

@ -0,0 +1,52 @@
class NiceBoomStick extends NiceWeapon;
#EXEC OBJ LOAD FILE=KillingFloorHUD.utx
var float glueTiming;
var float firstShellTiming, secondShellTiming, jumpTiming;
var const string firstShellStr, secondShellStr, jumpStr;
simulated function PostBeginPlay(){
local EventRecord record;
local AutoReloadAnimDesc reloadDesc;
// Setup animation timings
autoReloadsDescriptions.Length = 0;
reloadDesc.canInterruptFrame = 0.056;
reloadDesc.trashStartFrame = secondShellTiming;
reloadDesc.resumeFrame = 0.056;
reloadDesc.speedFrame = 0.056;
// Setup all possible fire animations
reloadDesc.animName = 'Fire_Both';
autoReloadsDescriptions[0] = reloadDesc;
reloadDesc.animName = 'Fire_Both_Iron';
autoReloadsDescriptions[1] = reloadDesc;
reloadDesc.animName = 'Fire_Last';
autoReloadsDescriptions[2] = reloadDesc;
reloadDesc.animName = 'Fire_Last_Iron';
autoReloadsDescriptions[3] = reloadDesc;
// Setup reload events
record.eventName = jumpStr;
record.eventFrame = jumpTiming;
relEvents[relEvents.Length] = record;
record.eventName = firstShellStr;
record.eventFrame = firstShellTiming;
relEvents[relEvents.Length] = record;
record.eventName = secondShellStr;
record.eventFrame = secondShellTiming;
relEvents[relEvents.Length] = record;
super.PostBeginPlay();
}
simulated function ReloadEvent(string eventName){
if(eventName ~= jumpStr && GetMagazineAmmo() > 0) SetAnimFrame(glueTiming);
if(eventName ~= firstShellStr) MagAmmoRemainingClient = Min(1, AmmoAmount(0));
else if(eventName ~= secondShellStr) MagAmmoRemainingClient = Min(2, AmmoAmount(0));
ServerSetMagSize(MagAmmoRemainingClient, bRoundInChamber, Level.TimeSeconds);
}
simulated function AddAutoReloadedAmmo(){
MagAmmoRemainingClient = Min(2, AmmoAmount(0));
ServerSetMagSize(MagAmmoRemainingClient, bRoundInChamber, Level.TimeSeconds);
}
simulated function bool AltFireCanForceInterruptReload(){
return (GetMagazineAmmo() > 0);
}
defaultproperties
{ glueTiming=0.633330 firstShellTiming=0.555550 secondShellTiming=0.733330 jumpTiming=0.388880 firstShellStr="firstShell" secondShellStr="secondShellStr" jumpStr="jumpStr" bChangeClipIcon=True hudClipTexture=Texture'KillingFloorHUD.HUD.Hud_Single_Bullet' reloadType=RTYPE_AUTO ForceZoomOutOnFireTime=0.010000 ForceZoomOutOnAltFireTime=0.010000 MagCapacity=2
Weight=6.000000 ReloadRate=2.250000 ReloadAnim="Reload" ReloadAnimRate=1.100000 bHoldToReload=True WeaponReloadAnim="Reload_HuntingShotgun" bHasAimingMode=True IdleAimAnim="Idle_Iron" StandardDisplayFOV=55.000000 TraderInfoTexture=Texture'KillingFloorHUD.Trader_Weapon_Images.Trader_Hunting_Shotgun' bIsTier2Weapon=True MeshRef="KF_Weapons_Trip.BoomStick_Trip" SkinRefs(0)="KF_Weapons_Trip_T.Shotguns.boomstick_cmb" SelectSoundRef="KF_DoubleSGSnd.2Barrel_Select" HudImageRef="KillingFloorHUD.WeaponSelect.BoomStic_unselected" SelectedHudImageRef="KillingFloorHUD.WeaponSelect.BoomStick" PlayerIronSightFOV=70.000000 ZoomedDisplayFOV=40.000000 FireModeClass(0)=Class'NicePack.NiceBoomStickAltFire' FireModeClass(1)=Class'NicePack.NiceBoomStickFire' PutDownAnim="PutDown" AIRating=0.900000 CurrentRating=0.900000 bSniping=False Description="A double barreled shotgun used by big game hunters. It fires two slugs simultaneously and can bring down even the largest targets, quickly." DisplayFOV=55.000000 Priority=160 InventoryGroup=4 GroupOffset=2 PickupClass=Class'NicePack.NiceBoomStickPickup' PlayerViewOffset=(X=8.000000,Y=14.000000,Z=-8.000000) BobDamping=6.000000 AttachmentClass=Class'NicePack.NiceBoomStickAttachment' ItemName="Hunting Shotgun" bUseDynamicLights=True TransientSoundVolume=1.000000
}

View file

@ -0,0 +1,26 @@
class NiceBoomStickAltFire extends NiceBoomStickFire;
// Overload to force last shot to have a different animation with reload
// NICETODO: uncomment this
/*function name GetCorrectAnim(bool bLoop, bool bAimed){
if(currentContext.sourceWeapon != none && currentContext.sourceWeapon.MagAmmoRemainingClient > 0)
return super.GetCorrectAnim(bLoop, bAimed);
if(bAimed)
return 'Fire_Last_Iron';
else
return 'Fire_Last';
return FireAnim;
}*/
defaultproperties
{
KickMomentum=(X=-50.000000,Z=22.000000)
FireAimedAnim="Fire_Iron"
maxVerticalRecoilAngle=1500
FireSoundRef="KF_DoubleSGSnd.2Barrel_Fire"
StereoFireSoundRef="KF_DoubleSGSnd.2Barrel_FireST"
TransientSoundVolume=1.800000
FireAnim="Fire"
AmmoPerFire=1
ShakeRotMag=(X=50.000000,Y=50.000000,Z=400.000000)
ShakeRotTime=5.000000
ShakeOffsetTime=3.000000
}

View file

@ -0,0 +1,4 @@
class NiceBoomStickAttachment extends NiceAttachment;
defaultproperties
{ mMuzFlashClass=Class'ROEffects.MuzzleFlash3rdKar' mShellCaseEmitterClass=Class'KFMod.KFShotgunShellSpewer' MovementAnims(0)="JogF_HuntingShotgun" MovementAnims(1)="JogB_HuntingShotgun" MovementAnims(2)="JogL_HuntingShotgun" MovementAnims(3)="JogR_HuntingShotgun" TurnLeftAnim="TurnL_HuntingShotgun" TurnRightAnim="TurnR_HuntingShotgun" CrouchAnims(0)="CHwalkF_HuntingShotgun" CrouchAnims(1)="CHwalkB_HuntingShotgun" CrouchAnims(2)="CHwalkL_HuntingShotgun" CrouchAnims(3)="CHwalkR_HuntingShotgun" WalkAnims(0)="WalkF_HuntingShotgun" WalkAnims(1)="WalkB_HuntingShotgun" WalkAnims(2)="WalkL_HuntingShotgun" WalkAnims(3)="WalkR_HuntingShotgun" CrouchTurnRightAnim="CH_TurnR_HuntingShotgun" CrouchTurnLeftAnim="CH_TurnL_HuntingShotgun" IdleCrouchAnim="CHIdle_HuntingShotgun" IdleWeaponAnim="Idle_HuntingShotgun" IdleRestAnim="Idle_HuntingShotgun" IdleChatAnim="Idle_HuntingShotgun" IdleHeavyAnim="Idle_HuntingShotgun" IdleRifleAnim="Idle_HuntingShotgun" FireAnims(0)="Fire_HuntingShotgun" FireAnims(1)="Fire_HuntingShotgun" FireAnims(2)="Fire_HuntingShotgun" FireAnims(3)="Fire_HuntingShotgun" FireAltAnims(0)="Fire_HuntingShotgun" FireAltAnims(1)="Fire_HuntingShotgun" FireAltAnims(2)="Fire_HuntingShotgun" FireAltAnims(3)="Fire_HuntingShotgun" FireCrouchAnims(0)="CHFire_HuntingShotgun" FireCrouchAnims(1)="CHFire_HuntingShotgun" FireCrouchAnims(2)="CHFire_HuntingShotgun" FireCrouchAnims(3)="CHFire_HuntingShotgun" FireCrouchAltAnims(0)="CHFire_HuntingShotgun" FireCrouchAltAnims(1)="CHFire_HuntingShotgun" FireCrouchAltAnims(2)="CHFire_HuntingShotgun" FireCrouchAltAnims(3)="CHFire_HuntingShotgun" HitAnims(0)="HitF_HuntingShotgun" HitAnims(1)="HitB_HuntingShotgun" HitAnims(2)="HitL_HuntingShotgun" HitAnims(3)="HitR_HuntingShotgun" PostFireBlendStandAnim="Blend_HuntingShotgun" PostFireBlendCrouchAnim="CHBlend_HuntingShotgun" MeshRef="KF_Weapons3rd_Trip.HuntingShot_3rd"
}

View file

@ -0,0 +1,62 @@
class NiceBoomStickFire extends NiceShotgunFire;
var Emitter Flash2Emitter;
var name MuzzleBoneLeft;
var name MuzzleBoneRight;
simulated function InitEffects(){
if((Level.NetMode == NM_DedicatedServer) || (AIController(Instigator.Controller) != none))
return;
if((FlashEmitterClass != none) && ((FlashEmitter == none) || FlashEmitter.bDeleteMe)){
FlashEmitter = Weapon.Spawn(FlashEmitterClass);
Weapon.AttachToBone(FlashEmitter, MuzzleBoneLeft);
}
if((FlashEmitterClass != none) && ((Flash2Emitter == none) || Flash2Emitter.bDeleteMe)){
Flash2Emitter = Weapon.Spawn(FlashEmitterClass);
Weapon.AttachToBone(Flash2Emitter, MuzzleBoneRight);
}
if((SmokeEmitterClass != none) && ((SmokeEmitter == none) || SmokeEmitter.bDeleteMe))
SmokeEmitter = Weapon.Spawn(SmokeEmitterClass);
}
simulated function DestroyEffects(){
super.DestroyEffects();
if(Flash2Emitter != none)
Flash2Emitter.Destroy();
}//MEANTODO
/*function FlashMuzzleFlash(){
if(currentContext.sourceWeapon == none)
return;
if(currentContext.sourceWeapon.MagAmmoRemainingClient == 2){
if(Flash2Emitter != none)
Flash2Emitter.Trigger(Weapon, Instigator);
}
else if(FlashEmitter != none)
FlashEmitter.Trigger(Weapon, Instigator);
}*/
defaultproperties
{
MuzzleBoneLeft="Tip_Left"
MuzzleBoneRight="Tip_Right"
FireIncompleteAnim="Fire_Last"
FireIncompleteAimedAnim="Fire_Last_Iron"
bCanFireIncomplete=True
ProjPerFire=10
KickMomentum=(X=-105.000000,Z=55.000000)
FireAimedAnim="Fire_Both_Iron"
RecoilRate=0.070000
maxVerticalRecoilAngle=3200
FireSoundRef="KF_DoubleSGSnd.2Barrel_Fire_Dual"
StereoFireSoundRef="KF_DoubleSGSnd.2Barrel_Fire_DualST"
NoAmmoSoundRef="KF_DoubleSGSnd.2Barrel_DryFire"
DamageType=Class'NicePack.NiceDamTypeDBShotgun'
DamageMax=63
TransientSoundVolume=1.900000
FireAnim="Fire_Both"
FireRate=0.000000
AmmoClass=Class'NicePack.NiceDBShotgunAmmo'
AmmoPerFire=2
ShakeRotMag=(X=75.000000,Y=75.000000,Z=600.000000)
ShakeRotTime=6.000000
ShakeOffsetTime=3.500000
BotRefireRate=2.500000
aimerror=2.000000
Spread=3000.000000
}

View file

@ -0,0 +1,5 @@
class NiceBoomStickPickup extends NiceWeaponPickup;
var int SingleShotCount;
defaultproperties
{ cost=500 BuyClipSize=2 PowerValue=90 SpeedValue=30 RangeValue=12 Description="A double barreled shotgun used by big game hunters." ItemName="Hunting Shotgun" ItemShortName="Hunting Shotgun" AmmoItemName="12-gauge Hunting shells" CorrespondingPerkIndex=1 EquipmentCategoryID=3 InventoryType=Class'NicePack.NiceBoomStick' PickupMessage="You got the Hunting Shotgun" PickupSound=Sound'KF_DoubleSGSnd.2Barrel_Pickup' PickupForce="AssaultRiflePickup" StaticMesh=StaticMesh'KF_pickups_Trip.Shotgun.boomstick_pickup' CollisionRadius=35.000000 CollisionHeight=5.000000
}

View file

@ -0,0 +1,5 @@
class NiceDBShotgunAmmo extends NiceAmmo;
#EXEC OBJ LOAD FILE=KillingFloorHUD.utx
defaultproperties
{ WeaponPickupClass=Class'NicePack.NiceBoomStickPickup' AmmoPickupAmount=6 MaxAmmo=64 InitialAmount=16 PickupClass=Class'NicePack.NiceDBShotgunAmmoPickup' IconMaterial=Texture'KillingFloorHUD.Generic.HUD' IconCoords=(X1=451,Y1=445,X2=510,Y2=500) ItemName="Shotgun Ammo"
}

View file

@ -0,0 +1,4 @@
class NiceDBShotgunAmmoPickup extends NiceAmmoPickup;
defaultproperties
{ AmmoAmount=6 InventoryType=Class'NicePack.NiceDBShotgunAmmo' PickupMessage="12 Gauge Premium Slugs" StaticMesh=None
}

View file

@ -0,0 +1,5 @@
class NiceDamTypeDBShotgun extends NiceDamageTypeVetEnforcer
abstract;
defaultproperties
{ MaxPenetrations=4 MediumZedPenDmgReduction=1.000000 PenDmgReduction=0.800000 bIsPowerWeapon=True WeaponClass=Class'NicePack.NiceBoomStick' DeathString="%k killed %o (Hunting shotgun)." FemaleSuicide="%o shot herself in the foot." MaleSuicide="%o shot himself in the foot." bRagdollBullet=True bBulletHit=True FlashFog=(X=600.000000) KDamageImpulse=10000.000000 KDeathVel=300.000000 KDeathUpKick=100.000000 VehicleDamageScaling=0.700000
}