Add update 13 to this branch
This commit is contained in:
parent
e79d49ce0d
commit
99aac40182
@ -15,6 +15,12 @@ static function class<Grenade> GetNadeType(KFPlayerReplicationInfo KFPRI){
|
||||
//return class'NiceMedicNadePoison';
|
||||
return class'NiceNade';
|
||||
}
|
||||
static function int AddFireDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<NiceWeaponDamageType> DmgType){
|
||||
if(class<NiceDamTypeFire>(DmgType) != none){
|
||||
return float(InDamage) * 1.5;
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
static function float GetHealthBarsDistanceMulti(KFPlayerReplicationInfo KFPRI){
|
||||
/*if(KFPRI != none && SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoStrategist'))
|
||||
return class'NiceSkillCommandoStrategist'.default.visionRadius;*/
|
||||
@ -112,7 +118,7 @@ defaultproperties
|
||||
OnHUDIcons(3)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Commando_Blue',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Blue',DrawColor=(B=255,G=255,R=255,A=255))
|
||||
OnHUDIcons(4)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Commando_Purple',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Purple',DrawColor=(B=255,G=255,R=255,A=255))
|
||||
OnHUDIcons(5)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Commando_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255))
|
||||
CustomLevelInfo="Level up by doing damage with perked weapons|15% faster reload with all weapons|10% faster movement speed|You get four additional Zed-Time Extensions|See health and cloacked zeds from 16 meters distance|Better Syringe handling"
|
||||
CustomLevelInfo="Level up by doing damage with perked weapons|15% faster reload with all weapons|10% faster movement speed|You get four additional Zed-Time Extensions|See health and cloaked zeds from 16 meters distance|Better Syringe handling"
|
||||
PerkIndex=3
|
||||
OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Commando'
|
||||
OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Commando_Gold'
|
||||
|
@ -3,7 +3,7 @@ class NiceScopedWeapon extends NiceWeapon
|
||||
#exec OBJ LOAD FILE=ScopeShaders.utx
|
||||
#exec OBJ LOAD FILE=..\Textures\NicePackT.utx
|
||||
#exec OBJ LOAD FILE=ScrnWeaponPack_T.utx
|
||||
#exec OBJ LOAD FILE=ScrnWeaponPack_A.ukx
|
||||
#exec OBJ LOAD FILE=ScrnWeaponPack_A.ukx
|
||||
var() Material ZoomMat;
|
||||
var() Sound ZoomSound;
|
||||
var() int lenseMaterialID; // used since material id's seem to change alot
|
||||
@ -18,31 +18,47 @@ var Shader ScopeScriptedShader; // The shader that combi
|
||||
var Material ScriptedTextureFallback; // The texture to render if the users system doesn't support shaders
|
||||
// new scope vars
|
||||
var Combiner ScriptedScopeCombiner;
|
||||
var texture TexturedScopeTexture;
|
||||
var Material TexturedScopeTexture;
|
||||
var bool bInitializedScope; // Set to true when the scope has been initialized
|
||||
var string ZoomMatRef;
|
||||
var string ScriptedTextureFallbackRef;
|
||||
var texture CrosshairTex;
|
||||
var Material CrosshairTex;
|
||||
var string CrosshairTexRef;
|
||||
|
||||
static function Material PreloadUnknownMaterial(string reference) {
|
||||
local Material result;
|
||||
|
||||
// Try to load as various types of materials
|
||||
result = FinalBlend(DynamicLoadObject(reference, class'FinalBlend', true));
|
||||
if(result != none) {
|
||||
return result;
|
||||
}
|
||||
result = Combiner(DynamicLoadObject(reference, class'Combiner', true));
|
||||
if(result != none) {
|
||||
return result;
|
||||
}
|
||||
result = Shader(DynamicLoadObject(reference, class'Shader', true));
|
||||
if(result != none) {
|
||||
return result;
|
||||
}
|
||||
result = Texture(DynamicLoadObject(reference, class'Texture', true));
|
||||
if(result != none) {
|
||||
return result;
|
||||
}
|
||||
result = Material(DynamicLoadObject(reference, class'Material'));
|
||||
return result;
|
||||
}
|
||||
|
||||
static function PreloadAssets(Inventory Inv, optional bool bSkipRefCount){
|
||||
local NiceScopedWeapon W;
|
||||
super.PreloadAssets(Inv, bSkipRefCount);
|
||||
if(default.ZoomMat == none && default.ZoomMatRef != ""){
|
||||
// Try to load as various types of materials
|
||||
default.ZoomMat = FinalBlend(DynamicLoadObject(default.ZoomMatRef, class'FinalBlend', true));
|
||||
if(default.ZoomMat == none)
|
||||
default.ZoomMat = Combiner(DynamicLoadObject(default.ZoomMatRef, class'Combiner', true));
|
||||
if(default.ZoomMat == none)
|
||||
default.ZoomMat = Shader(DynamicLoadObject(default.ZoomMatRef, class'Shader', true));
|
||||
if(default.ZoomMat == none)
|
||||
default.ZoomMat = Texture(DynamicLoadObject(default.ZoomMatRef, class'Texture', true));
|
||||
if(default.ZoomMat == none)
|
||||
default.ZoomMat = Material(DynamicLoadObject(default.ZoomMatRef, class'Material'));
|
||||
default.ZoomMat = PreloadUnknownMaterial(default.ZoomMatRef);
|
||||
}
|
||||
if(default.ScriptedTextureFallback == none && default.ScriptedTextureFallbackRef != "")
|
||||
default.ScriptedTextureFallback = texture(DynamicLoadObject(default.ScriptedTextureFallbackRef, class'texture'));
|
||||
default.ScriptedTextureFallback = PreloadUnknownMaterial(default.ScriptedTextureFallbackRef);
|
||||
if(default.CrosshairTex == none && default.CrosshairTexRef != "")
|
||||
default.CrosshairTex = Texture(DynamicLoadObject(default.CrosshairTexRef, class'texture'));
|
||||
default.CrosshairTex = PreloadUnknownMaterial(default.CrosshairTexRef);
|
||||
W = NiceScopedWeapon(Inv);
|
||||
if(W != none){
|
||||
W.ZoomMat = default.ZoomMat;
|
||||
|
@ -744,4 +744,5 @@ defaultproperties
|
||||
activeSpreadScale=1
|
||||
spreadGainedPerShot=0
|
||||
spreadLostPerSecond=0
|
||||
RecoilVelocityScale = 0
|
||||
}
|
||||
|
@ -146,6 +146,7 @@ var bool bAutoReloadPaused; // This is used to 'pause' auto relo
|
||||
var float autoReloadPauseFrame; // Frame at which current pause began
|
||||
var bool bAutoReloadRateApplied; // Flag that remembers whether or not we've already applied reload speed up for current auto reload (to avoid constant animation's speed updates)
|
||||
var float autoReloadSpeedModifier;
|
||||
var bool updatedDefaultReloadValues;
|
||||
// Acrtive reload-related variables
|
||||
// Active reload state
|
||||
enum EActiveReloadState{
|
||||
@ -219,6 +220,8 @@ static function bool UnloadAssets(){
|
||||
return default.ReferenceCount == 0;
|
||||
}
|
||||
simulated function PostBeginPlay(){
|
||||
local float swapSpeedMod, reloadSpeedMod;
|
||||
|
||||
if(default.recordedZoomTime < 0)
|
||||
default.recordedZoomTime = ZoomTime;
|
||||
recordedZoomTime = default.recordedZoomTime;
|
||||
@ -240,6 +243,31 @@ simulated function PostBeginPlay(){
|
||||
if(FireModeClass[0] != none)
|
||||
stdFireRate = FireModeClass[0].default.fireRate;
|
||||
super.PostBeginPlay();
|
||||
// Hack solution - speed up reload and swap speed
|
||||
swapSpeedMod = 2.0;
|
||||
reloadSpeedMod = 1.5;
|
||||
bringUpTime /= swapSpeedMod;
|
||||
putDownTime /= swapSpeedMod;
|
||||
selectAnimRate *= swapSpeedMod;
|
||||
putDownAnimRate *= swapSpeedMod;
|
||||
quickPutDownTime /= swapSpeedMod;
|
||||
quickBringUpTime /= swapSpeedMod;
|
||||
if (!default.updatedDefaultReloadValues) {
|
||||
if(reloadType == RTYPE_AUTO) {
|
||||
if (fireModeClass[0] != none) {
|
||||
fireModeClass[0].default.FireAnimRate *= reloadSpeedMod;
|
||||
}
|
||||
if (fireModeClass[1] != none) {
|
||||
fireModeClass[1].default.FireAnimRate *= reloadSpeedMod;
|
||||
}
|
||||
} else {
|
||||
reloadRate /= reloadSpeedMod;
|
||||
reloadAnimRate *= reloadSpeedMod;
|
||||
default.reloadRate = reloadRate;
|
||||
default.reloadAnimRate = reloadAnimRate;
|
||||
}
|
||||
default.updatedDefaultReloadValues = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Allows to prevent leaving iron sights unwillingly
|
||||
@ -1094,6 +1122,7 @@ simulated function int GetMagazineAmmo(){
|
||||
else
|
||||
return MagAmmoRemaining;
|
||||
}
|
||||
|
||||
simulated function bool AllowReload(){
|
||||
local int actualMagSize;
|
||||
actualMagSize = GetMagazineAmmo();
|
||||
@ -1127,6 +1156,7 @@ simulated function float GetCurrentReloadMult(){
|
||||
local NiceHumanPawn nicePawn;
|
||||
local NicePlayerController nicePlayer;
|
||||
local class<NiceVeterancyTypes> niceVet;
|
||||
|
||||
nicePawn = NiceHumanPawn(Instigator);
|
||||
nicePlayer = NicePlayerController(Instigator.Controller);
|
||||
if(nicePawn != none)
|
||||
@ -1624,17 +1654,17 @@ simulated function float GetAmmoMulti()
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
recordedZoomTime=-1.000000
|
||||
SecondaryCharge=1
|
||||
LaserAttachmentClass=Class'ScrnLaserAttachmentFirstPerson'
|
||||
LaserDotClass=Class'ScrnLocalLaserDot'
|
||||
LaserAttachmentBone="LightBone"
|
||||
MagazineBone="Magazine"
|
||||
bHasChargePhase=True
|
||||
autoReloadSpeedModifier=1.000000
|
||||
bCanActiveReload=True
|
||||
activeSlowdown=0.850000
|
||||
activeSpeedup=1.150000
|
||||
activeWindow=0.060000
|
||||
bModeZeroCanDryFire=True
|
||||
recordedZoomTime=-1.000000
|
||||
SecondaryCharge=1
|
||||
LaserAttachmentClass=Class'ScrnLaserAttachmentFirstPerson'
|
||||
LaserDotClass=Class'ScrnLocalLaserDot'
|
||||
LaserAttachmentBone="LightBone"
|
||||
MagazineBone="Magazine"
|
||||
bHasChargePhase=True
|
||||
autoReloadSpeedModifier=1.000000
|
||||
bCanActiveReload=True
|
||||
activeSlowdown=0.850000
|
||||
activeSpeedup=1.150000
|
||||
activeWindow=0.060000
|
||||
bModeZeroCanDryFire=True
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
class NiceDamTypeHFRAssaultRifle extends NiceDamTypeFire
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
|
||||
heatPart=0.500000
|
||||
HeadShotDamageMult=6.000000
|
||||
bCheckForHeadShots=True
|
||||
WeaponClass=class'NiceHFR'
|
||||
DeathString="%k killed %o (Horzine Flame Rifle)."
|
||||
FemaleSuicide="%o shot herself in the foot."
|
||||
MaleSuicide="%o shot himself in the foot."
|
||||
bRagdollBullet=True
|
||||
PawnDamageEmitter=Class'ROEffects.ROBloodPuff'
|
||||
LowGoreDamageEmitter=Class'ROEffects.ROBloodPuffNoGore'
|
||||
LowDetailEmitter=Class'ROEffects.ROBloodPuffSmall'
|
||||
KDamageImpulse=5500.000000
|
||||
KDeathVel=175.000000
|
||||
KDeathUpKick=15.000000
|
||||
}
|
@ -1,316 +1,5 @@
|
||||
// Modification of the AAR525 weapons by: [B.R]HekuT
|
||||
class NiceHFR extends KFWeapon;
|
||||
#exec OBJ LOAD FILE=KillingFloorWeapons.utx
|
||||
#exec OBJ LOAD FILE=KillingFloorHUD.utx
|
||||
#exec OBJ LOAD FILE=Inf_Weapons_Foley.uax
|
||||
#exec OBJ LOAD FILE=KF_Weapons5_Scopes_Trip_T.utx
|
||||
var() Material ZoomMat;
|
||||
var() int lenseMaterialID;
|
||||
var() float scopePortalFOVHigh;
|
||||
var() float scopePortalFOV;
|
||||
var() vector XoffsetScoped;
|
||||
var() vector XoffsetHighDetail;
|
||||
var() int scopePitch;
|
||||
var() int scopeYaw;
|
||||
var() int scopePitchHigh;
|
||||
var() int scopeYawHigh;
|
||||
var ScriptedTexture ScopeScriptedTexture;
|
||||
var Shader ScopeScriptedShader;
|
||||
var Material ScriptedTextureFallback;
|
||||
var Combiner ScriptedScopeCombiner;
|
||||
var Combiner ScriptedScopeStatic;
|
||||
var texture TexturedScopeTexture;
|
||||
var bool bInitializedScope;
|
||||
var string ZoomMatRef;
|
||||
var string ScriptedTextureFallbackRef;
|
||||
static function PreloadAssets(Inventory Inv, optional bool bSkipRefCount)
|
||||
{
|
||||
super.PreloadAssets(Inv, bSkipRefCount);
|
||||
default.ZoomMat = FinalBlend(DynamicLoadObject(default.ZoomMatRef, class'FinalBlend', true));
|
||||
default.ScriptedTextureFallback = texture(DynamicLoadObject(default.ScriptedTextureFallbackRef, class'texture', true));
|
||||
if ( M99SniperRifle(Inv) != none )
|
||||
{
|
||||
M99SniperRifle(Inv).ZoomMat = default.ZoomMat;
|
||||
M99SniperRifle(Inv).ScriptedTextureFallback = default.ScriptedTextureFallback;
|
||||
}
|
||||
}
|
||||
static function bool UnloadAssets()
|
||||
{
|
||||
if ( super.UnloadAssets() )
|
||||
{
|
||||
default.ZoomMat = none;
|
||||
default.ScriptedTextureFallback = none;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
exec function pfov(int thisFOV)
|
||||
{
|
||||
if( !class'ROEngine.ROLevelInfo'.static.RODebugMode() )
|
||||
return;
|
||||
scopePortalFOV = thisFOV;
|
||||
}
|
||||
exec function pPitch(int num)
|
||||
{
|
||||
if( !class'ROEngine.ROLevelInfo'.static.RODebugMode() )
|
||||
return;
|
||||
scopePitch = num;
|
||||
scopePitchHigh = num;
|
||||
}
|
||||
exec function pYaw(int num)
|
||||
{
|
||||
if( !class'ROEngine.ROLevelInfo'.static.RODebugMode() )
|
||||
return;
|
||||
scopeYaw = num;
|
||||
scopeYawHigh = num;
|
||||
}
|
||||
simulated exec function TexSize(int i, int j)
|
||||
{
|
||||
if( !class'ROEngine.ROLevelInfo'.static.RODebugMode() )
|
||||
return;
|
||||
ScopeScriptedTexture.SetSize(i, j);
|
||||
}
|
||||
simulated function bool ShouldDrawPortal()
|
||||
{
|
||||
if( bAimingRifle )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
simulated function PostBeginPlay()
|
||||
{
|
||||
super.PostBeginPlay();
|
||||
KFScopeDetail = class'KFMod.KFWeapon'.default.KFScopeDetail;
|
||||
UpdateScopeMode();
|
||||
}
|
||||
simulated function UpdateScopeMode()
|
||||
{
|
||||
if (Level.NetMode != NM_DedicatedServer && Instigator != none && Instigator.IsLocallyControlled() &&
|
||||
Instigator.IsHumanControlled() )
|
||||
{
|
||||
if( KFScopeDetail == KF_ModelScope )
|
||||
{
|
||||
scopePortalFOV = default.scopePortalFOV;
|
||||
ZoomedDisplayFOV = CalcAspectRatioAdjustedFOV(default.ZoomedDisplayFOV);
|
||||
if (bAimingRifle)
|
||||
{
|
||||
PlayerViewOffset = XoffsetScoped;
|
||||
}
|
||||
class NiceHFR extends NiceScopedWeapon;
|
||||
|
||||
if( ScopeScriptedTexture == none )
|
||||
{
|
||||
ScopeScriptedTexture = ScriptedTexture(Level.ObjectPool.AllocateObject(class'ScriptedTexture'));
|
||||
}
|
||||
|
||||
ScopeScriptedTexture.FallBackMaterial = ScriptedTextureFallback;
|
||||
ScopeScriptedTexture.SetSize(512,512);
|
||||
ScopeScriptedTexture.Client = Self;
|
||||
|
||||
if( ScriptedScopeCombiner == none )
|
||||
{
|
||||
ScriptedScopeCombiner = Combiner(Level.ObjectPool.AllocateObject(class'Combiner'));
|
||||
ScriptedScopeCombiner.Material1 = Texture'KF_Weapons5_Scopes_Trip_T.Scope.MilDot';
|
||||
ScriptedScopeCombiner.FallbackMaterial = Shader'ScopeShaders.Zoomblur.LensShader';
|
||||
ScriptedScopeCombiner.CombineOperation = CO_Multiply;
|
||||
ScriptedScopeCombiner.AlphaOperation = AO_Use_Mask;
|
||||
ScriptedScopeCombiner.Material2 = ScopeScriptedTexture;
|
||||
}
|
||||
|
||||
if( ScopeScriptedShader == none )
|
||||
{
|
||||
ScopeScriptedShader = Shader(Level.ObjectPool.AllocateObject(class'Shader'));
|
||||
ScopeScriptedShader.Diffuse = ScriptedScopeCombiner;
|
||||
ScopeScriptedShader.SelfIllumination = ScriptedScopeCombiner;
|
||||
ScopeScriptedShader.FallbackMaterial = Shader'ScopeShaders.Zoomblur.LensShader';
|
||||
}
|
||||
|
||||
bInitializedScope = true;
|
||||
}
|
||||
else if( KFScopeDetail == KF_ModelScopeHigh )
|
||||
{
|
||||
scopePortalFOV = scopePortalFOVHigh;
|
||||
ZoomedDisplayFOV = CalcAspectRatioAdjustedFOV(default.ZoomedDisplayFOVHigh);
|
||||
if (bAimingRifle)
|
||||
{
|
||||
PlayerViewOffset = XoffsetHighDetail;
|
||||
}
|
||||
|
||||
if( ScopeScriptedTexture == none )
|
||||
{
|
||||
ScopeScriptedTexture = ScriptedTexture(Level.ObjectPool.AllocateObject(class'ScriptedTexture'));
|
||||
}
|
||||
ScopeScriptedTexture.FallBackMaterial = ScriptedTextureFallback;
|
||||
ScopeScriptedTexture.SetSize(1024,1024);
|
||||
ScopeScriptedTexture.Client = Self;
|
||||
|
||||
if( ScriptedScopeCombiner == none )
|
||||
{
|
||||
ScriptedScopeCombiner = Combiner(Level.ObjectPool.AllocateObject(class'Combiner'));
|
||||
ScriptedScopeCombiner.Material1 = Texture'KF_Weapons5_Scopes_Trip_T.Scope.MilDot';
|
||||
ScriptedScopeCombiner.FallbackMaterial = Shader'ScopeShaders.Zoomblur.LensShader';
|
||||
ScriptedScopeCombiner.CombineOperation = CO_Multiply;
|
||||
ScriptedScopeCombiner.AlphaOperation = AO_Use_Mask;
|
||||
ScriptedScopeCombiner.Material2 = ScopeScriptedTexture;
|
||||
}
|
||||
|
||||
if( ScopeScriptedShader == none )
|
||||
{
|
||||
ScopeScriptedShader = Shader(Level.ObjectPool.AllocateObject(class'Shader'));
|
||||
ScopeScriptedShader.Diffuse = ScriptedScopeCombiner;
|
||||
ScopeScriptedShader.SelfIllumination = ScriptedScopeCombiner;
|
||||
ScopeScriptedShader.FallbackMaterial = Shader'ScopeShaders.Zoomblur.LensShader';
|
||||
}
|
||||
|
||||
bInitializedScope = true;
|
||||
}
|
||||
else if (KFScopeDetail == KF_TextureScope)
|
||||
{
|
||||
ZoomedDisplayFOV = CalcAspectRatioAdjustedFOV(default.ZoomedDisplayFOV);
|
||||
PlayerViewOffset.X = default.PlayerViewOffset.X;
|
||||
|
||||
bInitializedScope = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
simulated event RenderTexture(ScriptedTexture Tex)
|
||||
{
|
||||
local rotator RollMod;
|
||||
RollMod = Instigator.GetViewRotation();
|
||||
if(Owner != none && Instigator != none && Tex != none && Tex.Client != none)
|
||||
Tex.DrawPortal(0,0,Tex.USize,Tex.VSize,Owner,(Instigator.Location + Instigator.EyePosition()), RollMod, scopePortalFOV );
|
||||
}
|
||||
/**
|
||||
* Handles all the functionality for zooming in including
|
||||
* setting the parameters for the weapon, pawn, and playercontroller
|
||||
*
|
||||
* @param bAnimateTransition whether or not to animate this zoom transition
|
||||
*/
|
||||
simulated function ZoomIn(bool bAnimateTransition)
|
||||
{
|
||||
super(BaseKFWeapon).ZoomIn(bAnimateTransition);
|
||||
bAimingRifle = True;
|
||||
if( KFHumanPawn(Instigator)!=none )
|
||||
KFHumanPawn(Instigator).SetAiming(True);
|
||||
if( Level.NetMode != NM_DedicatedServer && KFPlayerController(Instigator.Controller) != none )
|
||||
{
|
||||
if( AimInSound != none )
|
||||
{
|
||||
PlayOwnedSound(AimInSound, SLOT_Interact,,,,, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Handles all the functionality for zooming out including
|
||||
* setting the parameters for the weapon, pawn, and playercontroller
|
||||
*
|
||||
* @param bAnimateTransition whether or not to animate this zoom transition
|
||||
*/
|
||||
simulated function ZoomOut(bool bAnimateTransition)
|
||||
{
|
||||
super.ZoomOut(bAnimateTransition);
|
||||
bAimingRifle = False;
|
||||
if( KFHumanPawn(Instigator)!=none )
|
||||
KFHumanPawn(Instigator).SetAiming(False);
|
||||
if( Level.NetMode != NM_DedicatedServer && KFPlayerController(Instigator.Controller) != none )
|
||||
{
|
||||
if( AimOutSound != none )
|
||||
{
|
||||
PlayOwnedSound(AimOutSound, SLOT_Interact,,,,, false);
|
||||
}
|
||||
KFPlayerController(Instigator.Controller).TransitionFOV(KFPlayerController(Instigator.Controller).DefaultFOV,0.0);
|
||||
}
|
||||
}
|
||||
simulated event OnZoomInFinished()
|
||||
{
|
||||
local name anim;
|
||||
local float frame, rate;
|
||||
GetAnimParams(0, anim, frame, rate);
|
||||
if (ClientState == WS_ReadyToFire)
|
||||
{
|
||||
if (anim == IdleAnim)
|
||||
{
|
||||
PlayIdle();
|
||||
}
|
||||
}
|
||||
if( Level.NetMode != NM_DedicatedServer && KFPlayerController(Instigator.Controller) != none &&
|
||||
KFScopeDetail == KF_TextureScope )
|
||||
{
|
||||
KFPlayerController(Instigator.Controller).TransitionFOV(PlayerIronSightFOV,0.0);
|
||||
}
|
||||
}
|
||||
simulated event RenderOverlays(Canvas Canvas)
|
||||
{
|
||||
local int m;
|
||||
local PlayerController PC;
|
||||
if (Instigator == none)
|
||||
return;
|
||||
PC = PlayerController(Instigator.Controller);
|
||||
if(PC == none)
|
||||
return;
|
||||
if(!bInitializedScope && PC != none )
|
||||
{
|
||||
UpdateScopeMode();
|
||||
}
|
||||
Canvas.DrawActor(none, false, true);
|
||||
for (m = 0; m < NUM_FIRE_MODES; m++)
|
||||
{
|
||||
if (FireMode[m] != none)
|
||||
{
|
||||
FireMode[m].DrawMuzzleFlash(Canvas);
|
||||
}
|
||||
}
|
||||
|
||||
SetLocation( Instigator.Location + Instigator.CalcDrawOffset(self) );
|
||||
SetRotation( Instigator.GetViewRotation() + ZoomRotInterp);
|
||||
PreDrawFPWeapon();
|
||||
|
||||
if(bAimingRifle && PC != none && (KFScopeDetail == KF_ModelScope || KFScopeDetail == KF_ModelScopeHigh))
|
||||
{
|
||||
if (ShouldDrawPortal())
|
||||
{
|
||||
if ( ScopeScriptedTexture != none )
|
||||
{
|
||||
Skins[LenseMaterialID] = ScopeScriptedShader;
|
||||
ScopeScriptedTexture.Client = Self;
|
||||
ScopeScriptedTexture.Revision = (ScopeScriptedTexture.Revision +1);
|
||||
}
|
||||
}
|
||||
|
||||
bDrawingFirstPerson = true;
|
||||
Canvas.DrawBoundActor(self, false, false,DisplayFOV,PC.Rotation,rot(0,0,0),Instigator.CalcZoomedDrawOffset(self));
|
||||
bDrawingFirstPerson = false;
|
||||
}
|
||||
else if( KFScopeDetail == KF_TextureScope && PC.DesiredFOV == PlayerIronSightFOV && bAimingRifle)
|
||||
{
|
||||
Skins[LenseMaterialID] = ScriptedTextureFallback;
|
||||
|
||||
SetZoomBlendColor(Canvas);
|
||||
|
||||
Canvas.Style = ERenderStyle.STY_Normal;
|
||||
Canvas.SetPos(0, 0);
|
||||
Canvas.DrawTile(ZoomMat, (Canvas.SizeX - Canvas.SizeY) / 2, Canvas.SizeY, 0.0, 0.0, 8, 8);
|
||||
Canvas.SetPos(Canvas.SizeX, 0);
|
||||
Canvas.DrawTile(ZoomMat, -(Canvas.SizeX - Canvas.SizeY) / 2, Canvas.SizeY, 0.0, 0.0, 8, 8);
|
||||
|
||||
Canvas.Style = 255;
|
||||
Canvas.SetPos((Canvas.SizeX - Canvas.SizeY) / 2,0);
|
||||
Canvas.DrawTile(ZoomMat, Canvas.SizeY, Canvas.SizeY, 0.0, 0.0, 1024, 1024);
|
||||
|
||||
Canvas.Font = Canvas.MedFont;
|
||||
Canvas.SetDrawColor(200,150,0);
|
||||
|
||||
Canvas.SetPos(Canvas.SizeX * 0.16, Canvas.SizeY * 0.43);
|
||||
Canvas.DrawText("Zoom: 3.0");
|
||||
|
||||
Canvas.SetPos(Canvas.SizeX * 0.16, Canvas.SizeY * 0.47);
|
||||
}
|
||||
else
|
||||
{
|
||||
Skins[LenseMaterialID] = ScriptedTextureFallback;
|
||||
bDrawingFirstPerson = true;
|
||||
Canvas.DrawActor(self, false, false, DisplayFOV);
|
||||
bDrawingFirstPerson = false;
|
||||
}
|
||||
}
|
||||
simulated function float CalcAspectRatioAdjustedFOV(float AdjustFOV)
|
||||
{
|
||||
local KFPlayerController KFPC;
|
||||
@ -333,204 +22,15 @@ simulated function float CalcAspectRatioAdjustedFOV(float AdjustFOV)
|
||||
return AdjustFOV;
|
||||
}
|
||||
}
|
||||
simulated function AdjustIngameScope()
|
||||
{
|
||||
local PlayerController PC;
|
||||
if(Instigator == none || PlayerController(Instigator.Controller) == none)
|
||||
return;
|
||||
PC = PlayerController(Instigator.Controller);
|
||||
if( !bHasScope )
|
||||
return;
|
||||
switch (KFScopeDetail)
|
||||
{
|
||||
case KF_ModelScope:
|
||||
if( bAimingRifle )
|
||||
DisplayFOV = CalcAspectRatioAdjustedFOV(default.ZoomedDisplayFOV);
|
||||
if ( PC.DesiredFOV == PlayerIronSightFOV && bAimingRifle )
|
||||
{
|
||||
if( Level.NetMode != NM_DedicatedServer && KFPlayerController(Instigator.Controller) != none )
|
||||
{
|
||||
KFPlayerController(Instigator.Controller).TransitionFOV(KFPlayerController(Instigator.Controller).DefaultFOV,0.0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case KF_TextureScope:
|
||||
if( bAimingRifle )
|
||||
DisplayFOV = CalcAspectRatioAdjustedFOV(default.ZoomedDisplayFOV);
|
||||
if ( bAimingRifle && PC.DesiredFOV != PlayerIronSightFOV )
|
||||
{
|
||||
if( Level.NetMode != NM_DedicatedServer && KFPlayerController(Instigator.Controller) != none )
|
||||
{
|
||||
KFPlayerController(Instigator.Controller).TransitionFOV(PlayerIronSightFOV,0.0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case KF_ModelScopeHigh:
|
||||
if( bAimingRifle )
|
||||
{
|
||||
if( ZoomedDisplayFOVHigh > 0 )
|
||||
{
|
||||
DisplayFOV = CalcAspectRatioAdjustedFOV(default.ZoomedDisplayFOVHigh);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisplayFOV = CalcAspectRatioAdjustedFOV(default.ZoomedDisplayFOV);
|
||||
}
|
||||
}
|
||||
if ( bAimingRifle && PC.DesiredFOV == PlayerIronSightFOV )
|
||||
{
|
||||
if( Level.NetMode != NM_DedicatedServer && KFPlayerController(Instigator.Controller) != none )
|
||||
{
|
||||
KFPlayerController(Instigator.Controller).TransitionFOV(KFPlayerController(Instigator.Controller).DefaultFOV,0.0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
UpdateScopeMode();
|
||||
}
|
||||
simulated event Destroyed()
|
||||
{
|
||||
if (ScopeScriptedTexture != none)
|
||||
{
|
||||
ScopeScriptedTexture.Client = none;
|
||||
Level.ObjectPool.FreeObject(ScopeScriptedTexture);
|
||||
ScopeScriptedTexture=none;
|
||||
}
|
||||
if (ScriptedScopeCombiner != none)
|
||||
{
|
||||
ScriptedScopeCombiner.Material2 = none;
|
||||
Level.ObjectPool.FreeObject(ScriptedScopeCombiner);
|
||||
ScriptedScopeCombiner = none;
|
||||
}
|
||||
if (ScopeScriptedShader != none)
|
||||
{
|
||||
ScopeScriptedShader.Diffuse = none;
|
||||
ScopeScriptedShader.SelfIllumination = none;
|
||||
Level.ObjectPool.FreeObject(ScopeScriptedShader);
|
||||
ScopeScriptedShader = none;
|
||||
}
|
||||
Super.Destroyed();
|
||||
}
|
||||
simulated function PreTravelCleanUp()
|
||||
{
|
||||
if (ScopeScriptedTexture != none)
|
||||
{
|
||||
ScopeScriptedTexture.Client = none;
|
||||
Level.ObjectPool.FreeObject(ScopeScriptedTexture);
|
||||
ScopeScriptedTexture=none;
|
||||
}
|
||||
if (ScriptedScopeCombiner != none)
|
||||
{
|
||||
ScriptedScopeCombiner.Material2 = none;
|
||||
Level.ObjectPool.FreeObject(ScriptedScopeCombiner);
|
||||
ScriptedScopeCombiner = none;
|
||||
}
|
||||
if (ScopeScriptedShader != none)
|
||||
{
|
||||
ScopeScriptedShader.Diffuse = none;
|
||||
ScopeScriptedShader.SelfIllumination = none;
|
||||
Level.ObjectPool.FreeObject(ScopeScriptedShader);
|
||||
ScopeScriptedShader = none;
|
||||
}
|
||||
}
|
||||
state PendingClientWeaponSet
|
||||
{
|
||||
simulated function Timer()
|
||||
{
|
||||
if ( Pawn(Owner) != none && !bIsReloading )
|
||||
{
|
||||
ClientWeaponSet(bPendingSwitch);
|
||||
}
|
||||
|
||||
if ( IsInState('PendingClientWeaponSet') )
|
||||
{
|
||||
SetTimer(0.1, false);
|
||||
}
|
||||
}
|
||||
simulated function BeginState()
|
||||
{
|
||||
SetTimer(0.1, false);
|
||||
}
|
||||
simulated function EndState()
|
||||
{
|
||||
}
|
||||
}
|
||||
simulated function SetZoomBlendColor(Canvas c)
|
||||
{
|
||||
local Byte val;
|
||||
local Color clr;
|
||||
local Color fog;
|
||||
clr.R = 255;
|
||||
clr.G = 255;
|
||||
clr.B = 255;
|
||||
clr.A = 255;
|
||||
if( Instigator.Region.Zone.bDistanceFog )
|
||||
{
|
||||
fog = Instigator.Region.Zone.DistanceFogColor;
|
||||
val = 0;
|
||||
val = Max( val, fog.R);
|
||||
val = Max( val, fog.G);
|
||||
val = Max( val, fog.B);
|
||||
if( val > 128 )
|
||||
{
|
||||
val -= 128;
|
||||
clr.R -= val;
|
||||
clr.G -= val;
|
||||
clr.B -= val;
|
||||
}
|
||||
}
|
||||
c.DrawColor = clr;
|
||||
}
|
||||
function bool RecommendRangedAttack()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
function float SuggestAttackStyle()
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
function bool RecommendLongRangedAttack()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
simulated function AnimEnd(int channel)
|
||||
{
|
||||
if(!FireMode[1].IsInState('FireLoop'))
|
||||
{
|
||||
Super.AnimEnd(channel);
|
||||
}
|
||||
}
|
||||
simulated function WeaponTick(float dt)
|
||||
{
|
||||
Super.WeaponTick(dt);
|
||||
}
|
||||
simulated function bool StartFire(int Mode)
|
||||
{
|
||||
if( Mode == 0 )
|
||||
return super.StartFire(Mode);
|
||||
if( !super.StartFire(Mode) )
|
||||
return false;
|
||||
|
||||
if( AmmoAmount(0) <= 0 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AnimStopLooping();
|
||||
if( !FireMode[Mode].IsInState('FireLoop') && (AmmoAmount(0) > 0) )
|
||||
{
|
||||
FireMode[Mode].StartFiring();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
reloadPreEndFrame=0.339
|
||||
reloadEndFrame=0.732
|
||||
reloadChargeEndFrame=-1.000000
|
||||
reloadMagStartFrame=0.643
|
||||
reloadChargeStartFrame=-1.000000
|
||||
magazineBone="Magazine"
|
||||
lenseMaterialID=3
|
||||
scopePortalFOVHigh=22.000000
|
||||
scopePortalFOV=12.000000
|
||||
@ -538,13 +38,13 @@ defaultproperties
|
||||
ScriptedTextureFallbackRef="NicePackT.HFR.CBLens_cmb"
|
||||
bHasScope=True
|
||||
ZoomedDisplayFOVHigh=35.000000
|
||||
MagCapacity=10
|
||||
MagCapacity=50
|
||||
ReloadRate=3.000000
|
||||
ReloadAnim="Reload"
|
||||
ReloadAnimRate=0.600000
|
||||
WeaponReloadAnim="Reload_M4"
|
||||
bSteadyAim=True
|
||||
Weight=7.000000
|
||||
Weight=5.000000
|
||||
bHasAimingMode=True
|
||||
IdleAimAnim="Idle"
|
||||
StandardDisplayFOV=60.000000
|
||||
@ -562,7 +62,7 @@ defaultproperties
|
||||
PlayerIronSightFOV=65.000000
|
||||
ZoomedDisplayFOV=32.000000
|
||||
FireModeClass(0)=class'NiceHFRPFire'
|
||||
FireModeClass(1)=class'NiceHFRBurstFire'
|
||||
FireModeClass(1)=Class'KFMod.NoFire'
|
||||
PutDownAnim="PutDown"
|
||||
AIRating=0.700000
|
||||
CurrentRating=0.700000
|
||||
|
@ -1,10 +1,10 @@
|
||||
class NiceHFRAmmo extends KFAmmunition;
|
||||
class NiceHFRAmmo extends NiceAmmo;
|
||||
#EXEC OBJ LOAD FILE=KillingFloorHUD.utx
|
||||
defaultproperties
|
||||
{
|
||||
AmmoPickupAmount=15
|
||||
MaxAmmo=100
|
||||
InitialAmount=40
|
||||
AmmoPickupAmount=75
|
||||
MaxAmmo=300
|
||||
InitialAmount=75
|
||||
PickupClass=class'NiceHFRAmmoPickup'
|
||||
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
|
||||
IconCoords=(X1=336,Y1=82,X2=382,Y2=125)
|
||||
|
@ -1,7 +1,7 @@
|
||||
class NiceHFRAmmoPickup extends KFAmmoPickup;
|
||||
class NiceHFRAmmoPickup extends NiceAmmoPickup;
|
||||
defaultproperties
|
||||
{
|
||||
AmmoAmount=15
|
||||
AmmoAmount=50
|
||||
InventoryType=class'NiceHFRAmmo'
|
||||
PickupMessage="Fire balloon"
|
||||
StaticMesh=StaticMesh'KillingFloorStatics.L85Ammo'
|
||||
|
11
sources/Weapons/Playable/Incendiary/HFR/NiceHFRBullet.uc
Normal file
11
sources/Weapons/Playable/Incendiary/HFR/NiceHFRBullet.uc
Normal file
@ -0,0 +1,11 @@
|
||||
class NiceHFRBullet extends NiceBullet;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bDisableComplexMovement=False
|
||||
trailXClass=None
|
||||
StaticMeshRef="ZED_FX_SM.Energy.ZED_FX_Energy_Card"
|
||||
DrawScale=0.500000
|
||||
ambientSoundRef="KF_FY_ZEDV2SND.WEP_ZEDV2_Projectile_Loop"
|
||||
explosionImpact=(bImportanEffect=True,decalClass=Class'KFMod.FlameThrowerBurnMark_Medium',EmitterClass=Class'KFMod.ZEDMKIIPrimaryProjectileImpact',emitterShiftWall=20.000000,emitterShiftPawn=20.000000,noiseRef="KF_FY_ZEDV2SND.WEP_ZEDV2_Projectile_Explode",noiseVolume=2.000000)
|
||||
}
|
@ -1,25 +1,29 @@
|
||||
class NiceHFRPFire extends KFFire;
|
||||
class NiceHFRPFire extends NiceFire;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
ProjectileSpeed=1000.000000
|
||||
FireAimedAnim="Fire_Iron"
|
||||
RecoilRate=0.120000
|
||||
maxVerticalRecoilAngle=500
|
||||
RecoilRate=0.070000
|
||||
maxVerticalRecoilAngle=70
|
||||
maxHorizontalRecoilAngle=35
|
||||
bAccuracyBonusForSemiAuto=True
|
||||
bRandomPitchFireSound=False
|
||||
FireSoundRef="KF_SP_LongmusketSnd.KFO_Sniper_Fire_M"
|
||||
StereoFireSoundRef="KF_SP_LongmusketSnd.KFO_Sniper_Fire_S"
|
||||
NoAmmoSoundRef="KF_AK47Snd.AK47_DryFire"
|
||||
DamageType=class'NiceDamTypeHFRAssaultRifle'
|
||||
FireSoundRef="KF_FY_ZEDV2SND.WEP_ZEDV2_Fire_M"
|
||||
StereoFireSoundRef="KF_FY_ZEDV2SND.WEP_ZEDV2_Fire_S"
|
||||
NoAmmoSoundRef="KF_ZEDGunSnd.KF_WEP_ZED_Dryfire"
|
||||
DamageType=class'NiceDamTypeHFR'
|
||||
DamageMax=50
|
||||
Momentum=8500.000000
|
||||
bWaitForRelease=True
|
||||
bWaitForRelease=False
|
||||
TransientSoundVolume=1.200000
|
||||
TransientSoundRadius=500.000000
|
||||
FireLoopAnim="Fire"
|
||||
FireAnimRate=0.909000
|
||||
TweenTime=0.025000
|
||||
FireForce="AssaultRifleFire"
|
||||
FireRate=0.600000
|
||||
FireRate=0.096000
|
||||
bulletClass=class'NiceHFRBullet'
|
||||
AmmoClass=class'NiceHFRAmmo'
|
||||
AmmoPerFire=1
|
||||
ShakeRotMag=(X=50.000000,Y=50.000000,Z=350.000000)
|
||||
@ -32,5 +36,4 @@ defaultproperties
|
||||
FlashEmitterClass=Class'ROEffects.MuzzleFlash1stSPSniper'
|
||||
aimerror=42.000000
|
||||
Spread=0.015000
|
||||
SpreadStyle=SS_Random
|
||||
}
|
||||
|
@ -1,18 +1,19 @@
|
||||
class NiceHFRPickup extends KFWeaponPickup;
|
||||
class NiceHFRPickup extends NiceWeaponPickup;
|
||||
defaultproperties
|
||||
{
|
||||
Weight=7.000000
|
||||
AmmoCost=30
|
||||
BuyClipSize=15
|
||||
Weight=5.000000
|
||||
AmmoCost=26
|
||||
BuyClipSize=50
|
||||
PowerValue=100
|
||||
SpeedValue=100
|
||||
RangeValue=40
|
||||
cost=750
|
||||
Description="Advanced horzine flame rifle."
|
||||
ItemName="Horzine flame rifle"
|
||||
ItemShortName="HFR"
|
||||
AmmoItemName="Fire balloon"
|
||||
AmmoMesh=StaticMesh'KillingFloorStatics.FT_AmmoMesh'
|
||||
CorrespondingPerkIndex=5
|
||||
CorrespondingPerkIndex=3
|
||||
EquipmentCategoryID=3
|
||||
InventoryType=class'NiceHFR'
|
||||
PickupMessage="You got the HFR."
|
||||
|
@ -1,6 +1,6 @@
|
||||
class NiceHFRTendril extends FlameTendril;
|
||||
defaultproperties
|
||||
{
|
||||
Damage=36.000000
|
||||
Damage=16.000000
|
||||
MyDamageType=class'NiceDamTypeHFR'
|
||||
}
|
||||
|
@ -52,7 +52,6 @@ defaultproperties
|
||||
ClawMeleeDamageRange=85.000000
|
||||
ImpaleMeleeDamageRange=45.000000
|
||||
fuelRatio=0.400000
|
||||
bFrugalFuelUsage=False
|
||||
clientHeadshotScale=1.200000
|
||||
ZapThreshold=5.000000
|
||||
ZappedDamageMod=1.250000
|
||||
|
@ -34,17 +34,20 @@ event Landed(vector HitNormal)
|
||||
}
|
||||
event Bump(actor Other)
|
||||
{
|
||||
local int actualDamage;
|
||||
// TODO: is there a better way
|
||||
if(bPouncing && KFHumanPawn(Other)!=none )
|
||||
{
|
||||
KFHumanPawn(Other).TakeDamage(((MeleeDamage - (MeleeDamage * 0.05)) + (MeleeDamage * (FRand() * 0.1))), self ,self.Location,self.velocity, class'NiceZedMeleeDamageType');
|
||||
if (KFHumanPawn(Other).Health <=0)
|
||||
{
|
||||
//TODO - move this to humanpawn.takedamage? Also see KFMonster.MeleeDamageTarget
|
||||
KFHumanPawn(Other).SpawnGibs(self.rotation, 1);
|
||||
}
|
||||
//After impact, there'll be no momentum for further bumps
|
||||
bPouncing=false;
|
||||
actualDamage = MeleeDamage;
|
||||
ModDamageFromZed(actualDamage, class'NiceZedMeleeDamageType');
|
||||
KFHumanPawn(Other).TakeDamage(((actualDamage * 0.95) + (actualDamage * (FRand() * 0.1))), self ,self.Location,self.velocity, class'NiceZedMeleeDamageType');
|
||||
if (KFHumanPawn(Other).Health <=0)
|
||||
{
|
||||
//TODO - move this to humanpawn.takedamage? Also see KFMonster.MeleeDamageTarget
|
||||
KFHumanPawn(Other).SpawnGibs(self.rotation, 1);
|
||||
}
|
||||
//After impact, there'll be no momentum for further bumps
|
||||
bPouncing=false;
|
||||
}
|
||||
}
|
||||
// Blend his attacks so he can hit you in mid air.
|
||||
|
@ -441,7 +441,7 @@ function SpinDamage(actor Target)
|
||||
local vector HitLocation;
|
||||
local Name TearBone;
|
||||
local Float dummy;
|
||||
local float DamageAmount;
|
||||
local int damageAmount;
|
||||
local vector PushDir;
|
||||
local KFHumanPawn HumanTarget;
|
||||
if(target==none)
|
||||
@ -456,8 +456,9 @@ function SpinDamage(actor Target)
|
||||
}
|
||||
if (Target !=none && Target.IsA('KFDoorMover'))
|
||||
{
|
||||
Target.TakeDamage(DamageAmount , self ,HitLocation,pushdir, class'NiceZedMeleeDamageType');
|
||||
PlaySound(MeleeAttackHitSound, SLOT_Interact, 1.25);
|
||||
ModDamageFromZed(DamageAmount, class'NiceZedMeleeDamageType');
|
||||
Target.TakeDamage(DamageAmount , self ,HitLocation,pushdir, class'NiceZedMeleeDamageType');
|
||||
PlaySound(MeleeAttackHitSound, SLOT_Interact, 1.25);
|
||||
}
|
||||
if (KFHumanPawn(Target)!=none)
|
||||
{
|
||||
@ -465,8 +466,9 @@ function SpinDamage(actor Target)
|
||||
if (HumanTarget.Controller != none)
|
||||
HumanTarget.Controller.ShakeView(RotMag, RotRate, RotTime, OffsetMag, OffsetRate, OffsetTime);
|
||||
|
||||
//TODO - line below was KFPawn. Does this whole block need to be KFPawn, or is it OK as KFHumanPawn?
|
||||
KFHumanPawn(Target).TakeDamage(DamageAmount, self ,HitLocation,pushdir, class'NiceZedMeleeDamageType');
|
||||
ModDamageFromZed(DamageAmount, class'NiceZedMeleeDamageType');
|
||||
//TODO - line below was KFPawn. Does this whole block need to be KFPawn, or is it OK as KFHumanPawn?
|
||||
KFHumanPawn(Target).TakeDamage(DamageAmount, self ,HitLocation,pushdir, class'NiceZedMeleeDamageType');
|
||||
|
||||
if (KFHumanPawn(Target).Health <=0)
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ simulated function HurtRadius(float DamageAmount, float DamageRadius, class<Dama
|
||||
local float InitMomentum;
|
||||
local float damageScale, dist;
|
||||
local vector dir;
|
||||
local float UsedDamageAmount;
|
||||
local int UsedDamageAmount;
|
||||
local KFHumanPawn humanPawn;
|
||||
local class<NiceVeterancyTypes> niceVet;
|
||||
|
||||
@ -266,7 +266,7 @@ simulated function HurtRadius(float DamageAmount, float DamageRadius, class<Dama
|
||||
UsedDamageAmount = 100000; // Siren always shatters glass
|
||||
else
|
||||
UsedDamageAmount = DamageAmount;
|
||||
|
||||
ModDamageFromZed(UsedDamageAmount, DamageType);
|
||||
Victims.TakeDamage(damageScale * UsedDamageAmount,Instigator, Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir, (damageScale * Momentum * dir), DamageType);
|
||||
|
||||
if (Instigator != none && Vehicle(Victims) != none && Vehicle(Victims).Health > 0)
|
||||
|
@ -127,10 +127,7 @@ var float heatDissipationRate;
|
||||
var float heatTicksPerSecond;
|
||||
// Tracks last time heat tick occured
|
||||
var float lastHeatTick;
|
||||
// If set to 'true' - low-value ticks of fire DoT will waste accordingly small
|
||||
// amount of fuel, otherwise they will always waste some minimal amount,
|
||||
// resulting in a loss of potential damage
|
||||
var bool bFrugalFuelUsage;
|
||||
var float MIN_HEAT, MAX_HEAT;
|
||||
|
||||
//==============================================================================
|
||||
//==============================================================================
|
||||
@ -475,7 +472,7 @@ function AccumulateHeadDamage( float addDamage,
|
||||
bool bIsHeadshot,
|
||||
NicePlayerController nicePlayer){
|
||||
if(bIsHeadshot){
|
||||
AccHeadDamage += addDamage;
|
||||
AccHeadDamage += addDamage * 0.5;
|
||||
HeadRecoveryCountDown = HeadRecoveryTime;
|
||||
if(AccHeadDamage > (default.HeadHealth / 1.5)
|
||||
&& (concussionCountdown > 0.0 && IsStunPossible()))
|
||||
@ -686,9 +683,6 @@ simulated function float GetDistanceToHead(Vector location) {
|
||||
local Coords headBoneCoords;
|
||||
local Vector headLocation;
|
||||
|
||||
local Vector AToLineOrig;
|
||||
local Vector lineDir;
|
||||
|
||||
if(headBone == '') {
|
||||
return 0.0;
|
||||
}
|
||||
@ -707,28 +701,28 @@ function ModDamage( out int damage,
|
||||
float headshotLevel,
|
||||
KFPlayerReplicationInfo KFPRI,
|
||||
optional float lockonTime){
|
||||
local NicePlayerController nicePlayer;
|
||||
local bool hasGiantSlayer;
|
||||
local int bonusDamageStacks;
|
||||
if(KFPRI == none || KFPRI.ClientVeteranSkill == none) return;
|
||||
// Add perked damage
|
||||
damage = KFPRI.ClientVeteranSkill.Static.AddDamage( KFPRI, self,
|
||||
KFPawn(instigatedBy),
|
||||
damage, damageType);
|
||||
// Skill bonuses
|
||||
if(instigatedBy == none)
|
||||
return;
|
||||
nicePlayer = NicePlayerController(instigatedBy.controller);
|
||||
if(nicePlayer == none)
|
||||
return;
|
||||
hasGiantSlayer = class'NiceVeterancyTypes'.static.hasSkill(nicePlayer,
|
||||
class'NiceSkillCommandoGiantSlayer');
|
||||
if(!hasGiantSlayer)
|
||||
return;
|
||||
bonusDamageStacks =
|
||||
int(health / class'NiceSkillCommandoGiantSlayer'.default.healthStep);
|
||||
damage *= 1.0f + bonusDamageStacks *
|
||||
class'NiceSkillCommandoGiantSlayer'.default.bonusDamageMult;
|
||||
local NicePlayerController nicePlayer;
|
||||
local bool hasGiantSlayer;
|
||||
local int bonusDamageStacks;
|
||||
if(KFPRI == none || KFPRI.ClientVeteranSkill == none) return;
|
||||
// Add perked damage
|
||||
damage = KFPRI.ClientVeteranSkill.Static.AddDamage( KFPRI, self,
|
||||
KFPawn(instigatedBy),
|
||||
damage, damageType);
|
||||
// Skill bonuses
|
||||
if(instigatedBy == none)
|
||||
return;
|
||||
nicePlayer = NicePlayerController(instigatedBy.controller);
|
||||
if(nicePlayer == none)
|
||||
return;
|
||||
hasGiantSlayer = class'NiceVeterancyTypes'.static.hasSkill(nicePlayer,
|
||||
class'NiceSkillCommandoGiantSlayer');
|
||||
if(!hasGiantSlayer)
|
||||
return;
|
||||
bonusDamageStacks =
|
||||
int(health / class'NiceSkillCommandoGiantSlayer'.default.healthStep);
|
||||
damage *= 1.0f + bonusDamageStacks *
|
||||
class'NiceSkillCommandoGiantSlayer'.default.bonusDamageMult;
|
||||
}
|
||||
function ModRegularDamage( out int damage,
|
||||
Pawn instigatedBy,
|
||||
@ -750,9 +744,6 @@ function ModRegularDamage( out int damage,
|
||||
damage = niceVet.static.AddRegDamage( KFPRI, self,
|
||||
KFPawn(instigatedBy), damage,
|
||||
damageType);
|
||||
// Add some damage against crispy zeds
|
||||
if(bCrispified)
|
||||
damage += (Max(1200 - default.Health, 0) * damage) / 1200;
|
||||
// Skills bonuses
|
||||
if(nicePlayer == none) return;
|
||||
hasOverkillSkill = class'NiceVeterancyTypes'.static.
|
||||
@ -841,13 +832,15 @@ function int ModBodyDamage( out int damage,
|
||||
return painDamage;
|
||||
}
|
||||
// Do effects, based on fire damage dealt to monster
|
||||
function FireDamageEffects( int damage,
|
||||
function FireDamageEffects(out int damage,
|
||||
Pawn instigatedBy,
|
||||
Vector hitLocation,
|
||||
Vector momentum,
|
||||
class<NiceWeaponDamageType> damageType,
|
||||
float headshotLevel,
|
||||
KFPlayerReplicationInfo KFPRI){
|
||||
local float heatDelta, bonusFireDamage;
|
||||
local bool shouldBeSetOnFire, isFireWeapon;
|
||||
damage = FMax(0.0, damage);
|
||||
iceCrustStrenght = FMax(0.0, iceCrustStrenght);
|
||||
if(bFrozenZed){
|
||||
@ -865,24 +858,39 @@ function FireDamageEffects( int damage,
|
||||
}
|
||||
damage /= 10;
|
||||
}
|
||||
if(damage <= 0) return;
|
||||
if(damage <= 0) {
|
||||
return;
|
||||
}
|
||||
// Turn up the heat!
|
||||
// (we can only make it twice as hot with that damage,
|
||||
// but set limit at least at 50, as if we've dealt at least 25 heat damage)
|
||||
heat += (damage * HeatIncScale())
|
||||
heatDelta = (damage * HeatIncScale())
|
||||
* FMin(1.0, FMax(0.0, (2 - Abs(heat) / FMax(25, Abs(damage) ))));
|
||||
if (concussionCountdown > 0) {
|
||||
heat += heatDelta * 2;
|
||||
} else {
|
||||
heat += heatDelta;
|
||||
}
|
||||
CapHeat();
|
||||
// Change damage type if new one was stronger
|
||||
if(!bOnFire || damage * HeatIncScale() > lastBurnDamage){
|
||||
fireDamageClass = damageType;
|
||||
burnInstigator = instigatedBy;
|
||||
}
|
||||
// Double heat damage at the cost of the fuel, if zed is already on fire
|
||||
isFireWeapon = (damageType.default.heatPart >= 0.75);
|
||||
if (bOnFire && isFireWeapon) {
|
||||
bonusFireDamage = FMax(FMin(damage, flameFuel), 0);
|
||||
flameFuel -= bonusFireDamage;
|
||||
damage += bonusFireDamage;
|
||||
}
|
||||
// Set on fire, if necessary
|
||||
if(heat > GetIgnitionPoint() && !bOnFire && bCanBurn){
|
||||
shouldBeSetOnFire = (heat > GetIgnitionPoint()) || isFireWeapon;
|
||||
if(shouldBeSetOnFire && !bOnFire && bCanBurn){
|
||||
bBurnified = true;
|
||||
bOnFire = true;
|
||||
burnInstigator = instigatedBy;
|
||||
fireDamageClass = damageType;
|
||||
fireDamageClass = damageType;
|
||||
lastHeatTick = Level.TimeSeconds;
|
||||
}
|
||||
}
|
||||
@ -1017,6 +1025,10 @@ function DealHeadDamage( int damage,
|
||||
// Actual damage effects
|
||||
// Skull injury killed a zed
|
||||
if(HeadHealth <= 0) return;
|
||||
// Additional weakpoint damage to burning zeds from non-flame weapons
|
||||
if (bOnFire && damageType.default.heatPart < 0.75) {
|
||||
damage += 100;
|
||||
}
|
||||
HeadHealth -= damage;
|
||||
if(nicePlayer != none && IsFinisher(damage, damageType, nicePlayer, true))
|
||||
HeadHealth -= damage;
|
||||
@ -1199,6 +1211,9 @@ function EPainReaction GetRightPainReaction(int painDamage,
|
||||
local int stunScore, flinchScore;
|
||||
local bool bStunPass, bFlinchPass, bMiniFlinshPass;
|
||||
local class<NiceVeterancyTypes> niceVet;
|
||||
if (bOnFire) {
|
||||
return PREACTION_NONE;
|
||||
}
|
||||
if(KFPRI != none)
|
||||
niceVet = class<NiceVeterancyTypes>(KFPRI.ClientVeteranSkill);
|
||||
stunScore = painDamage;
|
||||
@ -1649,8 +1664,8 @@ function TakeDamageClient( int damage,
|
||||
ExtractElementalDamage(regDamage, heatDamage, damage,
|
||||
instigatedBy, hitLocation, momentum,
|
||||
damageType, KFPRI, headshotLevel, lockonTime);
|
||||
FireDamageEffects( HeatDamage, instigatedBy, hitLocation, momentum,
|
||||
damageType, headshotLevel, KFPRI);
|
||||
FireDamageEffects(HeatDamage, instigatedBy, hitLocation,
|
||||
momentum, damageType, headshotLevel, KFPRI);
|
||||
FrostEffects( instigatedBy, hitLocation, momentum,
|
||||
damageType, headshotLevel, KFPRI);
|
||||
// Handle body parts damage components
|
||||
@ -1660,9 +1675,9 @@ function TakeDamageClient( int damage,
|
||||
headshotLevel, lockonTime);
|
||||
DoRightPainReaction( painDamage, instigatedBy, hitLocation, momentum,
|
||||
damageType, headshotLevel, KFPRI);
|
||||
DealPartsDamage( bodyDamage, headDamage, instigatedBy,
|
||||
hitLocation, momentum, damageType, KFPRI,
|
||||
headshotLevel, lockonTime);
|
||||
DealPartsDamage( bodyDamage, headDamage,
|
||||
instigatedBy, hitLocation, momentum, damageType,
|
||||
KFPRI, headshotLevel, lockonTime);
|
||||
AddKillAssistant(instigatedBy, bodyDamage);
|
||||
// Rewrite values of last deal damage, instigator, etc.
|
||||
UpdateLastDamageVars( instigatedBy, bodyDamage, damageType,
|
||||
@ -1738,15 +1753,12 @@ function TakeDamage(int damage,
|
||||
}
|
||||
}
|
||||
function TakeFireDamage(int damage, Pawn instigator){
|
||||
local bool bLowFuel, bHighHeat;
|
||||
local Vector DummyHitLoc, DummyMomentum;
|
||||
super(Skaarj).TakeDamage( damage, instigator, dummyHitLoc,
|
||||
dummyMomentum, fireDamageClass);
|
||||
lastBurnDamage = damage;
|
||||
// Melt em' :)
|
||||
bHighHeat = heat > default.health / 20;
|
||||
bLowFuel = FlameFuel < 0.75 * InitFlameFuel;
|
||||
if(FlameFuel <= 0 || bHighHeat && bLowFuel)
|
||||
if(FlameFuel <= 0)
|
||||
ZombieCrispUp();
|
||||
}
|
||||
function TakeFrostDamage(int damage, Pawn instigator){
|
||||
@ -1769,34 +1781,43 @@ simulated function ZombieCrispUp(){
|
||||
Skins[3]=Combiner'PatchTex.Common.BurnSkinEmbers_cmb';
|
||||
}
|
||||
simulated function HeatTick(){
|
||||
local float iceDamage;
|
||||
local float iceDamage, heatDamage;
|
||||
|
||||
// Update heat value
|
||||
if(!bOnFire || flameFuel <= 0)
|
||||
heat *= heatDissipationRate;
|
||||
else{
|
||||
if(flameFuel < heat)
|
||||
heat = flameFuel * 1.1 + (heat - flameFuel) * heatDissipationRate;
|
||||
else
|
||||
else {
|
||||
if(flameFuel < heat) {
|
||||
heat = flameFuel * 1.1 + (heat - flameFuel) * heatDissipationRate;
|
||||
} else {
|
||||
heat = heat * 1.1;
|
||||
if(bFrugalFuelUsage)
|
||||
flameFuel -= heat;
|
||||
else
|
||||
flameFuel -= FMax(heat, InitFlameFuel / 15);
|
||||
}
|
||||
if (flameFuel >= 0) {
|
||||
// Burning always deals at least 5% damage (of the total fuel),
|
||||
// up to additional 5%, depending on the heat levels.
|
||||
heatDamage = 5 + 5 * FMin(heat, flameFuel) / initFlameFuel; // calc %
|
||||
heatDamage = FMin(flameFuel, healthMax * heatDamage / 100.0);
|
||||
flameFuel -= heatDamage;
|
||||
} else {
|
||||
// 5 damage for burning without fuel
|
||||
heatDamage = 5.0;
|
||||
}
|
||||
}
|
||||
CapHeat();
|
||||
if(Abs(heat) < 1)
|
||||
heat = 0.0;
|
||||
// Update on-fire status
|
||||
if(bOnFire){
|
||||
if(heat > 0)
|
||||
TakeFireDamage(heat + rand(5), burnInstigator);
|
||||
else{
|
||||
bBurnified = false;
|
||||
UnSetBurningBehavior();
|
||||
RemoveFlamingEffects();
|
||||
StopBurnFX();
|
||||
bOnFire = false;
|
||||
}
|
||||
if(heat > 0) {
|
||||
TakeFireDamage(heatDamage, burnInstigator);
|
||||
}
|
||||
else {
|
||||
bBurnified = false;
|
||||
UnSetBurningBehavior();
|
||||
RemoveFlamingEffects();
|
||||
StopBurnFX();
|
||||
bOnFire = false;
|
||||
}
|
||||
}
|
||||
// Update frozen status (always deal frost damage)
|
||||
iceCrustStrenght = FMax(iceCrustStrenght, heat);
|
||||
@ -1815,9 +1836,9 @@ simulated function HeatTick(){
|
||||
}
|
||||
simulated function SetBurningBehavior(){
|
||||
bBurningBehavior = true;
|
||||
if(default.Health >= 1000) return;
|
||||
if(Role == Role_Authority)
|
||||
Intelligence = BRAINS_Retarded;
|
||||
if(default.Health >= 1000) {
|
||||
return;
|
||||
}
|
||||
MovementAnims[0] = BurningWalkFAnims[Rand(3)];
|
||||
WalkAnims[0] = BurningWalkFAnims[Rand(3)];
|
||||
MovementAnims[1] = BurningWalkAnims[0];
|
||||
@ -1863,6 +1884,17 @@ simulated function UpdateGroundSpeed() {
|
||||
if (bDecapitated) {
|
||||
groundSpeed *= 0.8;
|
||||
}
|
||||
if (bCrispified) {
|
||||
groundSpeed *= 1.25;
|
||||
}
|
||||
}
|
||||
simulated function ModDamageFromZed(
|
||||
out int damage,
|
||||
class<DamageType> damageType
|
||||
) {
|
||||
if (bCrispified) {
|
||||
damage *= 2;
|
||||
}
|
||||
}
|
||||
// If this function returns `true`, then we shouldn't touch speed further,
|
||||
// because a speed hack was used for the zed
|
||||
@ -2093,8 +2125,8 @@ function float HeatIncScale(){
|
||||
return 100.0 / default.health;
|
||||
}
|
||||
function CapHeat(){
|
||||
heat = FMin(heat, 135 + rand(10) - 5);
|
||||
heat = FMax(heat, -150 + rand(10) - 5);
|
||||
heat = FMin(heat, MAX_HEAT);
|
||||
heat = FMax(heat, MIN_HEAT);
|
||||
}
|
||||
function bool TryMeleeReachTarget(out Vector hitLocation){
|
||||
local Actor hitActor;
|
||||
@ -2135,6 +2167,7 @@ function bool MeleeDamageTarget(int hitDamage, Vector pushDir){
|
||||
local KFHumanPawn kfHumanPawn;
|
||||
if(Level.netMode == NM_Client) return false;
|
||||
if(controller == none || controller.target == none) return false;
|
||||
ModDamageFromZed(hitDamage, niceZombieDamType);
|
||||
// Melee for doors
|
||||
kfHumanPawn = KFHumanPawn(controller.target);
|
||||
bTargetIsDoor = controller.target.IsA('KFDoorMover');
|
||||
@ -2291,7 +2324,6 @@ defaultproperties
|
||||
fuelRatio=0.750000
|
||||
heatDissipationRate=0.666000
|
||||
heatTicksPerSecond=3.000000
|
||||
bFrugalFuelUsage=True
|
||||
clientHeadshotScale=1.000000
|
||||
FrozenMaterial=Texture'HTec_A.Overlay.IceOverlay'
|
||||
ShatteredIce=class'NiceIceChunkEmitter'
|
||||
@ -2304,6 +2336,8 @@ defaultproperties
|
||||
stoppingRecoveryRate=0.025
|
||||
maxStoppingEffect=0.25
|
||||
minStoppingThreshold=0.0
|
||||
MIN_HEAT = -150.0
|
||||
MAX_HEAT = 135.0
|
||||
Begin Object Class=KarmaParamsSkel Name=KarmaParamsSkelN
|
||||
KConvulseSpacing=(Max=2.200000)
|
||||
KLinearDamping=0.150000
|
||||
|
Loading…
Reference in New Issue
Block a user