1
0

Merge branch 'master' into preview

This commit is contained in:
GenZmeY 2022-11-28 00:40:54 +03:00
commit ecab3a97a7
15 changed files with 145 additions and 80 deletions

View File

@ -23,7 +23,7 @@ defaultproperties
DoT_Type=DOT_Bleeding
DoT_Duration=3.0
DoT_Interval=0.5
DoT_DamageScale=1.0
DoT_DamageScale=0.5
BleedPower = 20
PoisonPower = 25
@ -32,5 +32,5 @@ defaultproperties
WeaponDef=class'KFWeapDef_HRG_Locust'
SpreadOnTouchDamage=40
SpreadOnTouchDamage=30
}

View File

@ -38,7 +38,6 @@ var localized string ViewAccelerationString;
var KFGFxOptionsMenu_Controls ControlsMenu;
function Initialize( KFGFxObject_Menu NewParentMenu )
{
super.Initialize( NewParentMenu );
@ -178,14 +177,11 @@ function ResetInputOptions()
KFPI.MouseLookUpScale = ControlsMenu.Manager.CachedProfile.GetDefaultFloat(KFID_MouseLookUpScale);
ControlsMenu.Manager.CachedProfile.SetProfileSettingValueFloat(KFID_MouseLookUpScale, KFPI.MouseLookUpScale);
KFPI.LookUpScale = KFPI.MouseLookUpScale;
class'PlayerInput'.default.LookUpScale = KFPI.MouseLookUpScale;
KFPI.MouseLookRightScale = ControlsMenu.Manager.CachedProfile.GetDefaultFloat(KFID_MouseLookRightScale);
ControlsMenu.Manager.CachedProfile.SetProfileSettingValueFloat(KFID_MouseLookRightScale, KFPI.MouseLookRightScale);
KFPI.LookRightScale = KFPI.MouseLookRightScale;
class'PlayerInput'.default.LookRightScale = KFPI.MouseLookRightScale;
class'PlayerInput'.static.StaticSaveConfig();
KFPI.ResetLookScales();
KFPI.bViewSmoothingEnabled = ControlsMenu.Manager.CachedProfile.GetDefaultBool(KFID_ViewSmoothingEnabled);
ControlsMenu.Manager.CachedProfile.SetProfileSettingValueBool(KFID_ViewSmoothingEnabled, KFPI.bViewSmoothingEnabled);
@ -227,4 +223,3 @@ function ResetInputOptions()
InitializeOptions();
}

View File

@ -342,11 +342,9 @@ function Callback_MouseLookUpScale(float NewValue)
KFPI = KFPlayerInput(GetPC().PlayerInput);
KFPI.MouseLookUpScale = NewValue;
KFPI.LookUpScale = NewValue;
class'PlayerInput'.default.LookUpScale = KFPI.MouseLookUpScale;
class'PlayerInput'.static.StaticSaveConfig();
KFPI.SaveConfig();
Manager.CachedProfile.SetProfileSettingValueFloat(KFID_MouseLookUpScale, NewValue);
//Manager.CachedProfile.SetProfileSettingValueFloat(KFID_MouseLookUpScale, NewValue);
}
function Callback_MouseLookRightScale(float NewValue)
@ -355,12 +353,9 @@ function Callback_MouseLookRightScale(float NewValue)
KFPI = KFPlayerInput(GetPC().PlayerInput);
KFPI.MouseLookRightScale = NewValue;
KFPI.LookRightScale = NewValue;
class'PlayerInput'.default.LookRightScale = KFPI.MouseLookRightScale;
class'PlayerInput'.static.StaticSaveConfig();
Manager.CachedProfile.SetProfileSettingValueFloat(KFID_MouseLookRightScale, NewValue);
KFPI.SaveConfig();
// Manager.CachedProfile.SetProfileSettingValueFloat(KFID_MouseLookRightScale, NewValue);
}
function Callback_ViewSmoothingChanged(bool bActive)

View File

