1
0

Merge branch 'master' into preview

This commit is contained in:
GenZmeY 2022-05-11 18:11:51 +03:00
commit 47731ae0b8
34 changed files with 319 additions and 98 deletions

View File

@ -59,7 +59,7 @@ function SetFavoriteButtonActive(bool bActive)
function SetDetails(KFOnlineGameSettings ServerResult)
{
local GFxObject TempObj;
local int Ping;
local int Ping, PlayerCount;
local KFOnlineGameSettings TempOnlingGamesSettings;
if(ServerResult != none)
@ -68,7 +68,15 @@ function SetDetails(KFOnlineGameSettings ServerResult)
TempObj = CreateObject("Object");
TempObj.SetString("serverName", TempOnlingGamesSettings.OwningPlayerName);
TempObj.SetFloat("playerCount", (TempOnlingGamesSettings.NumPublicConnections-TempOnlingGamesSettings.NumOpenPublicConnections-TempOnlingGamesSettings.NumSpectators));
PlayerCount = TempOnlingGamesSettings.NumPublicConnections-TempOnlingGamesSettings.NumOpenPublicConnections;
if (PlayerCount < 0)
{
PlayerCount = 0;
}
TempObj.SetFloat("playerCount", PlayerCount);
TempObj.SetFloat("maxPlayerCount", TempOnlingGamesSettings.NumPublicConnections);
TempObj.SetFloat("waveCount", TempOnlingGamesSettings.CurrentWave);

View File

@ -921,7 +921,7 @@ function UpdateListDataProvider()
local GFxObject TempObj;
local KFOnlineGameSearch LatestGameSearch;
local int Ping;
local int Ping, PlayerCount;
local KFOnlineGameSettings TempOnlineGamesSettings;
LatestGameSearch = KFOnlineGameSearch(SearchDataStore.GetActiveGameSearch());
@ -955,7 +955,15 @@ function UpdateListDataProvider()
TempObj = CreateObject("Object");
TempObj.SetString("serverName", TempOnlineGamesSettings.OwningPlayerName);
TempObj.SetFloat("playerCount", (TempOnlineGamesSettings.NumPublicConnections-TempOnlineGamesSettings.NumOpenPublicConnections-TempOnlineGamesSettings.NumSpectators));
PlayerCount = TempOnlineGamesSettings.NumPublicConnections-TempOnlineGamesSettings.NumOpenPublicConnections;
if (PlayerCount < 0)
{
PlayerCount = 0;
}
TempObj.SetFloat("playerCount", PlayerCount);
TempObj.SetFloat("maxPlayerCount", TempOnlineGamesSettings.NumPublicConnections);
TempObj.SetFloat("waveCount", TempOnlineGamesSettings.CurrentWave);
TempObj.SetFloat("maxWaveCount", IsEndlessModeIndex(TempOnlineGamesSettings.Mode) ? INDEX_NONE : TempOnlineGamesSettings.NumWaves);

View File

@ -191,10 +191,10 @@ function FillWhatsNew()
item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Christmas_PremiumTicket", "FeaturedEventItem", "https://store.steampowered.com/buyitem/232090/5588");
WhatsNewItems.AddItem(item);
// Featured Full Gear
item=SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Halloween_FullGearBundle_DoZ", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/9119");
item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Xmas_Holiday_Shopper", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/9262");
WhatsNewItems.AddItem(item);
// Featured Outfit Bundle
item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Xmas_Holiday_Shopper", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/9263");
item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Christmas_Shopping_Uniforms", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/9263");
WhatsNewItems.AddItem(item);
// Featured Weapon Skin Bundle
item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Xmas_Christmas", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/9264");

View File

@ -447,23 +447,21 @@ DefaultProperties
XboxFilterExceptions[0]="Wasteland Bundle" // Wasteland Outfit Bundle
FeaturedItemIDs[0]=7619 //Whatsnew Gold Ticket
FeaturedItemIDs[1]=9119
FeaturedItemIDs[2]=9120
FeaturedItemIDs[3]=9121
FeaturedItemIDs[4]=9122
FeaturedItemIDs[5]=9123
FeaturedItemIDs[6]=9124
FeaturedItemIDs[7]=9125
FeaturedItemIDs[0]=7944 //Whatsnew Gold Ticket
FeaturedItemIDs[1]=9262
FeaturedItemIDs[2]=9263
FeaturedItemIDs[3]=9264
FeaturedItemIDs[4]=9265
FeaturedItemIDs[5]=9266
FeaturedItemIDs[6]=9267
ConsoleFeaturedItemIDs[0]=7783 //Whatsnew Gold Ticket PSN
ConsoleFeaturedItemIDs[1]=9119
ConsoleFeaturedItemIDs[2]=9120
ConsoleFeaturedItemIDs[3]=9121
ConsoleFeaturedItemIDs[4]=9122
ConsoleFeaturedItemIDs[5]=9123
ConsoleFeaturedItemIDs[6]=9124
ConsoleFeaturedItemIDs[7]=9125
ConsoleFeaturedItemIDs[0]=7947 //Whatsnew Gold Ticket PSN
ConsoleFeaturedItemIDs[1]=9262
ConsoleFeaturedItemIDs[2]=9263
ConsoleFeaturedItemIDs[3]=9264
ConsoleFeaturedItemIDs[4]=9265
ConsoleFeaturedItemIDs[5]=9266
ConsoleFeaturedItemIDs[6]=9267
MaxFeaturedItems=5
}