@ -57,6 +57,9 @@ var() float AnimBlendRate;
var transient float LaserSightAimStrength;
var transient float DesiredAimStrength;
// Use for automatic weapons, then the Laser Dot will always steer to the hit location no matter what
var transient bool bForceDotToMatch;
var transient bool IsVisible;
/** Create/Attach lasersight components */
@ -296,6 +299,21 @@ simulated function Update(float DeltaTime, KFWeapon OwningWeapon)
}
}
function bool IsIdleFidgetAnimation(KFWeapon W, name AnimationName)
{
local int i;
for (i = 0; i < W.IdleFidgetAnims.Length; ++i)
{
if (AnimationName == W.IdleFidgetAnims[i])
{
return true;
}
}
return false;
}
/** Determine how much to weigh screen center versus weapon socket */
function UpdateFirstPersonAImStrength(float DeltaTime, KFWeapon W)
{
@ -306,6 +324,14 @@ function UpdateFirstPersonAImStrength(float DeltaTime, KFWeapon W)
{
DesiredAimStrength = 1.f - AnimWeight;
}
// we are forcing the dot to match, don't do while reloading though
else if (bForceDotToMatch
&& (W.IsInstate('Reloading') == false
&& W.IsInState('WeaponSprinting') == false
&& IsIdleFidgetAnimation(W, W.WeaponAnimSeqNode.AnimSeqName) == false))
{
DesiredAimStrength = 1.f - AnimWeight;
}
// follow weapon
else
{
@ -420,4 +446,6 @@ defaultproperties
LaserDotDepthBias=0.95f
IsVisible=true
bForceDotToMatch=false
}

View File

@ -1633,8 +1633,8 @@ function OnReadProfileSettingsComplete(byte LocalUserNum,bool bWasSuccessful)
KFInput.bAllowSwapTo9mm = Profile.GetProfileBool(KFID_AllowSwapTo9mm);
// Console?? PC??
KFInput.MouseLookUpScale = Profile.GetProfileFloat(KFID_MouseLookUpScale);
KFInput.MouseLookRightScale = Profile.GetProfileFloat(KFID_MouseLookRightScale);
//KFInput.MouseLookUpScale = Profile.GetProfileFloat(KFID_MouseLookUpScale);
//KFInput.MouseLookRightScale = Profile.GetProfileFloat(KFID_MouseLookRightScale);
KFInput.bViewSmoothingEnabled = Profile.GetProfileBool(KFID_ViewSmoothingEnabled);
KFInput.bViewAccelerationEnabled = Profile.GetProfileBool(KFID_ViewAccelerationEnabled);

View File

@ -244,8 +244,12 @@ var bool bUsingVersusGamepadScheme;
/*********************************************************************************************
* @name QoL: Mouse input options
********************************************************************************************* */
var float MouseLookUpScale;
var float MouseLookRightScale;
var config float MouseLookUpScale;
var config float MouseLookRightScale;
var config bool bUseDefaultLookScales;
var const float DefaultLookRightScale;
var const float DefaultLookUpScale;
cpptext
{
@ -341,6 +345,17 @@ function ClientInitInputSystem()
}
}
simulated function ResetLookScales()
{
LookRightScale = DefaultLookRightScale;
LookUpScale = DefaultLookUpScale;
SaveConfig();
class'PlayerInput'.default.LookRightScale = DefaultLookRightScale;
class'PlayerInput'.default.LookUpScale = DefaultLookUpScale;
class'PlayerInput'.static.StaticSaveConfig();
}
function UpdatePushToTalk(bool bValue)
{
if(bValue != bRequiresPushToTalk)
@ -411,9 +426,16 @@ function EDoubleClickDir CheckForDoubleClickMove(float DeltaTime)
event PlayerInput( float DeltaTime )
{
local float FOVScale, TimeScale;
local float MouseYScale, MouseXScale;
local vector RawJoyVector;
/** For checking if init values needs to be reset */
if (bUseDefaultLookScales)
{
bUseDefaultLookScales = false;
ResetLookScales();
}
/** */
// Save Raw values
RawJoyUp = aBaseY;
RawJoyRight = aStrafe;
@ -444,12 +466,8 @@ event PlayerInput( float DeltaTime )
aBaseY *= TimeScale * MoveForwardSpeed;
aStrafe *= TimeScale * MoveStrafeSpeed;
aUp *= TimeScale * MoveStrafeSpeed;
if (class'WorldInfo'.static.IsConsoleBuild() || bUsingGamepad)
{
aTurn *= TimeScale * LookRightScale;
aLookUp *= TimeScale * LookUpScale;
}
aTurn *= TimeScale * LookRightScale;
aLookUp *= TimeScale * LookUpScale;
PostProcessInput( DeltaTime );
@ -473,16 +491,14 @@ event PlayerInput( float DeltaTime )
aLookUp *= FOVScale;
aTurn *= FOVScale;
MouseXScale = (TimeScale * -MouseLookUpScale / 100.0f);
// Turning and strafing share the same axis.
if( bStrafe > 0 )
aStrafe += aBaseX + aMouseX * ( MouseXScale > 0.0f ? MouseXScale : 1.0f);
aStrafe += aBaseX + aMouseX;
else
aTurn += aBaseX + aMouseX * ( MouseXScale > 0.0f ? MouseXScale : 1.0f);
aTurn += aBaseX + aMouseX;
// Look up/down.
MouseYScale = (TimeScale * -MouseLookUpScale / 100.0f);
aLookup += aMouseY * ( MouseYScale > 0.0f ? MouseYScale : 1.0f);
aLookup += aMouseY;
if ( (!bUsingGamepad && bInvertMouse) || (bInvertController && bUsingGamepad) )
{
aLookup *= -1.f;
@ -587,6 +603,8 @@ function AdjustMouseSensitivity(float FOVScale)
}
Super.AdjustMouseSensitivity(FOVScale);
aMouseX *= MouseLookRightScale / 100.0f;
aMouseY *= MouseLookUpScale / -100.0f;
}
@ -3002,5 +3020,8 @@ defaultproperties
ForceLookAtPawnRotationRate=22
ForceLookAtPawnDampenedRotationRate=8
WeakBoneDistance = 0.02; //0.01;
WeakBoneDistance = 0.02 //0.01;
DefaultLookRightScale=300
DefaultLookUpScale=-250
}

View File

@ -14,7 +14,7 @@ DefaultProperties
BuyPrice=1400
AmmoPricePerMag=25
ImagePath="WEP_UI_Quad_Barrel_TEX.UI_WeaponSelect_QuadBarrel"
ImagePath="WEP_UI_HRG_MegaDragonsbreath_TEX.UI_WeaponSelect_HRG_MegaDragonsbreath"
EffectiveRange=25

View File

@ -23,7 +23,7 @@ static function ApplySecondaryDamage(KFPawn Victim, int DamageTaken, optional Co
if (default.DoTDamageType.default.DoT_Type != DOT_None)
{
Victim.ApplyDamageOverTime(class'KFDT_Toxic_HRG_Locust'.default.SpreadOnTouchDamage, InstigatedBy, default.DoTDamageType);
Victim.ApplyDamageOverTime(DamageTaken, InstigatedBy, default.DoTDamageType);
}
}

View File

@ -0,0 +1,23 @@
//=============================================================================
// KFDT_Piercing_ScytheStabFolded
//=============================================================================
// Killing Floor 2
// Copyright (C) 2022 Tripwire Interactive LLC
//=============================================================================
class KFDT_Piercing_ScytheStabFolded extends KFDT_Piercing
abstract
hidedropdown;
defaultproperties
{
KDamageImpulse=200
KDeathUpKick=250
StumblePower=50
MeleeHitPower=100
WeaponDef=class'KFWeapDef_Scythe'
ModifierPerkList(0)=class'KFPerk_Berserker'
}

View File

@ -9,25 +9,6 @@
class KFExplosion_HRG_Locust extends KFExplosionActorLingering;
var private bool bFirstExplosion;
protected simulated function bool DoExplosionDamage(bool bCauseDamage, bool bCauseEffects)
{
local bool bReturnValue;
// Only does explosion damage one time
if (bCauseDamage && bFirstExplosion == false)
{
bCauseDamage = false;
}
bReturnValue = super.DoExplosionDamage(bCauseDamage, bCauseEffects);
bFirstExplosion = false;
return bReturnValue;
}
DefaultProperties
{
Interval=0.5f
@ -36,8 +17,6 @@ DefaultProperties
bOnlyDamagePawns=true
bDoFullDamage=false
bFirstExplosion=true
LoopStartEvent=AkEvent'WW_WEP_HRG_Locust.Play_WEP_HRG_Locust_Insects'
LoopStopEvent=AkEvent'WW_WEP_HRG_Locust.Stop_WEP_HRG_Locust_Insect'
}

View File

@ -135,8 +135,8 @@ defaultproperties
// explosion
Begin Object Class=KFGameExplosion Name=ExploTemplate0
Damage=80
DamageRadius=300
Damage=60
DamageRadius=200
DamageFalloffExponent=0.5f
DamageDelay=0.f

View File

@ -886,8 +886,8 @@ defaultproperties
// Camera Shake
CamShake=CameraShake'WEP_Mine_Reconstructor_Arch.Camera_Shake'
CamShakeInnerRadius=200
CamShakeOuterRadius=400
CamShakeInnerRadius=0
CamShakeOuterRadius=0
CamShakeFalloff=1.f
bOrientCameraShakeTowardsEpicenter=true
End Object

View File