View File

@ -143,12 +143,13 @@ function UpdateEndlessPauseButtonVisibility()
if (GetPC().WorldInfo.NetMode != NM_Standalone && KFGRI.bMatchHasBegun && (MyKFPRI != none && MyKFPRI.bHasSpawnedIn && !KFGRI.bWaveIsActive) && !KFGRI.bMatchIsOver && KFGRI.bEndlessMode)
{
UpdateEndlessPauseButtonText();
if (!MyKFPRI.bVotedToPauseGame)
{
// if (!MyKFPRI.bVotedToPauseGame)
// {
SetBool("endlessPauseButtonVisible", true);
}
// }
}
else
{

View File

@ -2114,7 +2114,7 @@ simulated function HidePauseGameVote()
UnloadCurrentPopup();
}
SkipTraderVotePRI = none;
PauseGameVotePRI = none;
}
function CastYesVotePauseGame()

View File

@ -59,6 +59,7 @@ var bool bAutoswitchWeapon;
var const float StartedWithWeaponPriceModifier; // The selling price reduction for a weapon that we were given at the start of the game
var const float SellPriceModifier; // Multiplied by the original price to get the sell cost
var const float DoshinegunSellModifier;
/** Cost scale for weapons not on the active perk */
var float OffPerkCostScale;
@ -2446,12 +2447,15 @@ simulated function int GetAdjustedSellPriceFor(
local KFWeapon OwnedWeapon;
local TransactionItem TransactionWeapon;
local int OwnedItemIdx, ItemUpgradeLevel;
local float OverridenSellPriceModifier;
if (OwnedItem.WeaponDef == class'KFWeapDef_9mm')
{
return 0;
}
OverridenSellPriceModifier = OwnedItem.WeaponDef == class'KFWeapDef_Doshinegun' ? DoshinegunSellModifier : SellPriceModifier;
GetWeaponFromClass(OwnedWeapon, OwnedItem.ClassName);
if( OwnedWeapon != none && OwnedWeapon.bGivenAtStart )
{
@ -2459,7 +2463,7 @@ simulated function int GetAdjustedSellPriceFor(
}
else
{
AdjustedSellPrice = OwnedItem.WeaponDef.default.BuyPrice * SellPriceModifier;
AdjustedSellPrice = OwnedItem.WeaponDef.default.BuyPrice * OverridenSellPriceModifier;
}
OwnedItemIdx = TraderOwnedItems.Find('DefaultItem', OwnedItem);
@ -2632,4 +2636,5 @@ defaultproperties
SwitchFireModeEvent=AkEvent'WW_UI_PlayerCharacter.Play_WEP_ModeSwitch'
bLogInventory=false
DoshinegunSellModifier=0.167f
}

View File

@ -2461,6 +2461,8 @@ function PostTeleport( Teleporter OutTeleporter )
/** sets whether or not the owner of this pawn can see it */
simulated function SetMeshVisibility(bool bVisible)
{
local bool bIsPlayingEmote;
// Handle the main player mesh
if (Mesh != None)
{
@ -2472,7 +2474,10 @@ simulated function SetMeshVisibility(bool bVisible)
HideHead( !bVisible );
// Handle weapon attachment
SetWeaponAttachmentVisibility(bVisible);
bIsPlayingEmote = KFPlayerController(Controller) != none && KFPlayerController(Controller).PlayerCamera.CameraStyle == 'Emote';
SetWeaponAttachmentVisibility(bVisible && !bIsPlayingEmote);
// Handle any weapons they might have
SetFirstPersonVisibility(!bVisible);

View File

@ -2119,6 +2119,7 @@ client reliable function ClientOverrideHumanDefaults()
{
local KFPlayerController_WeeklySurvival KFPC_WS;
local KFPlayerReplicationInfo KFPRI;
local KFGameReplicationInfo KFGRI;
local KFCharacterInfo_Human KFCIH;
local int CowboyHatIndex;
@ -2128,7 +2129,9 @@ client reliable function ClientOverrideHumanDefaults()
return;
}
if (class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 12)
KFGRI = KFGameReplicationInfo(WorldInfo.GRI);
if (KFGRI != none && KFGRI.CurrentWeeklyIndex == 12)
{
KFPRI = KFPlayerReplicationInfo(KFPC_WS.PlayerReplicationInfo);
if (KFPRI != none)

View File

@ -195,7 +195,7 @@ simulated function bool HasHeavyArmor()
return IsHeavyArmorActive();
}
static simulated private function bool Is9mm( KFWeapon KFW )
static simulated public function bool Is9mm( KFWeapon KFW )
{
return KFW != none && KFW.default.bIsBackupWeapon && !KFW.IsMeleeWeapon();
}
@ -278,7 +278,9 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
if( KFW != none )
{
if( IsBackupActive() && (IsBackupWeapon( KFW ) || IsDual9mm( KFW ) || ClassIsChildOf(DamageType, class'KFDT_Bludgeon')) )
// KFDT_Bludgeon_Doshinegun_Shot is a special case of Bludgeon damage that doesn't apply this mod.
if( IsBackupActive() && (IsBackupWeapon( KFW ) || IsDual9mm( KFW ) ||
((!IsDoshinegun(KFW) && ClassIsChildOf(DamageType, class'KFDT_Bludgeon') ) || (IsDoshinegun(KFW) && DamageType.Name != 'KFDT_Bludgeon_Doshinegun_Shot' ))))
{
`QALog( "Backup Damage" @ KFW @ GetPercentage( InDamage, InDamage * GetSkillValue(PerkSkills[ESWAT_Backup])), bLogPerk );
TempDamage += InDamage * GetSkillValue( PerkSkills[ESWAT_Backup] );

View File

@ -1568,4 +1568,5 @@ defaultproperties
CurrentHeadShotEffectID=-1;
bCarryingCollectible=false;
bVotedToPauseGame=false;
}

View File

@ -125,6 +125,10 @@ function PlayAnimation()
switch (CurrentTheatricType)
{
case THEATRIC_Entrance:
/** Not initialized when playing intro */
KFPOwner.SpecialMoveFlags = PackSMFlags(KFPOwner, THEATRIC_Entrance);
Variant = KFPOwner.SpecialMoveFlags >> 4;
AnimName = KFPOwner.PawnAnimInfo.TheatricBossEntranceAnimInfos[Variant].AnimationName;
CameraAnim = KFPOwner.PawnAnimInfo.TheatricBossEntranceAnimInfos[Variant].CameraAnimation;
CameraAnimOffset = KFPOwner.PawnAnimInfo.TheatricBossEntranceAnimInfos[Variant].CameraAnimOffset;

View File

@ -441,7 +441,7 @@ function ServerStartVoteSkipTrader(PlayerReplicationInfo PRI)
}
// A skip trader vote is not allowed while another vote is active
if(bIsKickVoteInProgress)
if(bIsKickVoteInProgress || bIsPauseGameVoteInProgress)
{
KFPC.ReceiveLocalizedMessage(class'KFLocalMessage', LMT_OtherVoteInProgress);
return;

View File

@ -57,6 +57,9 @@ var float FiringViewRotationSpeed;
/* Pawn movement speed used when the weapon is firing */
var float FiringPawnMovementSpeed;
/** Rotation Speed limit when the weapon is equipped */
var const float EquippedRotationSpeedLimit;
simulated event ReplicatedEvent(name VarName)
{
switch (VarName)
@ -375,9 +378,13 @@ simulated event Tick( float DeltaTime )
{
NewRotationSpeedLimit = WindUpViewRotationSpeed;
}
else
else if (!IsInState('Inactive')) // Weapon hold
{
NewRotationSpeedLimit = 2000.0f;
NewRotationSpeedLimit = EquippedRotationSpeedLimit;
}
else // Weapon holstered
{
NewRotationSpeedLimit = OwnerController.default.RotationSpeedLimit;
}
if( NewRotationSpeedLimit != OwnerController.RotationSpeedLimit )
@ -624,6 +631,8 @@ defaultproperties
bAlwaysRelevant=True
bOnlyRelevantToOwner=False
EquippedRotationSpeedLimit=2000;
WindUpViewRotationSpeed=2000 // base rotation
WindUpPawnMovementSpeed=1 // base speed

View File

@ -4268,7 +4268,7 @@ simulated protected native function int SendClientProjectileExplosion(vector Exp
// Compress our fragment impact into a ImpactRepInfo for replication (returns number of impacts sent)
simulated protected native function int SendClientFragmentImpact(const out ImpactInfo Impact, class<KFProjectile> FragmentClass);
simulated protected native function vector GetSafeStartTraceLocation();
simulated native function Actor DoTraceNative(out Vector OutLocation, Vector StartLocation, Vector EndLocation);
/**
* Allows subclass to perform extra bullet traces
* Network: Local Player

View File

@ -12,6 +12,6 @@ class KFDT_Bludgeon_FlareGun extends KFDT_Bludgeon_RifleButt
DefaultProperties
{
WeaponDef=class'KFWeapDef_FlareGun'
ModifierPerkList(0)=class'KFPerk_Gunslinger'
ModifierPerkList(1)=class'KFPerk_Sharpshooter'
ModifierPerkList(1)=class'KFPerk_Gunslinger'
ModifierPerkList(2)=class'KFPerk_Sharpshooter'
}

View File

@ -21,5 +21,5 @@ defaultproperties
MeleeHitPower=100
WeaponDef=class'KFWeapDef_G18'
ModifierPerkList(0)=class'KFPerk_Swat'
ModifierPerkList(1)=class'KFPerk_Swat'
}

View File

@ -12,6 +12,6 @@ class KFDT_Bludgeon_HRGWinterbite extends KFDT_Bludgeon_RifleButt
DefaultProperties
{
WeaponDef=class'KFWeapDef_HRGWinterbite'
ModifierPerkList(0)=class'KFPerk_Gunslinger'
ModifierPerkList(1)=class'KFPerk_Sharpshooter'
ModifierPerkList(1)=class'KFPerk_Gunslinger'
ModifierPerkList(2)=class'KFPerk_Sharpshooter'
}

View File

@ -10,7 +10,7 @@ class KFDT_Bludgeon_HRG_SonicGun extends KFDT_Bludgeon_RifleButt
DefaultProperties
{
ModifierPerkList(0)=class'KFPerk_Survivalist'
ModifierPerkList(1)=class'KFPerk_Survivalist'
//defaults
WeaponDef=class'KFWeapDef_HRG_SonicGun'
}

View File

@ -14,6 +14,6 @@ DefaultProperties
StumblePower=200
MeleeHitPower=100
ModifierPerkList(0)=class'KFPerk_FieldMedic'
ModifierPerkList(1)=class'KFPerk_FieldMedic'
WeaponDef=class'KFWeapDef_HRG_Vampire'
}

View File

@ -666,6 +666,17 @@ function SetMonsterDefaults(KFPawn_Monster P)
super.SetMonsterDefaults(P);
}
// Save player's stats on leave
function UnregisterPlayer(PlayerController PC)
{
super.UnregisterPlayer(PC);
if (GetNumPlayers() == 0 && MyKFGRI.bIsEndlessPaused)
{
ResumeEndlessGame();
}
}
defaultproperties
{
bIsEndlessGame = true

View File

@ -656,7 +656,7 @@ defaultproperties
bBossRushMode=true,
OverrideAmmoPickupModifier=1,
WaveAmmoPickupModifiers={(
0.99, 0.99, 0.99, 0.99, 0.99
0.99, 0.99, 0.99, 0.99, 0.99, 0.99
)},
BossRushOverrideParams={(PerWaves={(
// WAVE 1

View File

@ -734,7 +734,7 @@ defaultproperties
IncapSettings(AF_Microwave)=(Vulnerability=(0.08), Cooldown=10.0, Duration=3.0)
IncapSettings(AF_FirePanic)=(Vulnerability=(0.65), Cooldown=15.0, Duration=1.2)
IncapSettings(AF_EMP)= (Vulnerability=(0.5), Cooldown=10.0, Duration=2.2)
IncapSettings(AF_Freeze)= (Vulnerability=(0.5), Cooldown=10.0, Duration=1.0)
IncapSettings(AF_Freeze)= (Vulnerability=(0.3), Cooldown=15.0, Duration=1.0)
IncapSettings(AF_Snare)= (Vulnerability=(1.0, 2.0, 1.0, 1.0, 2.0), Cooldown=10.5, Duration=3.0)
IncapSettings(AF_Bleed)= (Vulnerability=(0.15), Cooldown=10.0)

View File

@ -438,6 +438,13 @@ function ActivateShield()
KFGI.DifficultyInfo.GetAIHealthModifier(self, KFGI.GetModifiedGameDifficulty(), KFGI.GetLivingPlayerCount(), HealthMod, HeadHealthMod);
ShieldHealth = ShieldHealthMaxDefaults[KFGI.GetModifiedGameDifficulty()] * HealthMod * ShieldHealthScale;
if (KFGI.OutbreakEvent != none && KFGi.OutbreakEvent.ActiveEvent.bBossRushMode)
{
ShieldHealth = ShieldHealth * ArmorInfo.ArmorScale;
}
ShieldHealthMax = ShieldHealth;
ShieldHealthPctByte = FloatToByte( fClamp(ShieldHealth / ShieldHealthMax, 0.f, 1.f) );

View File

@ -0,0 +1,48 @@
//=============================================================================
// KFProj_Bullet_Pellet
//=============================================================================
// Shotgun pellet class
//=============================================================================
// Killing Floor 2
// Copyright (C) 2015 Tripwire Interactive LLC
//=============================================================================
class KFProj_Bullet_HRG_Stunner extends KFProj_Bullet
hidedropdown;
/** Cached reference to owner weapon */
var protected KFWeapon OwnerWeapon;
/** Initialize the projectile */
function Init( vector Direction )
{
super.Init( Direction );
OwnerWeapon = KFWeapon( Owner );
if( OwnerWeapon != none )
{
OwnerWeapon.LastPelletFireTime = WorldInfo.TimeSeconds;
}
}
/** Don't allow more than one pellet projectile to perform this check in a single frame */
function bool ShouldWarnAIWhenFired()
{
return super.ShouldWarnAIWhenFired() && OwnerWeapon != none && OwnerWeapon.LastPelletFireTime < WorldInfo.TimeSeconds;
}
defaultproperties
{
MaxSpeed=7000.0
Speed=7000.0
bWarnAIWhenFired=true
DamageRadius=0
ProjFlightTemplate=ParticleSystem'WEP_HRG_Stunner_EMIT.FX_HRG_Stunner_Tracer'
ProjFlightTemplateZedTime=ParticleSystem'WEP_HRG_Stunner_EMIT.FX_HRG_Stunner_Tracer_ZEDTime'
AmbientSoundPlayEvent=none
AmbientSoundStopEvent=none
}

View File

@ -38,6 +38,14 @@ simulated protected function PrepareExplosionTemplate()
ExplosionTemplate.bIgnoreInstigator = true;
}
simulated function AdjustCanDisintigrate() {}
/** Can be overridden in subclasses to exclude specific projectiles from nuking */
simulated function bool AllowNuke()
{
return false;
}
defaultproperties
{
MaxSpeed=22500.0
@ -46,8 +54,8 @@ defaultproperties
DamageRadius=0
ProjDisintegrateTemplate=ParticleSystem'ZED_Siren_EMIT.FX_Siren_grenade_disable_01'
// ProjFlightTemplate=ParticleSystem'WEP_HRG_Boomy_EMIT.FX_Boomy_Tracer_ZEDTime'
ProjFlightTemplateZedTime=ParticleSystem'WEP_HRG_Boomy_EMIT.FX_Boomy_Tracer_ZEDTime'
ProjFlightTemplate=ParticleSystem'WEP_HRG_Stunner_EMIT.FX_HRG_Stunner_ALT_Tracer_ZEDTime'
ProjFlightTemplateZedTime=ParticleSystem'WEP_HRG_Stunner_EMIT.FX_HRG_Stunner_ALT_Tracer_ZEDTime'
// Grenade explosion light
Begin Object Class=PointLightComponent Name=ExplosionPointLight

View File

@ -22,6 +22,7 @@ var() float DampenFactorParallel;
var transient Vector PreviousLocations [`KFPROJ_DOSH_CACHED_LOCATION];
var transient rotator PreviousRotations [`KFPROJ_DOSH_CACHED_LOCATION];
var transient Vector Ceiling;
// Make sure that last location always exists.
simulated event PostBeginPlay()
@ -91,25 +92,43 @@ function SpawnDosh(Actor BouncedOff)
{
local KFDroppedPickup_Cash P;
local int i;
local Vector Pos;
local rotator Rot;
if ( WorldInfo.NetMode == NM_Client )
return;
if (Pawn(BouncedOff) == none)
{
P = Spawn(class'KFDroppedPickup_Cash',,, Location, Rotation,, false);
Pos = Location;
Rot = Rotation;
P = Spawn(class'KFDroppedPickup_Cash',,, Pos, Rot,, false);
if (P == none)
{
for (i = 0; i < `KFPROJ_DOSH_CACHED_LOCATION; ++i)
{
P = Spawn(class'KFDroppedPickup_Cash',,, PreviousLocations[i], PreviousRotations[i],, false);
Pos = PreviousLocations[i];
Rot = PreviousRotations[i];
P = Spawn(class'KFDroppedPickup_Cash',,, Pos, Rot,, false);
if (P != none)
{
break;
}
}
}
// DrawDebugSphere( Pos, 20, 8, 0, 255, 255, true );
if (P != none && RelocateFromCeiling(Pos))
{
P.Destroy();
if(Ceiling.Z > -10000)
{
// DrawDebugSphere( Ceiling, 22, 8, 255, 255, 0, true );
P = Spawn(class'KFDroppedPickup_Cash',,, Ceiling, Rot,, false);
Velocity = vect(0,0,0);
}
}
}
else
{
@ -198,6 +217,36 @@ simulated function SyncOriginalLocation()
Super.SyncOriginalLocation();
}
simulated function bool RelocateFromCeiling(Vector Pos)
{
local Actor HitActorVolume, HitActorWorld, HitActorVolumeBack;
local Vector HitLocationVolume, HitLocationWorld;
local Vector HitNormalUnused;
HitActorWorld = Owner.Trace(HitLocationWorld, HitNormalUnused, Pos - vect(0,0,10000), Pos, false,,,TRACEFLAG_Bullet);
if(HitActorWorld != none)
{
HitActorVolume = KFWeapon(Owner).DoTraceNative(HitLocationVolume, Pos, Pos - vect(0,0,10000));
if (HitActorVolume == none || (HitLocationWorld.Z + 80) > HitLocationVolume.Z || IsZero(HitLocationVolume-Pos))
{
return false;
}
// DrawDebugSphere( HitLocationWorld , 32, 8, 0, 255, 0, true );
// DrawDebugSphere( HitLocationVolume, 30, 8, 255, 0, 0, true );
HitLocationWorld += vect(0,0,1);
HitActorVolumeBack = KFWeapon(Owner).DoTraceNative(HitLocationVolume, HitLocationWorld, HitLocationWorld + vect(0,0,10000));
if (HitActorVolumeBack != none && !IsZero(HitLocationVolume-HitLocationWorld))
{
// DrawDebugSphere( HitLocationVolume, 28, 8, 255, 255, 0, true );
Ceiling = HitLocationVolume - vect(0,0,10);
return true;
}
}
Ceiling = Vect(0,0,-10000);
return true;
}
defaultproperties

View File

@ -77,27 +77,6 @@ simulated event OnGameWon(class<GameInfo> GameClass, int Difficulty, int GameLen
}
}
simulated event OnGameEnd(class<GameInfo> GameClass)
{
local int ObjIdx;
local int TotalDoshEarned;
// Earn 75,000 Dosh through kills, rewards and healing on Carillon Hamlet
ObjIdx = 2;
if (bObjectiveIsValidForMap[ObjIdx] != 0)
{
TotalDoshEarned = Outer.MyKFPC.MatchStats.TotalDoshEarned + Outer.MyKFPC.MatchStats.GetDoshEarnedInWave();
if(TotalDoshEarned > 0)
{
IncrementSeasonalEventStat(ObjIdx, TotalDoshEarned);
if (Outer.GetSeasonalEventStatValue(ObjIdx) >= DoshRequired)
{
FinishedObjective(SEI_Winter, ObjIdx);
}
}
}
}
simulated event OnWeaponPurchased(class<KFWeaponDefinition> WeaponDef, int Price)
{
local int ObjIdx;
@ -117,6 +96,22 @@ simulated event OnWeaponPurchased(class<KFWeaponDefinition> WeaponDef, int Price
simulated event OnWaveCompleted(class<GameInfo> GameClass, int Difficulty, int WaveNum)
{
local int ObjIdx;
local int TotalDoshEarned;
// Earn 75,000 Dosh through kills, rewards and healing on Carillon Hamlet
ObjIdx = 2;
if (bObjectiveIsValidForMap[ObjIdx] != 0)
{
TotalDoshEarned = Outer.MyKFPC.MatchStats.TotalDoshEarned + Outer.MyKFPC.MatchStats.GetDoshEarnedInWave();
if(TotalDoshEarned > 0)
{
IncrementSeasonalEventStat(ObjIdx, TotalDoshEarned);
if (Outer.GetSeasonalEventStatValue(ObjIdx) >= DoshRequired)
{
FinishedObjective(SEI_Winter, ObjIdx);
}
}
}
// Complete wave 15 on Endless Hard or higher difficulty on Carillon
ObjIdx = 4;

View File

@ -12,12 +12,10 @@ var() int WeeklyIndex;
function Activated()
{
local KFGameInfo KFGI;
KFGI = KFGameInfo(GetWorldInfo().Game);
local KFGameReplicationInfo KFGRI;
KFGRI = KFGameReplicationInfo(GetWorldInfo().GRI);
if (KFGI != none)
{
if (KFGI.MyKFGRI != none && KFGI.MyKFGRI.bIsWeeklyMode && class'KFGameEngine'.static.GetWeeklyEventIndexMod() == WeeklyIndex)
if (KFGRI != none && KFGRI.bIsWeeklyMode && KFGRI.CurrentWeeklyIndex == WeeklyIndex)
{
OutputLinks[0].bHasImpulse = true;
}
@ -26,7 +24,6 @@ function Activated()
OutputLinks[1].bHasImpulse = true;
}
}
}
defaultproperties
{

View File

@ -0,0 +1,34 @@
//=============================================================================
// KFWeapAttach_Doshinegun
//=============================================================================
//
//=============================================================================
// Killing Floor 2
// Copyright (C) 2021 Tripwire Interactive LLC
//=============================================================================
class KFWeapAttach_Doshinegun extends KFWeaponAttachment;
/** Play a melee attack animation */
simulated function float PlayMeleeAtkAnim(EWeaponState NewWeaponState, KFPawn P)
{
local name AnimName;
if( P.IsFirstPerson() )
{
return 0.0f;
}
if (NewWeaponState == WEP_MeleeBasic)
{
AnimName = P.bIsCrouched ? CH_MeleeBasic : MeleeBasic;
return PlayCharacterMeshAnim(P, AnimName, true);
}
return super.PlayMeleeAtkAnim(NewWeaponState, P);
}
defaultproperties
{
}

View File

@ -11,6 +11,7 @@ class KFWeap_AssaultRifle_Doshinegun extends KFWeap_RifleBase;
var int DoshCost;
var transient KFPlayerReplicationInfo KFPRI;
var transient bool bIsBeingDropped;
simulated function Activate()
{
@ -18,16 +19,19 @@ simulated function Activate()
super.Activate();
if (KFPRI == none)
{
KFP = KFPawn(Instigator);
if (KFP != none)
{
KFPRI = KFPlayerReplicationInfo(KFP.PlayerReplicationInfo);
}
}
}
simulated function bool HasAnyAmmo()
{
return AmmoCount[0] > 0 || KFPRI.Score >= DoshCost;
return bIsBeingDropped ? AmmoCount[0] > 0 : (AmmoCount[0] > 0 || KFPRI.Score >= DoshCost);
}
/** Returns true if weapon can potentially be reloaded */
@ -105,6 +109,29 @@ simulated state Reloading
}
}
/**
* Drop this item out in to the world
*/
function DropFrom(vector StartLocation, vector StartVelocity)
{
bIsBeingDropped=true;
super.DropFrom(StartLocation, StartVelocity);
}
function SetOriginalValuesFromPickup( KFWeapon PickedUpWeapon )
{
local KFPawn KFP;
bIsBeingDropped=false;
// Reset the replication info
KFP = KFPawn(Instigator);
if (KFP != none)
{
KFPRI = KFPlayerReplicationInfo(KFP.PlayerReplicationInfo);
}
super.SetOriginalValuesFromPickup(PickedUpWeapon);
}
defaultproperties
{
// FOV
@ -126,7 +153,7 @@ defaultproperties
// Zooming/Position
PlayerViewOffset=(X=1.0,Y=8.5,Z=-3)
IronSightPosition=(X=5.0,Y=-0.1,Z=-1.5)
IronSightPosition=(X=5.0,Y=0.05,Z=-1.2)
// Ammo
MagazineCapacity[0]=20
@ -169,7 +196,7 @@ defaultproperties
InstantHitDamageTypes(DEFAULT_FIREMODE)=class'KFDT_Bludgeon_Doshinegun_Shot'
FireInterval(DEFAULT_FIREMODE)=+0.2
Spread(DEFAULT_FIREMODE)=0.015
InstantHitDamage(DEFAULT_FIREMODE)=55.0 //60.0
InstantHitDamage(DEFAULT_FIREMODE)=60.0 //55.0 //60.0
FireOffset=(X=30,Y=4.5,Z=-5)
// ALT_FIREMODE
@ -179,7 +206,7 @@ defaultproperties
WeaponProjectiles(ALTFIRE_FIREMODE)=class'KFProj_Dosh'
InstantHitDamageTypes(ALTFIRE_FIREMODE)=class'KFDT_Bludgeon_Doshinegun_Shot'
FireInterval(ALTFIRE_FIREMODE)=+0.2
InstantHitDamage(ALTFIRE_FIREMODE)=55.0 //60.0
InstantHitDamage(ALTFIRE_FIREMODE)=60.0 //55.0 //60.0
Spread(ALTFIRE_FIREMODE)=0.015
// BASH_FIREMODE
@ -208,13 +235,14 @@ defaultproperties
//WeaponUpgrades[2]=(IncrementDamage=1.65f,IncrementWeight=2)
//WeaponUpgrades[3]=(IncrementDamage=1.85f,IncrementWeight=3)
WeaponUpgrades[1]=(Stats=((Stat=EWUS_Damage0, Scale=1.2f), (Stat=EWUS_Damage1, Scale=1.15f), (Stat=EWUS_Weight, Add=1)))
WeaponUpgrades[2]=(Stats=((Stat=EWUS_Damage0, Scale=1.4f), (Stat=EWUS_Damage1, Scale=1.3f), (Stat=EWUS_Weight, Add=2)))
WeaponUpgrades[3]=(Stats=((Stat=EWUS_Damage0, Scale=1.6f), (Stat=EWUS_Damage1, Scale=1.45f), (Stat=EWUS_Weight, Add=3)))
WeaponUpgrades[1]=(Stats=((Stat=EWUS_Damage0, Scale=1.23f), (Stat=EWUS_Damage1, Scale=1.23f), (Stat=EWUS_Weight, Add=1)))
WeaponUpgrades[2]=(Stats=((Stat=EWUS_Damage0, Scale=1.47f), (Stat=EWUS_Damage1, Scale=1.47f), (Stat=EWUS_Weight, Add=2)))
WeaponUpgrades[3]=(Stats=((Stat=EWUS_Damage0, Scale=1.70f), (Stat=EWUS_Damage1, Scale=1.70f), (Stat=EWUS_Weight, Add=3)))
DoshCost = 25;
DoshCost = 20; //25;
bUsesSecondaryAmmoAltHUD=true
bAllowClientAmmoTracking=false
bIsBeingDropped=false
}

View File

@ -69,7 +69,7 @@ simulated function name GetWeaponFireAnim(byte FireModeNum)
defaultproperties
{
// Inventory
InventorySize=6
InventorySize=7 //6
GroupPriority=100
WeaponSelectTexture=Texture2D'wep_ui_hrg_stunner_tex.UI_Weapon_Select_HRG_Stunner'
@ -103,7 +103,7 @@ defaultproperties
FireModeIconPaths(DEFAULT_FIREMODE)=Texture2D'ui_firemodes_tex.UI_FireModeSelect_ShotgunAuto'
FiringStatesArray(DEFAULT_FIREMODE)=WeaponFiring
WeaponFireTypes(DEFAULT_FIREMODE)=EWFT_Projectile
WeaponProjectiles(DEFAULT_FIREMODE)=class'KFProj_Bullet_Pellet'
WeaponProjectiles(DEFAULT_FIREMODE)=class'KFProj_Bullet_HRG_Stunner'
InstantHitDamage(DEFAULT_FIREMODE)=60.0 //65.0
InstantHitDamageTypes(DEFAULT_FIREMODE)=class'KFDT_Ballistic_HRG_Stunner'
PenetrationPower(DEFAULT_FIREMODE)=2.0

View File

@ -334,7 +334,7 @@ defaultproperties
// Zooming/Position
PlayerViewOffset=(X=3.0,Y=8,Z=-1.8)
//IronSightPosition=(X=0,Y=-0.07,Z=1.03)
IronSightPosition=(X=0,Y=-0.115,Z=1.0425)
IronSightPosition=(X=0,Y=-0.09,Z=1.042)
// AI warning system
bWarnAIWhenAiming=true

View File

@ -136,7 +136,7 @@ defaultproperties
WeaponProjectiles(DEFAULT_FIREMODE)=class'KFProj_Nail_Nailgun'
InstantHitDamage(DEFAULT_FIREMODE)=35
InstantHitDamageTypes(DEFAULT_FIREMODE)=class'KFDT_Ballistic_NailShotgun'
Spread(DEFAULT_FIREMODE)=0.13 //0.16
Spread(DEFAULT_FIREMODE)=0.16
PenetrationPower(DEFAULT_FIREMODE)=3.0
FireInterval(DEFAULT_FIREMODE)=0.3 // 200 RPM
FireOffset=(X=30,Y=5,Z=-4)