@ -29,6 +29,21 @@ simulated function ZoomOut( bool bAnimateTransition, float ZoomTimeToGo )
}
}
simulated function AttachLaserSight()
{
if( WorldInfo.NetMode == NM_DedicatedServer )
{
return;
}
super.AttachLaserSight();
if (LaserSight != none)
{
LaserSight.bForceDotToMatch = true;
}
}
defaultproperties
{
bHasFireLastAnims=true
@ -70,10 +85,10 @@ defaultproperties
bReloadFromMagazine=true
// Recoil
maxRecoilPitch=90
minRecoilPitch=80
maxRecoilYaw=80
minRecoilYaw=-80
maxRecoilPitch=50
minRecoilPitch=40
maxRecoilYaw=70
minRecoilYaw=-70
RecoilRate=0.085
RecoilMaxYawLimit=500
RecoilMinYawLimit=65035
@ -83,7 +98,7 @@ defaultproperties
RecoilISMinYawLimit=65460
RecoilISMaxPitchLimit=350
RecoilISMinPitchLimit=65460
IronSightMeshFOVCompensationScale=4.0
IronSightMeshFOVCompensationScale=6.0
// Old Recoil Data
// maxRecoilPitch=80

View File

@ -157,6 +157,10 @@ simulated function ChangeMode(bool IsFolded, bool bApplyBlend = true)
InstantHitDamageTypes[HEAVY_ATK_FIREMODE] = FoldedDTAlt;
PlayerViewOffset = OriginalPlayerViewOffset;
InstantHitDamageTypes[BASH_FIREMODE]=class'KFDT_Piercing_ScytheStabFolded';
InstantHitMomentum[BASH_FIREMODE]=100000.f;
InstantHitDamage[BASH_FIREMODE]=40;
}
else
{
@ -170,6 +174,10 @@ simulated function ChangeMode(bool IsFolded, bool bApplyBlend = true)
InstantHitDamageTypes[HEAVY_ATK_FIREMODE] = UnfoldedDTAlt;
PlayerViewOffset = PlayerViewOffsetUnfolded;
InstantHitDamageTypes[BASH_FIREMODE]=class'KFDT_Piercing_ScytheStab';
InstantHitMomentum[BASH_FIREMODE]=100000.f;
InstantHitDamage[BASH_FIREMODE]=60;
}
NotifyServerMode(bIsFolded);
@ -325,8 +333,8 @@ defaultproperties
// Short Range Mode Params
MaxHitRangeFolded=220
FoldedDamage = 60
FoldedDamageAlt = 87
FoldedDamage = 70
FoldedDamageAlt = 120
FoldedDT=class'KFDT_Slashing_ScytheShort'
FoldedDTAlt=class'KFDT_Slashing_ScytheShortAlt'
HitboxChainFolded = {(
@ -344,8 +352,8 @@ defaultproperties
// Long Range Mode Params
MaxHitRangeUnfolded=300
UnfoldedDamage=90
UnfoldedDamageAlt=150
UnfoldedDamage=140
UnfoldedDamageAlt=190
UnfoldedDT=class'KFDT_Slashing_ScytheLong'
UnfoldedDTAlt=class'KFDT_Slashing_ScytheLongAlt'
HitboxChainUnfolded = {(
@ -383,9 +391,10 @@ defaultproperties
FiringStatesArray(HEAVY_ATK_FIREMODE)=MeleeHeavyAttacking
InstantHitMomentum(HEAVY_ATK_FIREMODE)=30000.f
InstantHitDamageTypes(BASH_FIREMODE)=class'KFDT_Piercing_ScytheStab'
InstantHitMomentum(BASH_FIREMODE)=100000.f
InstantHitDamage(BASH_FIREMODE)=50
// Defined in ChangeMode function
//InstantHitDamageTypes(BASH_FIREMODE)=class'KFDT_Piercing_ScytheStab'
//InstantHitMomentum(BASH_FIREMODE)=100000.f
//InstantHitDamage(BASH_FIREMODE)=50
// Inventory
GroupPriority=50

View File

@ -156,7 +156,7 @@ defaultproperties
// Inventory
InventorySize=7
GroupPriority=110
WeaponSelectTexture=Texture2D'WEP_UI_Quad_Barrel_TEX.UI_WeaponSelect_QuadBarrel'
WeaponSelectTexture=Texture2D'WEP_UI_HRG_MegaDragonsbreath_TEX.UI_WeaponSelect_HRG_MegaDragonsbreath'
// FOV
MeshFOV=60
@ -232,7 +232,7 @@ defaultproperties
// Ammo
MagazineCapacity[0]=4
SpareAmmoCapacity[0]=48 //72
SpareAmmoCapacity[0]=60 //48 //72
InitialSpareMags[0]=3 //8
AmmoPickupScale[0]=2.0 //3.0
bCanBeReloaded=true