style: replace spaces with tabs
This commit is contained in:
parent
226a0f9ffe
commit
63b031b111
@ -131,13 +131,13 @@ function InitializeOwnedItemList()
|
|||||||
local Ext_PerkBase EP;
|
local Ext_PerkBase EP;
|
||||||
|
|
||||||
EP = GetExtPerk();
|
EP = GetExtPerk();
|
||||||
OwnedItemList.length = 0;
|
OwnedItemList.length = 0;
|
||||||
|
|
||||||
TraderItems = KFGameReplicationInfo( WorldInfo.GRI ).TraderItems;
|
TraderItems = KFGameReplicationInfo( WorldInfo.GRI ).TraderItems;
|
||||||
|
|
||||||
KFP = KFPawn_Human( Pawn );
|
KFP = KFPawn_Human( Pawn );
|
||||||
if( KFP != none )
|
if( KFP != none )
|
||||||
{
|
{
|
||||||
// init armor purchase values
|
// init armor purchase values
|
||||||
ArmorItem.SpareAmmoCount = KFP.Armor;
|
ArmorItem.SpareAmmoCount = KFP.Armor;
|
||||||
ArmorItem.MaxSpareAmmo = KFP.GetMaxArmor();
|
ArmorItem.MaxSpareAmmo = KFP.GetMaxArmor();
|
||||||
@ -160,7 +160,7 @@ function InitializeOwnedItemList()
|
|||||||
{
|
{
|
||||||
// Set the weapon information and add it to the OwnedItemList
|
// Set the weapon information and add it to the OwnedItemList
|
||||||
SetWeaponInformation( KFW );
|
SetWeaponInformation( KFW );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(MyGfxManager != none && MyGfxManager.TraderMenu != none)
|
if(MyGfxManager != none && MyGfxManager.TraderMenu != none)
|
||||||
@ -237,7 +237,7 @@ function bool CanCarry(const out STraderItem Item, optional int OverrideLevelVal
|
|||||||
Result = TotalBlocks + MyKFIM.GetDisplayedBlocksRequiredFor(Item);
|
Result = TotalBlocks + MyKFIM.GetDisplayedBlocksRequiredFor(Item);
|
||||||
if (Result > MaxBlocks)
|
if (Result > MaxBlocks)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@ var const array<Emote> Emotes;
|
|||||||
|
|
||||||
static final function name GetUnlockedEmote( int ItemId, ExtPlayerController PC )
|
static final function name GetUnlockedEmote( int ItemId, ExtPlayerController PC )
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
local name Anim;
|
local name Anim;
|
||||||
local ExtPlayerReplicationInfo PRI;
|
local ExtPlayerReplicationInfo PRI;
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ static final function array<Emote> GetEmoteArray()
|
|||||||
|
|
||||||
static final function byte GetEmoteIndex( int ItemId )
|
static final function byte GetEmoteIndex( int ItemId )
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
i = default.Emotes.Find('Id', ItemId);
|
i = default.Emotes.Find('Id', ItemId);
|
||||||
if( i > -1 )
|
if( i > -1 )
|
||||||
return i;
|
return i;
|
||||||
|
@ -14,7 +14,7 @@ function UpdatePerk()
|
|||||||
{
|
{
|
||||||
local int CurrentPerkLevel,CurrentPerkEXP;
|
local int CurrentPerkLevel,CurrentPerkEXP;
|
||||||
local Ext_PerkBase CurrentPerk;
|
local Ext_PerkBase CurrentPerk;
|
||||||
local GFxObject PerkIconObject;
|
local GFxObject PerkIconObject;
|
||||||
|
|
||||||
if( ExPC == none || ExPC.ActivePerkManager==None || ExPC.ActivePerkManager.CurrentPerk==None )
|
if( ExPC == none || ExPC.ActivePerkManager==None || ExPC.ActivePerkManager.CurrentPerk==None )
|
||||||
return;
|
return;
|
||||||
|
@ -8,11 +8,11 @@ function LocalizeText()
|
|||||||
local GFxObject TempObject;
|
local GFxObject TempObject;
|
||||||
TempObject = CreateObject("Object");
|
TempObject = CreateObject("Object");
|
||||||
|
|
||||||
TempObject.SetString("prevPlayer", "FREE CAMERA");
|
TempObject.SetString("prevPlayer", "FREE CAMERA");
|
||||||
TempObject.SetString("nextPlayer", PrevPlayerString);
|
TempObject.SetString("nextPlayer", PrevPlayerString);
|
||||||
TempObject.SetString("changeCamera", ChangeCameraString);
|
TempObject.SetString("changeCamera", ChangeCameraString);
|
||||||
|
|
||||||
SetObject("localizedText", TempObject);
|
SetObject("localizedText", TempObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
function UpdatePlayerInfo( optional bool bForceUpdate )
|
function UpdatePlayerInfo( optional bool bForceUpdate )
|
||||||
|
@ -4,12 +4,12 @@ function TickHud(float DeltaTime)
|
|||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
if(KFGRI == none)
|
if(KFGRI == none)
|
||||||
KFGRI = KFGameReplicationInfo(GetPC().WorldInfo.GRI);
|
KFGRI = KFGameReplicationInfo(GetPC().WorldInfo.GRI);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(KFGRI.bTraderIsOpen)
|
if(KFGRI.bTraderIsOpen)
|
||||||
{
|
{
|
||||||
i = KFGRI.GetTraderTimeRemaining();
|
i = KFGRI.GetTraderTimeRemaining();
|
||||||
if(LastTraderTimeRemaining != i)
|
if(LastTraderTimeRemaining != i)
|
||||||
{
|
{
|
||||||
@ -17,7 +17,7 @@ function TickHud(float DeltaTime)
|
|||||||
LastTraderTimeRemaining = i;
|
LastTraderTimeRemaining = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
i = KFGRI.IsFinalWave() ? INDEX_NONE : Max(KFGRI.AIRemaining,0);
|
i = KFGRI.IsFinalWave() ? INDEX_NONE : Max(KFGRI.AIRemaining,0);
|
||||||
if(LastZEDCount != i)
|
if(LastZEDCount != i)
|
||||||
@ -45,7 +45,7 @@ function TickHud(float DeltaTime)
|
|||||||
}
|
}
|
||||||
SetInt("currentWave",Min(LastWave,LastWaveMax));
|
SetInt("currentWave",Min(LastWave,LastWaveMax));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function UpdateWaveCount();
|
function UpdateWaveCount();
|
||||||
|
@ -4,86 +4,86 @@ var transient array< class<KFWeaponDefinition> > WeaponGroup;
|
|||||||
|
|
||||||
simulated function UpdateWeaponGroupOnHUD( byte GroupIndex )
|
simulated function UpdateWeaponGroupOnHUD( byte GroupIndex )
|
||||||
{
|
{
|
||||||
local Inventory Inv;
|
local Inventory Inv;
|
||||||
local KFWeapon KFW;
|
local KFWeapon KFW;
|
||||||
local byte i;
|
local byte i;
|
||||||
local int Index;
|
local int Index;
|
||||||
local array<KFWeapon> WeaponsList;
|
local array<KFWeapon> WeaponsList;
|
||||||
local KFGFxObject_TraderItems TraderItems;
|
local KFGFxObject_TraderItems TraderItems;
|
||||||
local Pawn P;
|
local Pawn P;
|
||||||
local array< class<KFWeaponDefinition> > WPGroup;
|
local array< class<KFWeaponDefinition> > WPGroup;
|
||||||
|
|
||||||
P = GetPC().Pawn;
|
P = GetPC().Pawn;
|
||||||
if ( P == none || P.InvManager == none )
|
if ( P == none || P.InvManager == none )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for ( Inv = P.InvManager.InventoryChain; Inv != none; Inv = Inv.Inventory )
|
for ( Inv = P.InvManager.InventoryChain; Inv != none; Inv = Inv.Inventory )
|
||||||
{
|
{
|
||||||
KFW = KFWeapon( Inv );
|
KFW = KFWeapon( Inv );
|
||||||
if ( KFW != none && KFW.InventoryGroup == GroupIndex )
|
if ( KFW != none && KFW.InventoryGroup == GroupIndex )
|
||||||
WeaponsList.AddItem(KFW);
|
WeaponsList.AddItem(KFW);
|
||||||
}
|
}
|
||||||
|
|
||||||
WPGroup.Length = WeaponsList.Length;
|
WPGroup.Length = WeaponsList.Length;
|
||||||
TraderItems = KFGameReplicationInfo( P.WorldInfo.GRI ).TraderItems;
|
TraderItems = KFGameReplicationInfo( P.WorldInfo.GRI ).TraderItems;
|
||||||
for ( i = 0; i < WeaponsList.Length; i++ )
|
for ( i = 0; i < WeaponsList.Length; i++ )
|
||||||
{
|
{
|
||||||
Index = TraderItems.SaleItems.Find('ClassName', WeaponsList[i].Class.Name);
|
Index = TraderItems.SaleItems.Find('ClassName', WeaponsList[i].Class.Name);
|
||||||
if( Index != -1 )
|
if( Index != -1 )
|
||||||
WPGroup[i] = TraderItems.SaleItems[Index].WeaponDef;
|
WPGroup[i] = TraderItems.SaleItems[Index].WeaponDef;
|
||||||
}
|
}
|
||||||
|
|
||||||
WeaponGroup = WPGroup;
|
WeaponGroup = WPGroup;
|
||||||
SetWeaponGroupList(WeaponsList, GroupIndex);
|
SetWeaponGroupList(WeaponsList, GroupIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function SetWeaponGroupList(out array<KFWeapon> WeaponList, byte GroupIndex)
|
simulated function SetWeaponGroupList(out array<KFWeapon> WeaponList, byte GroupIndex)
|
||||||
{
|
{
|
||||||
local byte i;
|
local byte i;
|
||||||
local GFxObject DataProvider;
|
local GFxObject DataProvider;
|
||||||
local GFxObject TempObj;
|
local GFxObject TempObj;
|
||||||
local bool bUsesAmmo;
|
local bool bUsesAmmo;
|
||||||
|
|
||||||
DataProvider = CreateArray();
|
DataProvider = CreateArray();
|
||||||
if ( DataProvider == None )
|
if ( DataProvider == None )
|
||||||
return; // gfx has been shut down
|
return; // gfx has been shut down
|
||||||
|
|
||||||
for (i = 0; i < WeaponList.length; i++)
|
for (i = 0; i < WeaponList.length; i++)
|
||||||
{
|
{
|
||||||
TempObj = CreateObject( "Object" );
|
TempObj = CreateObject( "Object" );
|
||||||
|
|
||||||
if( WeaponGroup[i] != None )
|
if( WeaponGroup[i] != None )
|
||||||
{
|
{
|
||||||
TempObj.SetString( "weaponName", WeaponGroup[i].static.GetItemLocalization("ItemName") );
|
TempObj.SetString( "weaponName", WeaponGroup[i].static.GetItemLocalization("ItemName") );
|
||||||
TempObj.SetString( "texturePath", "img://"$WeaponGroup[i].static.GetImagePath() );
|
TempObj.SetString( "texturePath", "img://"$WeaponGroup[i].static.GetImagePath() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TempObj.SetString( "weaponName", WeaponList[i].ItemName );
|
TempObj.SetString( "weaponName", WeaponList[i].ItemName );
|
||||||
TempObj.SetString( "texturePath", "img://"$PathName(WeaponList[i].WeaponSelectTexture));
|
TempObj.SetString( "texturePath", "img://"$PathName(WeaponList[i].WeaponSelectTexture));
|
||||||
}
|
}
|
||||||
|
|
||||||
TempObj.SetInt("weaponTier", WeaponList[i].CurrentWeaponUpgradeIndex);
|
TempObj.SetInt("weaponTier", WeaponList[i].CurrentWeaponUpgradeIndex);
|
||||||
TempObj.SetInt( "ammoCount", WeaponList[i].AmmoCount[0]);
|
TempObj.SetInt( "ammoCount", WeaponList[i].AmmoCount[0]);
|
||||||
TempObj.SetInt( "spareAmmoCount", WeaponList[i].SpareAmmoCount[0]);
|
TempObj.SetInt( "spareAmmoCount", WeaponList[i].SpareAmmoCount[0]);
|
||||||
//secondary ammo shenanigans
|
//secondary ammo shenanigans
|
||||||
TempObj.SetBool("bUsesSecondaryAmmo", WeaponList[i].UsesSecondaryAmmo()&&WeaponList[i].bCanRefillSecondaryAmmo);
|
TempObj.SetBool("bUsesSecondaryAmmo", WeaponList[i].UsesSecondaryAmmo()&&WeaponList[i].bCanRefillSecondaryAmmo);
|
||||||
TempObj.SetBool("bEnabled", WeaponList[i].HasAnyAmmo());
|
TempObj.SetBool("bEnabled", WeaponList[i].HasAnyAmmo());
|
||||||
if(WeaponList[i].UsesSecondaryAmmo() && WeaponList[i].bCanRefillSecondaryAmmo)
|
if(WeaponList[i].UsesSecondaryAmmo() && WeaponList[i].bCanRefillSecondaryAmmo)
|
||||||
{
|
{
|
||||||
TempObj.SetBool("bCanRefillSecondaryAmmo", WeaponList[i].SpareAmmoCapacity[1] > 0);
|
TempObj.SetBool("bCanRefillSecondaryAmmo", WeaponList[i].SpareAmmoCapacity[1] > 0);
|
||||||
TempObj.SetInt( "secondaryAmmoCount", WeaponList[i].AmmoCount[1]);
|
TempObj.SetInt( "secondaryAmmoCount", WeaponList[i].AmmoCount[1]);
|
||||||
TempObj.SetInt( "secondarySpareAmmoCount", WeaponList[i].SpareAmmoCount[1]);
|
TempObj.SetInt( "secondarySpareAmmoCount", WeaponList[i].SpareAmmoCount[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
TempObj.SetBool( "throwable", WeaponList[i].CanThrow());
|
TempObj.SetBool( "throwable", WeaponList[i].CanThrow());
|
||||||
|
|
||||||
bUsesAmmo = (WeaponList[i].static.UsesAmmo());
|
bUsesAmmo = (WeaponList[i].static.UsesAmmo());
|
||||||
TempObj.SetBool( "bUsesAmmo", bUsesAmmo);
|
TempObj.SetBool( "bUsesAmmo", bUsesAmmo);
|
||||||
DataProvider.SetElementObject( i, TempObj );
|
DataProvider.SetElementObject( i, TempObj );
|
||||||
}
|
}
|
||||||
|
|
||||||
SetWeaponList(DataProvider, GroupIndex);
|
SetWeaponList(DataProvider, GroupIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultProperties
|
DefaultProperties
|
||||||
|
@ -115,8 +115,8 @@ event bool HealDamage(int Amount, Controller Healer, class<DamageType> DamageTyp
|
|||||||
local ExtPlayerController InstigatorPC, KFPC;
|
local ExtPlayerController InstigatorPC, KFPC;
|
||||||
local KFPerk InstigatorPerk;
|
local KFPerk InstigatorPerk;
|
||||||
local class<KFDamageType> KFDT;
|
local class<KFDamageType> KFDT;
|
||||||
local int i;
|
local int i;
|
||||||
local bool bRepairedArmor;
|
local bool bRepairedArmor;
|
||||||
local ExtPlayerReplicationInfo EPRI;
|
local ExtPlayerReplicationInfo EPRI;
|
||||||
local Ext_PerkBase InstigatorExtPerk;
|
local Ext_PerkBase InstigatorExtPerk;
|
||||||
|
|
||||||
@ -143,14 +143,14 @@ event bool HealDamage(int Amount, Controller Healer, class<DamageType> DamageTyp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Amount > 0 && IsAliveAndWell() && Health < HealthMax )
|
if( Amount > 0 && IsAliveAndWell() && Health < HealthMax )
|
||||||
{
|
{
|
||||||
// Play any healing effects attached to this damage type
|
// Play any healing effects attached to this damage type
|
||||||
KFDT = class<KFDamageType>(DamageType);
|
KFDT = class<KFDamageType>(DamageType);
|
||||||
if( KFDT != none && KFDT.default.bNoPain )
|
if( KFDT != none && KFDT.default.bNoPain )
|
||||||
PlayHeal( KFDT );
|
PlayHeal( KFDT );
|
||||||
|
|
||||||
if( Role == ROLE_Authority )
|
if( Role == ROLE_Authority )
|
||||||
{
|
{
|
||||||
if( Healer==None || Healer.PlayerReplicationInfo == None )
|
if( Healer==None || Healer.PlayerReplicationInfo == None )
|
||||||
return false;
|
return false;
|
||||||
@ -166,15 +166,15 @@ event bool HealDamage(int Amount, Controller Healer, class<DamageType> DamageTyp
|
|||||||
UsedHealAmount = Min(HealthMax - (Health + HealthToRegen),255-HealthToRegen);
|
UsedHealAmount = Min(HealthMax - (Health + HealthToRegen),255-HealthToRegen);
|
||||||
else UsedHealAmount = Min(UsedHealAmount,255-HealthToRegen);
|
else UsedHealAmount = Min(UsedHealAmount,255-HealthToRegen);
|
||||||
|
|
||||||
HealthToRegen += UsedHealAmount;
|
HealthToRegen += UsedHealAmount;
|
||||||
RepRegenHP = HealthToRegen;
|
RepRegenHP = HealthToRegen;
|
||||||
if( !IsTimerActive('GiveHealthOverTime') )
|
if( !IsTimerActive('GiveHealthOverTime') )
|
||||||
SetTimer(HealthRegenRate, true, 'GiveHealthOverTime');
|
SetTimer(HealthRegenRate, true, 'GiveHealthOverTime');
|
||||||
|
|
||||||
// Give the healer money/XP for helping a teammate
|
// Give the healer money/XP for helping a teammate
|
||||||
if( Healer.Pawn != none && Healer.Pawn != self )
|
if( Healer.Pawn != none && Healer.Pawn != self )
|
||||||
{
|
{
|
||||||
DoshEarned = ( UsedHealAmount / float(HealthMax) ) * HealerRewardScaler;
|
DoshEarned = ( UsedHealAmount / float(HealthMax) ) * HealerRewardScaler;
|
||||||
if( InstigatorPRI!=None )
|
if( InstigatorPRI!=None )
|
||||||
InstigatorPRI.AddDosh(Max(DoshEarned, 0), true);
|
InstigatorPRI.AddDosh(Max(DoshEarned, 0), true);
|
||||||
if( InstigatorPC!=None )
|
if( InstigatorPC!=None )
|
||||||
@ -184,7 +184,7 @@ event bool HealDamage(int Amount, Controller Healer, class<DamageType> DamageTyp
|
|||||||
if( Healer.bIsPlayer )
|
if( Healer.bIsPlayer )
|
||||||
{
|
{
|
||||||
if( Healer != Controller )
|
if( Healer != Controller )
|
||||||
{
|
{
|
||||||
if( InstigatorPC!=None )
|
if( InstigatorPC!=None )
|
||||||
{
|
{
|
||||||
if( !InstigatorPC.bClientHideNumbers )
|
if( !InstigatorPC.bClientHideNumbers )
|
||||||
@ -205,20 +205,20 @@ event bool HealDamage(int Amount, Controller Healer, class<DamageType> DamageTyp
|
|||||||
`DialogManager.PlayHealingDialog( KFPawn(Healer.Pawn), self, float(Health + HealthToRegen) / float(HealthMax) );
|
`DialogManager.PlayHealingDialog( KFPawn(Healer.Pawn), self, float(Health + HealthToRegen) / float(HealthMax) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reduce burn duration and damage in half if you heal while burning
|
// Reduce burn duration and damage in half if you heal while burning
|
||||||
for( i = 0; i < DamageOverTimeArray.Length; ++i )
|
for( i = 0; i < DamageOverTimeArray.Length; ++i )
|
||||||
{
|
{
|
||||||
if( DamageOverTimeArray[i].DoT_Type == DOT_Fire )
|
if( DamageOverTimeArray[i].DoT_Type == DOT_Fire )
|
||||||
{
|
{
|
||||||
DamageOverTimeArray[i].Duration *= 0.5;
|
DamageOverTimeArray[i].Duration *= 0.5;
|
||||||
DamageOverTimeArray[i].Damage *= 0.5;
|
DamageOverTimeArray[i].Damage *= 0.5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return bRepairedArmor;
|
return bRepairedArmor;
|
||||||
}
|
}
|
||||||
@ -679,7 +679,7 @@ simulated function PlayRagdollDeath(class<DamageType> DamageType, vector HitLoc)
|
|||||||
|
|
||||||
// Call CheckHitInfo to give us a valid BoneName
|
// Call CheckHitInfo to give us a valid BoneName
|
||||||
HitDirection = Normal(TearOffMomentum);
|
HitDirection = Normal(TearOffMomentum);
|
||||||
CheckHitInfo(HitInfo, Mesh, HitDirection, HitLoc);
|
CheckHitInfo(HitInfo, Mesh, HitDirection, HitLoc);
|
||||||
|
|
||||||
// Play ragdoll death animation (bSkipReplication=TRUE)
|
// Play ragdoll death animation (bSkipReplication=TRUE)
|
||||||
if( CanDoSpecialMove(SM_DeathAnim) && ClassIsChildOf(DamageType, class'KFDamageType') )
|
if( CanDoSpecialMove(SM_DeathAnim) && ClassIsChildOf(DamageType, class'KFDamageType') )
|
||||||
@ -726,11 +726,11 @@ simulated function OnWakeUpFinished();
|
|||||||
|
|
||||||
function AddDefaultInventory()
|
function AddDefaultInventory()
|
||||||
{
|
{
|
||||||
local KFPerk MyPerk;
|
local KFPerk MyPerk;
|
||||||
|
|
||||||
MyPerk = GetPerk();
|
MyPerk = GetPerk();
|
||||||
if( MyPerk != none )
|
if( MyPerk != none )
|
||||||
MyPerk.AddDefaultInventory(self);
|
MyPerk.AddDefaultInventory(self);
|
||||||
|
|
||||||
Super(KFPawn).AddDefaultInventory();
|
Super(KFPawn).AddDefaultInventory();
|
||||||
}
|
}
|
||||||
@ -757,7 +757,7 @@ simulated function SetCharacterArch(KFCharacterInfoBase Info, optional bool bFor
|
|||||||
{
|
{
|
||||||
local KFPlayerReplicationInfo KFPRI;
|
local KFPlayerReplicationInfo KFPRI;
|
||||||
|
|
||||||
KFPRI = KFPlayerReplicationInfo( PlayerReplicationInfo );
|
KFPRI = KFPlayerReplicationInfo( PlayerReplicationInfo );
|
||||||
if (Info != CharacterArch || bForce)
|
if (Info != CharacterArch || bForce)
|
||||||
{
|
{
|
||||||
// Set Family Info
|
// Set Family Info
|
||||||
@ -1017,7 +1017,7 @@ simulated final function InitFPLegs()
|
|||||||
FPBodyMesh.SetAnimTreeTemplate(CharacterArch.AnimTreeTemplate);
|
FPBodyMesh.SetAnimTreeTemplate(CharacterArch.AnimTreeTemplate);
|
||||||
FPBodyMesh.SetSkeletalMesh(Mesh.SkeletalMesh);
|
FPBodyMesh.SetSkeletalMesh(Mesh.SkeletalMesh);
|
||||||
|
|
||||||
FPBodyMesh.SetActorCollision(false, false);
|
FPBodyMesh.SetActorCollision(false, false);
|
||||||
FPBodyMesh.SetNotifyRigidBodyCollision(false);
|
FPBodyMesh.SetNotifyRigidBodyCollision(false);
|
||||||
FPBodyMesh.SetTraceBlocking(false, false);
|
FPBodyMesh.SetTraceBlocking(false, false);
|
||||||
|
|
||||||
@ -1025,9 +1025,9 @@ simulated final function InitFPLegs()
|
|||||||
FPBodyMesh.SetMaterial(i, Mesh.Materials[i]);
|
FPBodyMesh.SetMaterial(i, Mesh.Materials[i]);
|
||||||
|
|
||||||
FPBodyMesh.HideBoneByName('neck', PBO_None);
|
FPBodyMesh.HideBoneByName('neck', PBO_None);
|
||||||
FPBodyMesh.HideBoneByName('Spine2', PBO_None);
|
FPBodyMesh.HideBoneByName('Spine2', PBO_None);
|
||||||
FPBodyMesh.HideBoneByName('RightShoulder', PBO_None);
|
FPBodyMesh.HideBoneByName('RightShoulder', PBO_None);
|
||||||
FPBodyMesh.HideBoneByName('LeftShoulder', PBO_None);
|
FPBodyMesh.HideBoneByName('LeftShoulder', PBO_None);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ForrestMarkX's third person backpack weapon and first person legs:
|
// ForrestMarkX's third person backpack weapon and first person legs:
|
||||||
@ -1175,16 +1175,16 @@ simulated function SetCharacterAnimationInfo()
|
|||||||
|
|
||||||
simulated function SetMeshLightingChannels(LightingChannelContainer NewLightingChannels)
|
simulated function SetMeshLightingChannels(LightingChannelContainer NewLightingChannels)
|
||||||
{
|
{
|
||||||
Super.SetMeshLightingChannels(NewLightingChannels);
|
Super.SetMeshLightingChannels(NewLightingChannels);
|
||||||
|
|
||||||
if (AttachedBackItem != none)
|
if (AttachedBackItem != none)
|
||||||
AttachedBackItem.SetLightingChannels(NewLightingChannels);
|
AttachedBackItem.SetLightingChannels(NewLightingChannels);
|
||||||
FPBodyMesh.SetLightingChannels(NewLightingChannels);
|
FPBodyMesh.SetLightingChannels(NewLightingChannels);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function PlayWeaponSwitch(Weapon OldWeapon, Weapon NewWeapon)
|
simulated function PlayWeaponSwitch(Weapon OldWeapon, Weapon NewWeapon)
|
||||||
{
|
{
|
||||||
Super.PlayWeaponSwitch(OldWeapon, NewWeapon);
|
Super.PlayWeaponSwitch(OldWeapon, NewWeapon);
|
||||||
|
|
||||||
if( WorldInfo.NetMode!=NM_Client )
|
if( WorldInfo.NetMode!=NM_Client )
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -11,16 +11,16 @@ function TickHud(float DeltaTime)
|
|||||||
|
|
||||||
final function ShowKillMessageX(PlayerReplicationInfo PRI1, PlayerReplicationInfo PRI2, optional string VictimStr, optional bool bDeathMessage = false, optional class<Pawn> PawnOther )
|
final function ShowKillMessageX(PlayerReplicationInfo PRI1, PlayerReplicationInfo PRI2, optional string VictimStr, optional bool bDeathMessage = false, optional class<Pawn> PawnOther )
|
||||||
{
|
{
|
||||||
local GFxObject DataObject;
|
local GFxObject DataObject;
|
||||||
local bool bHumanDeath;
|
local bool bHumanDeath;
|
||||||
local string KilledName, KillerName, KilledIconpath, KillerIconPath;
|
local string KilledName, KillerName, KilledIconpath, KillerIconPath;
|
||||||
local string KillerTextColor, KilledTextColor;
|
local string KillerTextColor, KilledTextColor;
|
||||||
|
|
||||||
if(KFPC == none)
|
if(KFPC == none)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( KFGXHUDManager != none )
|
if( KFGXHUDManager != none )
|
||||||
{
|
{
|
||||||
if(PawnOther != none)
|
if(PawnOther != none)
|
||||||
{
|
{
|
||||||
if( bDeathMessage )
|
if( bDeathMessage )
|
||||||
|
@ -11,7 +11,7 @@ simulated function SetCharacterArch( KFCharacterInfoBase Info, optional bool bFo
|
|||||||
{
|
{
|
||||||
local KFPlayerReplicationInfo KFPRI;
|
local KFPlayerReplicationInfo KFPRI;
|
||||||
|
|
||||||
KFPRI = KFPlayerReplicationInfo( PlayerReplicationInfo );
|
KFPRI = KFPlayerReplicationInfo( PlayerReplicationInfo );
|
||||||
if (Info != CharacterArch || bForce)
|
if (Info != CharacterArch || bForce)
|
||||||
{
|
{
|
||||||
// Set Family Info
|
// Set Family Info
|
||||||
|
@ -2,7 +2,7 @@ class ExtPawn_ZedHans_Pet extends KFPawn_ZedHansFriendlyTest;
|
|||||||
|
|
||||||
static simulated event bool IsABoss()
|
static simulated event bool IsABoss()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
|
@ -540,7 +540,7 @@ simulated function ModifyMeleeAttackSpeed( out float InDuration, KFWeapon KFW )
|
|||||||
}
|
}
|
||||||
simulated function class<KFProj_Grenade> GetGrenadeClass()
|
simulated function class<KFProj_Grenade> GetGrenadeClass()
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.GrenadeClass : GrenadeClass);
|
return (CurrentPerk!=None ? CurrentPerk.GrenadeClass : GrenadeClass);
|
||||||
}
|
}
|
||||||
simulated function ModifyWeldingRate( out float FastenRate, out float UnfastenRate )
|
simulated function ModifyWeldingRate( out float FastenRate, out float UnfastenRate )
|
||||||
{
|
{
|
||||||
|
@ -5,12 +5,12 @@ final function ExUpdatePerkHeader( Ext_PerkBase PerkClass )
|
|||||||
local GFxObject PerkDataProvider;
|
local GFxObject PerkDataProvider;
|
||||||
|
|
||||||
PerkDataProvider = CreateObject( "Object" );
|
PerkDataProvider = CreateObject( "Object" );
|
||||||
PerkDataProvider.SetString( "perkTitle", PerkClass.PerkName );
|
PerkDataProvider.SetString( "perkTitle", PerkClass.PerkName );
|
||||||
PerkDataProvider.SetString( "perkLevel", LevelString@PerkClass.CurrentLevel);
|
PerkDataProvider.SetString( "perkLevel", LevelString@PerkClass.CurrentLevel);
|
||||||
PerkDataProvider.SetString( "iconSource", PerkClass.GetPerkIconPath(PerkClass.CurrentLevel) );
|
PerkDataProvider.SetString( "iconSource", PerkClass.GetPerkIconPath(PerkClass.CurrentLevel) );
|
||||||
PerkDataProvider.SetString( "prestigeLevel", ""); //not used yet so not point to populating with data
|
PerkDataProvider.SetString( "prestigeLevel", ""); //not used yet so not point to populating with data
|
||||||
PerkDataProvider.SetString( "xpString", PerkClass.CurrentEXP$"/"$PerkClass.NextLevelEXP );
|
PerkDataProvider.SetString( "xpString", PerkClass.CurrentEXP$"/"$PerkClass.NextLevelEXP );
|
||||||
PerkDataProvider.SetFloat( "xpPercent", PerkClass.GetProgressPercent() );
|
PerkDataProvider.SetFloat( "xpPercent", PerkClass.GetProgressPercent() );
|
||||||
SetObject( "perkData", PerkDataProvider );
|
SetObject( "perkData", PerkDataProvider );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,19 +17,19 @@ function UpdatePerkSelection(byte SelectedPerkIndex)
|
|||||||
for (i = 0; i < KFPC.ActivePerkManager.UserPerks.Length; i++)
|
for (i = 0; i < KFPC.ActivePerkManager.UserPerks.Length; i++)
|
||||||
{
|
{
|
||||||
PerkClass = KFPC.ActivePerkManager.UserPerks[i];
|
PerkClass = KFPC.ActivePerkManager.UserPerks[i];
|
||||||
TempObj = CreateObject( "Object" );
|
TempObj = CreateObject( "Object" );
|
||||||
TempObj.SetInt( "PerkLevel", PerkClass.CurrentLevel );
|
TempObj.SetInt( "PerkLevel", PerkClass.CurrentLevel );
|
||||||
TempObj.SetString( "Title", PerkClass.PerkName );
|
TempObj.SetString( "Title", PerkClass.PerkName );
|
||||||
TempObj.SetString( "iconSource", PerkClass.GetPerkIconPath(PerkClass.CurrentLevel) );
|
TempObj.SetString( "iconSource", PerkClass.GetPerkIconPath(PerkClass.CurrentLevel) );
|
||||||
TempObj.SetBool("bTierUnlocked", true);
|
TempObj.SetBool("bTierUnlocked", true);
|
||||||
|
|
||||||
DataProvider.SetElementObject( i, TempObj );
|
DataProvider.SetElementObject( i, TempObj );
|
||||||
}
|
}
|
||||||
SetObject( "perkData", DataProvider );
|
SetObject( "perkData", DataProvider );
|
||||||
SetInt("SelectedIndex", SelectedPerkIndex);
|
SetInt("SelectedIndex", SelectedPerkIndex);
|
||||||
|
|
||||||
UpdatePendingPerkInfo(SelectedPerkIndex);
|
UpdatePendingPerkInfo(SelectedPerkIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function UpdatePendingPerkInfo(byte SelectedPerkIndex)
|
function UpdatePendingPerkInfo(byte SelectedPerkIndex)
|
||||||
|
@ -316,13 +316,13 @@ reliable client event TeamMessage( PlayerReplicationInfo PRI, coerce string S, n
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (MyGFxManager != none && MyGFxManager.PartyWidget != none)
|
if (MyGFxManager != none && MyGFxManager.PartyWidget != none)
|
||||||
{
|
{
|
||||||
if( !MyGFxManager.PartyWidget.ReceiveMessage(S) ) //Fails if message is for updating perks in a steam lobby
|
if( !MyGFxManager.PartyWidget.ReceiveMessage(S) ) //Fails if message is for updating perks in a steam lobby
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( MyGFxHUD != none )
|
if( MyGFxHUD != none )
|
||||||
{
|
{
|
||||||
switch( Type )
|
switch( Type )
|
||||||
{
|
{
|
||||||
case 'Log':
|
case 'Log':
|
||||||
@ -340,7 +340,7 @@ reliable client event TeamMessage( PlayerReplicationInfo PRI, coerce string S, n
|
|||||||
case 'TeamSay':
|
case 'TeamSay':
|
||||||
if( ExtPlayerReplicationInfo(PRI)!=None && ExtPlayerReplicationInfo(PRI).ShowAdminName() )
|
if( ExtPlayerReplicationInfo(PRI)!=None && ExtPlayerReplicationInfo(PRI).ShowAdminName() )
|
||||||
MyGFxHUD.HudChatBox.AddChatMessage("("$ExtPlayerReplicationInfo(PRI).GetAdminNameAbr()$")"$S, ExtPlayerReplicationInfo(PRI).GetAdminColor());
|
MyGFxHUD.HudChatBox.AddChatMessage("("$ExtPlayerReplicationInfo(PRI).GetAdminNameAbr()$")"$S, ExtPlayerReplicationInfo(PRI).GetAdminColor());
|
||||||
else MyGFxHUD.HudChatBox.AddChatMessage(S, "64FE2E");
|
else MyGFxHUD.HudChatBox.AddChatMessage(S, "64FE2E");
|
||||||
break;
|
break;
|
||||||
case 'Priority':
|
case 'Priority':
|
||||||
MyGFxHUD.HudChatBox.AddChatMessage(S, class 'KFLocalMessage'.default.PriorityColor);
|
MyGFxHUD.HudChatBox.AddChatMessage(S, class 'KFLocalMessage'.default.PriorityColor);
|
||||||
@ -509,9 +509,9 @@ reliable server function ServerCamera( name NewMode )
|
|||||||
{
|
{
|
||||||
// <- REMOVED CAMERA LOGGING (PlayerController)
|
// <- REMOVED CAMERA LOGGING (PlayerController)
|
||||||
if ( NewMode == '1st' )
|
if ( NewMode == '1st' )
|
||||||
NewMode = 'FirstPerson';
|
NewMode = 'FirstPerson';
|
||||||
else if ( NewMode == '3rd' )
|
else if ( NewMode == '3rd' )
|
||||||
NewMode = 'ThirdPerson';
|
NewMode = 'ThirdPerson';
|
||||||
SetCameraMode( NewMode );
|
SetCameraMode( NewMode );
|
||||||
}
|
}
|
||||||
exec function Camera( name NewMode )
|
exec function Camera( name NewMode )
|
||||||
@ -582,12 +582,12 @@ simulated reliable client event bool ShowConnectionProgressPopup( EProgressMessa
|
|||||||
{
|
{
|
||||||
switch(ProgressType)
|
switch(ProgressType)
|
||||||
{
|
{
|
||||||
case PMT_ConnectionFailure :
|
case PMT_ConnectionFailure :
|
||||||
case PMT_PeerConnectionFailure :
|
case PMT_PeerConnectionFailure :
|
||||||
KFExtendedHUD(myHUD).NotifyLevelChange();
|
KFExtendedHUD(myHUD).NotifyLevelChange();
|
||||||
KFExtendedHUD(myHUD).ShowProgressMsg("Connection Error: "$ProgressTitle$"|"$ProgressDescription$"|Disconnecting...",true);
|
KFExtendedHUD(myHUD).ShowProgressMsg("Connection Error: "$ProgressTitle$"|"$ProgressDescription$"|Disconnecting...",true);
|
||||||
return true;
|
return true;
|
||||||
case PMT_DownloadProgress :
|
case PMT_DownloadProgress :
|
||||||
KFExtendedHUD(myHUD).NotifyLevelChange();
|
KFExtendedHUD(myHUD).NotifyLevelChange();
|
||||||
case PMT_AdminMessage :
|
case PMT_AdminMessage :
|
||||||
KFExtendedHUD(myHUD).ShowProgressMsg(ProgressTitle$"|"$ProgressDescription);
|
KFExtendedHUD(myHUD).ShowProgressMsg(ProgressTitle$"|"$ProgressDescription);
|
||||||
@ -1127,7 +1127,7 @@ state Dead
|
|||||||
KFPawn(ViewTarget).SetMeshVisibility(true);
|
KFPawn(ViewTarget).SetMeshVisibility(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deactivate any post process effects when we die
|
// Deactivate any post process effects when we die
|
||||||
ResetGameplayPostProcessFX();
|
ResetGameplayPostProcessFX();
|
||||||
|
|
||||||
if(CurrentPerk != none)
|
if(CurrentPerk != none)
|
||||||
@ -1169,12 +1169,12 @@ state Dead
|
|||||||
|
|
||||||
exec function RequestSwitchTeam()
|
exec function RequestSwitchTeam()
|
||||||
{
|
{
|
||||||
ConsoleCommand("disconnect");
|
ConsoleCommand("disconnect");
|
||||||
}
|
}
|
||||||
|
|
||||||
exec function SwitchTeam()
|
exec function SwitchTeam()
|
||||||
{
|
{
|
||||||
ConsoleCommand("disconnect");
|
ConsoleCommand("disconnect");
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
|
@ -8,14 +8,14 @@ struct FCustomCharEntry
|
|||||||
};
|
};
|
||||||
struct FMyCustomChar // Now without constant.
|
struct FMyCustomChar // Now without constant.
|
||||||
{
|
{
|
||||||
var int CharacterIndex,HeadMeshIndex,HeadSkinIndex,BodyMeshIndex,BodySkinIndex,AttachmentMeshIndices[`MAX_COSMETIC_ATTACHMENTS],AttachmentSkinIndices[`MAX_COSMETIC_ATTACHMENTS];
|
var int CharacterIndex,HeadMeshIndex,HeadSkinIndex,BodyMeshIndex,BodySkinIndex,AttachmentMeshIndices[`MAX_COSMETIC_ATTACHMENTS],AttachmentSkinIndices[`MAX_COSMETIC_ATTACHMENTS];
|
||||||
|
|
||||||
structdefaultproperties
|
structdefaultproperties
|
||||||
{
|
{
|
||||||
AttachmentMeshIndices[0]=`CLEARED_ATTACHMENT_INDEX
|
AttachmentMeshIndices[0]=`CLEARED_ATTACHMENT_INDEX
|
||||||
AttachmentMeshIndices[1]=`CLEARED_ATTACHMENT_INDEX
|
AttachmentMeshIndices[1]=`CLEARED_ATTACHMENT_INDEX
|
||||||
AttachmentMeshIndices[2]=`CLEARED_ATTACHMENT_INDEX
|
AttachmentMeshIndices[2]=`CLEARED_ATTACHMENT_INDEX
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// For custom trader inventory.
|
// For custom trader inventory.
|
||||||
@ -537,10 +537,10 @@ reliable server final function ServerSetCharacterX( FMyCustomChar NewMeshInfo )
|
|||||||
|
|
||||||
CustomCharacter = NewMeshInfo;
|
CustomCharacter = NewMeshInfo;
|
||||||
|
|
||||||
if ( Role == Role_Authority )
|
if ( Role == Role_Authority )
|
||||||
{
|
{
|
||||||
CharacterCustomizationChanged();
|
CharacterCustomizationChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
simulated final function bool IsClientCharLocked( byte Index )
|
simulated final function bool IsClientCharLocked( byte Index )
|
||||||
{
|
{
|
||||||
|
@ -11,15 +11,15 @@ simulated function PostBeginPlay()
|
|||||||
}
|
}
|
||||||
simulated function ExplodeTimer()
|
simulated function ExplodeTimer()
|
||||||
{
|
{
|
||||||
local Actor HitActor;
|
local Actor HitActor;
|
||||||
local vector HitLocation, HitNormal;
|
local vector HitLocation, HitNormal;
|
||||||
|
|
||||||
if( WorldInfo.NetMode!=NM_Client && InstigatorController==none )
|
if( WorldInfo.NetMode!=NM_Client && InstigatorController==none )
|
||||||
{
|
{
|
||||||
Destroy();
|
Destroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GetExplodeEffectLocation(HitLocation, HitNormal, HitActor);
|
GetExplodeEffectLocation(HitLocation, HitNormal, HitActor);
|
||||||
if( --NumCrackers==0 )
|
if( --NumCrackers==0 )
|
||||||
TriggerExplosion(HitLocation, HitNormal, HitActor);
|
TriggerExplosion(HitLocation, HitNormal, HitActor);
|
||||||
else SmallExplosion(HitLocation, HitNormal, HitActor);
|
else SmallExplosion(HitLocation, HitNormal, HitActor);
|
||||||
|
@ -32,7 +32,7 @@ simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNorma
|
|||||||
{
|
{
|
||||||
// For opposing team, make the grenade explode instantly
|
// For opposing team, make the grenade explode instantly
|
||||||
GetExplodeEffectLocation( HitLocation, HitNormal, Other );
|
GetExplodeEffectLocation( HitLocation, HitNormal, Other );
|
||||||
TriggerExplosion( HitLocation, HitNormal, Other );
|
TriggerExplosion( HitLocation, HitNormal, Other );
|
||||||
}
|
}
|
||||||
else super.ProcessTouch( Other, HitLocation, HitNormal );
|
else super.ProcessTouch( Other, HitLocation, HitNormal );
|
||||||
}
|
}
|
||||||
@ -69,14 +69,14 @@ simulated function TriggerExplosion(Vector HitLocation, Vector HitNormal, Actor
|
|||||||
|
|
||||||
simulated function Destroyed()
|
simulated function Destroyed()
|
||||||
{
|
{
|
||||||
local Actor HitActor;
|
local Actor HitActor;
|
||||||
local vector HitLocation, HitNormal;
|
local vector HitLocation, HitNormal;
|
||||||
|
|
||||||
// Final Failsafe check for explosion effect
|
// Final Failsafe check for explosion effect
|
||||||
if( !bHasExploded && WorldInfo.NetMode==NM_Client )
|
if( !bHasExploded && WorldInfo.NetMode==NM_Client )
|
||||||
{
|
{
|
||||||
GetExplodeEffectLocation(HitLocation, HitNormal, HitActor);
|
GetExplodeEffectLocation(HitLocation, HitNormal, HitActor);
|
||||||
TriggerExplosion(HitLocation, HitNormal, HitActor);
|
TriggerExplosion(HitLocation, HitNormal, HitActor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,14 +36,14 @@ simulated function TriggerExplosion(Vector HitLocation, Vector HitNormal, Actor
|
|||||||
|
|
||||||
simulated function Destroyed()
|
simulated function Destroyed()
|
||||||
{
|
{
|
||||||
local Actor HitActor;
|
local Actor HitActor;
|
||||||
local vector HitLocation, HitNormal;
|
local vector HitLocation, HitNormal;
|
||||||
|
|
||||||
// Final Failsafe check for explosion effect
|
// Final Failsafe check for explosion effect
|
||||||
if( !bHasExploded && WorldInfo.NetMode==NM_Client )
|
if( !bHasExploded && WorldInfo.NetMode==NM_Client )
|
||||||
{
|
{
|
||||||
GetExplodeEffectLocation(HitLocation, HitNormal, HitActor);
|
GetExplodeEffectLocation(HitLocation, HitNormal, HitActor);
|
||||||
TriggerExplosion(HitLocation, HitNormal, HitActor);
|
TriggerExplosion(HitLocation, HitNormal, HitActor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ function SetPerkFilterData(byte FilterIndex)
|
|||||||
|
|
||||||
SetBool("filterVisibliity", true);
|
SetBool("filterVisibliity", true);
|
||||||
|
|
||||||
KFPC = ExtPlayerController( GetPC() );
|
KFPC = ExtPlayerController( GetPC() );
|
||||||
if ( KFPC != none )
|
if ( KFPC != none )
|
||||||
{
|
{
|
||||||
PrM = KFPC.ActivePerkManager;
|
PrM = KFPC.ActivePerkManager;
|
||||||
@ -36,7 +36,7 @@ function SetPerkFilterData(byte FilterIndex)
|
|||||||
{
|
{
|
||||||
FilterObject = CreateObject( "Object" );
|
FilterObject = CreateObject( "Object" );
|
||||||
FilterObject.SetString("source", PrM.UserPerks[i].GetPerkIconPath(PrM.UserPerks[i].CurrentLevel));
|
FilterObject.SetString("source", PrM.UserPerks[i].GetPerkIconPath(PrM.UserPerks[i].CurrentLevel));
|
||||||
DataProvider.SetElementObject( i, FilterObject );
|
DataProvider.SetElementObject( i, FilterObject );
|
||||||
}
|
}
|
||||||
|
|
||||||
FilterObject = CreateObject( "Object" );
|
FilterObject = CreateObject( "Object" );
|
||||||
@ -44,8 +44,8 @@ function SetPerkFilterData(byte FilterIndex)
|
|||||||
DataProvider.SetElementObject( i, FilterObject );
|
DataProvider.SetElementObject( i, FilterObject );
|
||||||
|
|
||||||
SetObject( "filterSource", DataProvider );
|
SetObject( "filterSource", DataProvider );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
|
@ -30,7 +30,7 @@ function SetPerkList()
|
|||||||
KFPC = ExtPlayerController(GetPC());
|
KFPC = ExtPlayerController(GetPC());
|
||||||
if( KFPC != none && KFPC.ActivePerkManager!=None )
|
if( KFPC != none && KFPC.ActivePerkManager!=None )
|
||||||
{
|
{
|
||||||
DataProvider = CreateArray();
|
DataProvider = CreateArray();
|
||||||
|
|
||||||
for (i = 0; i < KFPC.ActivePerkManager.UserPerks.Length; i++)
|
for (i = 0; i < KFPC.ActivePerkManager.UserPerks.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ function RefreshWeaponListByPerk(byte FilterIndex, const out array<STraderItem>
|
|||||||
TargetPerkClass = EKFPC.ActivePerkManager.UserPerks[FilterIndex].BasePerk;
|
TargetPerkClass = EKFPC.ActivePerkManager.UserPerks[FilterIndex].BasePerk;
|
||||||
|
|
||||||
SlotIndex = 0;
|
SlotIndex = 0;
|
||||||
ItemDataArray = CreateArray();
|
ItemDataArray = CreateArray();
|
||||||
|
|
||||||
for (i = 0; i < ItemList.Length; i++)
|
for (i = 0; i < ItemList.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ defaultproperties
|
|||||||
|
|
||||||
simulated static function bool AllowedForAllPerks()
|
simulated static function bool AllowedForAllPerks()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ConsumeAmmo( byte FireModeNum )
|
simulated function ConsumeAmmo( byte FireModeNum )
|
||||||
|
@ -14,7 +14,7 @@ defaultproperties
|
|||||||
|
|
||||||
simulated static function bool AllowedForAllPerks()
|
simulated static function bool AllowedForAllPerks()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ConsumeAmmo( byte FireModeNum )
|
simulated function ConsumeAmmo( byte FireModeNum )
|
||||||
|
@ -21,7 +21,7 @@ defaultproperties
|
|||||||
|
|
||||||
simulated static function bool AllowedForAllPerks()
|
simulated static function bool AllowedForAllPerks()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ConsumeAmmo( byte FireModeNum )
|
simulated function ConsumeAmmo( byte FireModeNum )
|
||||||
|
@ -21,7 +21,7 @@ var array<WeaponSkin> Skins;
|
|||||||
|
|
||||||
static function array<MaterialInterface> GetWeaponSkin(int ItemId, EWeaponSkinType Type, ExtPlayerController PC)
|
static function array<MaterialInterface> GetWeaponSkin(int ItemId, EWeaponSkinType Type, ExtPlayerController PC)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
local array<MaterialInterface> Mats;
|
local array<MaterialInterface> Mats;
|
||||||
local MaterialInterface LoadedMat;
|
local MaterialInterface LoadedMat;
|
||||||
local string FirstPMat;
|
local string FirstPMat;
|
||||||
@ -75,7 +75,7 @@ static function SaveWeaponSkin(class<KFWeaponDefinition> WeaponDef, int ID, ExtP
|
|||||||
|
|
||||||
static function bool IsSkinEquip(class<KFWeaponDefinition> WeaponDef, int ID, ExtPlayerController PC)
|
static function bool IsSkinEquip(class<KFWeaponDefinition> WeaponDef, int ID, ExtPlayerController PC)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
i = PC.SavedWeaponSkins.Find('ID', ID);
|
i = PC.SavedWeaponSkins.Find('ID', ID);
|
||||||
if( i > -1 )
|
if( i > -1 )
|
||||||
return true;
|
return true;
|
||||||
|
@ -114,25 +114,25 @@ reliable client simulated function string UIName(FDefPerkStat DefPerkStat)
|
|||||||
{
|
{
|
||||||
switch( DefPerkStat.StatType )
|
switch( DefPerkStat.StatType )
|
||||||
{
|
{
|
||||||
case name("Speed"): return StatSpeed;
|
case name("Speed"): return StatSpeed;
|
||||||
case name("Damage"): return StatDamage;
|
case name("Damage"): return StatDamage;
|
||||||
case name("Recoil"): return StatRecoil;
|
case name("Recoil"): return StatRecoil;
|
||||||
case name("Spread"): return StatSpread;
|
case name("Spread"): return StatSpread;
|
||||||
case name("Rate"): return StatRate;
|
case name("Rate"): return StatRate;
|
||||||
case name("Reload"): return StatReload;
|
case name("Reload"): return StatReload;
|
||||||
case name("Health"): return StatHealth;
|
case name("Health"): return StatHealth;
|
||||||
case name("KnockDown"): return StatKnockDown;
|
case name("KnockDown"): return StatKnockDown;
|
||||||
case name("Welder"): return StatWelder;
|
case name("Welder"): return StatWelder;
|
||||||
case name("Heal"): return StatHeal;
|
case name("Heal"): return StatHeal;
|
||||||
case name("Mag"): return StatMag;
|
case name("Mag"): return StatMag;
|
||||||
case name("Spare"): return StatSpare;
|
case name("Spare"): return StatSpare;
|
||||||
case name("OffDamage"): return StatOffDamage;
|
case name("OffDamage"): return StatOffDamage;
|
||||||
case name("SelfDamage"): return StatSelfDamage;
|
case name("SelfDamage"): return StatSelfDamage;
|
||||||
case name("Armor"): return StatArmor;
|
case name("Armor"): return StatArmor;
|
||||||
case name("PoisonDmg"): return StatPoisonDmg;
|
case name("PoisonDmg"): return StatPoisonDmg;
|
||||||
case name("SonicDmg"): return StatSonicDmg;
|
case name("SonicDmg"): return StatSonicDmg;
|
||||||
case name("FireDmg"): return StatFireDmg;
|
case name("FireDmg"): return StatFireDmg;
|
||||||
case name("AllDmg"): return StatAllDmg;
|
case name("AllDmg"): return StatAllDmg;
|
||||||
case name("HeadDamage"): return StatHeadDamage;
|
case name("HeadDamage"): return StatHeadDamage;
|
||||||
case name("HealRecharge"): return StatHealRecharge;
|
case name("HealRecharge"): return StatHealRecharge;
|
||||||
}
|
}
|
||||||
|
@ -22,14 +22,14 @@ simulated function bool CanRepairDoors()
|
|||||||
|
|
||||||
simulated function float GetPenetrationModifier( byte Level, class<KFDamageType> DamageType, optional bool bForce )
|
simulated function float GetPenetrationModifier( byte Level, class<KFDamageType> DamageType, optional bool bForce )
|
||||||
{
|
{
|
||||||
local float PenetrationPower;
|
local float PenetrationPower;
|
||||||
if( !bForce && (DamageType == none || ( DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk) == INDEX_NONE )))
|
if( !bForce && (DamageType == none || ( DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk) == INDEX_NONE )))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
PenetrationPower = bUseAPShot ? APShotMul : 0.f;
|
PenetrationPower = bUseAPShot ? APShotMul : 0.f;
|
||||||
PenetrationPower = IsPerforateActive() ? 40.f : PenetrationPower;
|
PenetrationPower = IsPerforateActive() ? 40.f : PenetrationPower;
|
||||||
|
|
||||||
return PenetrationPower;
|
return PenetrationPower;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function bool IsPerforateActive()
|
simulated function bool IsPerforateActive()
|
||||||
|
@ -20,7 +20,7 @@ static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Leve
|
|||||||
{
|
{
|
||||||
Inv = Player.CreateInventory(class'ExtWeap_Pistol_MedicS',Player.Weapon!=None);
|
Inv = Player.CreateInventory(class'ExtWeap_Pistol_MedicS',Player.Weapon!=None);
|
||||||
if ( KFWeapon(Inv)!=None )
|
if ( KFWeapon(Inv)!=None )
|
||||||
KFWeapon(Inv).bGivenAtStart = true;
|
KFWeapon(Inv).bGivenAtStart = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Leve
|
|||||||
{
|
{
|
||||||
Inv = Player.CreateInventory(IC,Player.Weapon!=None);
|
Inv = Player.CreateInventory(IC,Player.Weapon!=None);
|
||||||
if ( KFWeapon(Inv)!=None )
|
if ( KFWeapon(Inv)!=None )
|
||||||
KFWeapon(Inv).bGivenAtStart = true;
|
KFWeapon(Inv).bGivenAtStart = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( M!=None )
|
if( M!=None )
|
||||||
|
@ -28,12 +28,12 @@ var transient float BestPetXL, BestPetYL;
|
|||||||
|
|
||||||
struct PopupDamageInfo
|
struct PopupDamageInfo
|
||||||
{
|
{
|
||||||
var int Damage;
|
var int Damage;
|
||||||
var float HitTime;
|
var float HitTime;
|
||||||
var Vector HitLocation;
|
var Vector HitLocation;
|
||||||
var byte Type;
|
var byte Type;
|
||||||
var float RandX, RandY;
|
var float RandX, RandY;
|
||||||
var color FontColor;
|
var color FontColor;
|
||||||
};
|
};
|
||||||
const DAMAGEPOPUP_COUNT = 32;
|
const DAMAGEPOPUP_COUNT = 32;
|
||||||
var PopupDamageInfo DamagePopups[32];
|
var PopupDamageInfo DamagePopups[32];
|
||||||
@ -450,8 +450,8 @@ function DrawHUD()
|
|||||||
local KFPawn_Scripted KFPS;
|
local KFPawn_Scripted KFPS;
|
||||||
local vector ViewLocation, ViewVector, PlayerPartyInfoLocation, PawnLocation;
|
local vector ViewLocation, ViewVector, PlayerPartyInfoLocation, PawnLocation;
|
||||||
local rotator ViewRotation;
|
local rotator ViewRotation;
|
||||||
local array<PlayerReplicationInfo> VisibleHumanPlayers;
|
local array<PlayerReplicationInfo> VisibleHumanPlayers;
|
||||||
local array<sHiddenHumanPawnInfo> HiddenHumanPlayers;
|
local array<sHiddenHumanPawnInfo> HiddenHumanPlayers;
|
||||||
local float ThisDot,DotScale;
|
local float ThisDot,DotScale;
|
||||||
local vector TargetLocation;
|
local vector TargetLocation;
|
||||||
local Actor LocActor;
|
local Actor LocActor;
|
||||||
@ -459,21 +459,21 @@ function DrawHUD()
|
|||||||
local vector V;
|
local vector V;
|
||||||
local bool bSpec;
|
local bool bSpec;
|
||||||
|
|
||||||
// Draw weapon HUD underneath everything else
|
// Draw weapon HUD underneath everything else
|
||||||
if( KFPlayerOwner != none && KFPlayerOwner.Pawn != none && KFPlayerOwner.Pawn.Weapon != none )
|
if( KFPlayerOwner != none && KFPlayerOwner.Pawn != none && KFPlayerOwner.Pawn.Weapon != none )
|
||||||
{
|
{
|
||||||
KFPlayerOwner.Pawn.Weapon.DrawHUD( self, Canvas );
|
KFPlayerOwner.Pawn.Weapon.DrawHUD( self, Canvas );
|
||||||
}
|
}
|
||||||
|
|
||||||
super.DrawHUD();
|
super.DrawHUD();
|
||||||
|
|
||||||
// Cache GRI
|
// Cache GRI
|
||||||
if( KFGRI == none )
|
if( KFGRI == none )
|
||||||
{
|
{
|
||||||
KFGRI = KFGameReplicationInfo( WorldInfo.GRI );
|
KFGRI = KFGameReplicationInfo( WorldInfo.GRI );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't draw canvas HUD in cinematic mode
|
// Don't draw canvas HUD in cinematic mode
|
||||||
if( KFPlayerOwner != none && KFPlayerOwner.bCinematicMode )
|
if( KFPlayerOwner != none && KFPlayerOwner.bCinematicMode )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -483,86 +483,86 @@ function DrawHUD()
|
|||||||
// Draw the crosshair for casual mode
|
// Draw the crosshair for casual mode
|
||||||
if( KFPlayerOwner != none && (bDrawCrosshair || bForceDrawCrosshair || KFPlayerOwner.GetTeamNum() == 255) )
|
if( KFPlayerOwner != none && (bDrawCrosshair || bForceDrawCrosshair || KFPlayerOwner.GetTeamNum() == 255) )
|
||||||
{
|
{
|
||||||
DrawCrosshair();
|
DrawCrosshair();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Friendly player status
|
// Friendly player status
|
||||||
bSpec = (PlayerOwner.PlayerReplicationInfo!=None && PlayerOwner.PlayerReplicationInfo.bOnlySpectator);
|
bSpec = (PlayerOwner.PlayerReplicationInfo!=None && PlayerOwner.PlayerReplicationInfo.bOnlySpectator);
|
||||||
if( bSpec || PlayerOwner.GetTeamNum()==0 )
|
if( bSpec || PlayerOwner.GetTeamNum()==0 )
|
||||||
{
|
{
|
||||||
//Friendly player status
|
//Friendly player status
|
||||||
if( !class'ExtPlayerController'.Default.bHideNameBeacons )
|
if( !class'ExtPlayerController'.Default.bHideNameBeacons )
|
||||||
{
|
{
|
||||||
if( KFPlayerOwner != none )
|
if( KFPlayerOwner != none )
|
||||||
{
|
{
|
||||||
KFPlayerOwner.GetPlayerViewPoint( ViewLocation, ViewRotation );
|
KFPlayerOwner.GetPlayerViewPoint( ViewLocation, ViewRotation );
|
||||||
}
|
}
|
||||||
ViewVector = vector(ViewRotation);
|
ViewVector = vector(ViewRotation);
|
||||||
|
|
||||||
Canvas.EnableStencilTest(true);
|
Canvas.EnableStencilTest(true);
|
||||||
foreach WorldInfo.AllPawns( class'KFPawn_Human', KFPH )
|
foreach WorldInfo.AllPawns( class'KFPawn_Human', KFPH )
|
||||||
{
|
{
|
||||||
if( KFPH.IsAliveAndWell() && KFPH != KFPlayerOwner.Pawn && KFPH.Mesh.SkeletalMesh != none && KFPH.Mesh.bAnimTreeInitialised )
|
if( KFPH.IsAliveAndWell() && KFPH != KFPlayerOwner.Pawn && KFPH.Mesh.SkeletalMesh != none && KFPH.Mesh.bAnimTreeInitialised )
|
||||||
{
|
{
|
||||||
PlayerPartyInfoLocation = KFPH.Mesh.GetPosition() + ( KFPH.CylinderComponent.CollisionHeight * vect(0,0,1) );
|
PlayerPartyInfoLocation = KFPH.Mesh.GetPosition() + ( KFPH.CylinderComponent.CollisionHeight * vect(0,0,1) );
|
||||||
if(`TimeSince(KFPH.Mesh.LastRenderTime) < 0.2f && Normal(PlayerPartyInfoLocation - ViewLocation) dot ViewVector > 0.f )
|
if(`TimeSince(KFPH.Mesh.LastRenderTime) < 0.2f && Normal(PlayerPartyInfoLocation - ViewLocation) dot ViewVector > 0.f )
|
||||||
{
|
{
|
||||||
if( DrawFriendlyHumanPlayerInfo(KFPH) )
|
if( DrawFriendlyHumanPlayerInfo(KFPH) )
|
||||||
{
|
{
|
||||||
VisibleHumanPlayers.AddItem( KFPH.PlayerReplicationInfo );
|
VisibleHumanPlayers.AddItem( KFPH.PlayerReplicationInfo );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
HiddenHumanPlayers.Insert( 0, 1 );
|
HiddenHumanPlayers.Insert( 0, 1 );
|
||||||
HiddenHumanPlayers[0].HumanPawn = KFPH;
|
HiddenHumanPlayers[0].HumanPawn = KFPH;
|
||||||
HiddenHumanPlayers[0].HumanPRI = KFPH.PlayerReplicationInfo;
|
HiddenHumanPlayers[0].HumanPRI = KFPH.PlayerReplicationInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
HiddenHumanPlayers.Insert( 0, 1 );
|
HiddenHumanPlayers.Insert( 0, 1 );
|
||||||
HiddenHumanPlayers[0].HumanPawn = KFPH;
|
HiddenHumanPlayers[0].HumanPawn = KFPH;
|
||||||
HiddenHumanPlayers[0].HumanPRI = KFPH.PlayerReplicationInfo;
|
HiddenHumanPlayers[0].HumanPRI = KFPH.PlayerReplicationInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach WorldInfo.AllPawns(class'KFPawn_Scripted', KFPS)
|
foreach WorldInfo.AllPawns(class'KFPawn_Scripted', KFPS)
|
||||||
{
|
{
|
||||||
if (KFPS.ShouldShowOnHUD())
|
if (KFPS.ShouldShowOnHUD())
|
||||||
{
|
{
|
||||||
PlayerPartyInfoLocation = KFPS.Mesh.GetPosition() + (KFPS.CylinderComponent.CollisionHeight * vect(0,0,1));
|
PlayerPartyInfoLocation = KFPS.Mesh.GetPosition() + (KFPS.CylinderComponent.CollisionHeight * vect(0,0,1));
|
||||||
DrawScriptedPawnInfo(KFPS, Normal(PlayerPartyInfoLocation - ViewLocation) dot ViewVector, `TimeSince(KFPS.Mesh.LastRenderTime) < 0.2f);
|
DrawScriptedPawnInfo(KFPS, Normal(PlayerPartyInfoLocation - ViewLocation) dot ViewVector, `TimeSince(KFPS.Mesh.LastRenderTime) < 0.2f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !KFGRI.bHidePawnIcons )
|
if( !KFGRI.bHidePawnIcons )
|
||||||
{
|
{
|
||||||
// Draw hidden players
|
// Draw hidden players
|
||||||
CheckAndDrawHiddenPlayerIcons( VisibleHumanPlayers, HiddenHumanPlayers );
|
CheckAndDrawHiddenPlayerIcons( VisibleHumanPlayers, HiddenHumanPlayers );
|
||||||
|
|
||||||
// Draw last remaining zeds
|
// Draw last remaining zeds
|
||||||
CheckAndDrawRemainingZedIcons();
|
CheckAndDrawRemainingZedIcons();
|
||||||
|
|
||||||
//Draw our current objective location
|
//Draw our current objective location
|
||||||
if(KFGRI.CurrentObjective != none && KFGRI.ObjectiveInterface != none)
|
if(KFGRI.CurrentObjective != none && KFGRI.ObjectiveInterface != none)
|
||||||
{
|
{
|
||||||
KFGRI.ObjectiveInterface.DrawHUD(self, Canvas);
|
KFGRI.ObjectiveInterface.DrawHUD(self, Canvas);
|
||||||
|
|
||||||
TargetLocation = KFGRI.ObjectiveInterface.GetIconLocation();
|
TargetLocation = KFGRI.ObjectiveInterface.GetIconLocation();
|
||||||
ThisDot = Normal((TargetLocation + (class'KFPawn_Human'.default.CylinderComponent.CollisionHeight * vect(0, 0, 1))) - ViewLocation) dot ViewVector;
|
ThisDot = Normal((TargetLocation + (class'KFPawn_Human'.default.CylinderComponent.CollisionHeight * vect(0, 0, 1))) - ViewLocation) dot ViewVector;
|
||||||
|
|
||||||
if (ThisDot > 0 &&
|
if (ThisDot > 0 &&
|
||||||
KFGRI.ObjectiveInterface.ShouldShowObjectiveHUD() &&
|
KFGRI.ObjectiveInterface.ShouldShowObjectiveHUD() &&
|
||||||
(!KFGRI.ObjectiveInterFace.HasObjectiveDrawDistance() || VSizeSq(TargetLocation - LocActor.Location) < MaxDrawDistanceObjective))
|
(!KFGRI.ObjectiveInterFace.HasObjectiveDrawDistance() || VSizeSq(TargetLocation - LocActor.Location) < MaxDrawDistanceObjective))
|
||||||
{
|
{
|
||||||
DrawObjectiveHUD();
|
DrawObjectiveHUD();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Canvas.EnableStencilTest(false);
|
Canvas.EnableStencilTest(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( KFPawn_Monster(PlayerOwner.Pawn)!=None )
|
else if( KFPawn_Monster(PlayerOwner.Pawn)!=None )
|
||||||
{
|
{
|
||||||
@ -594,7 +594,7 @@ function DrawHUD()
|
|||||||
|
|
||||||
if( !class'ExtPlayerController'.Default.bHideNameBeacons )
|
if( !class'ExtPlayerController'.Default.bHideNameBeacons )
|
||||||
{
|
{
|
||||||
Canvas.EnableStencilTest(true);
|
Canvas.EnableStencilTest(true);
|
||||||
// Draw zed health bars.
|
// Draw zed health bars.
|
||||||
foreach WorldInfo.AllPawns(class'KFPawn_Monster', M)
|
foreach WorldInfo.AllPawns(class'KFPawn_Monster', M)
|
||||||
{
|
{
|
||||||
@ -602,7 +602,7 @@ function DrawHUD()
|
|||||||
if( ThisDot>0 && ThisDot<8000.f && M.IsAliveAndWell() && M.PlayerReplicationInfo!=None && M!=PlayerOwner.Pawn && (WorldInfo.TimeSeconds - M.Mesh.LastRenderTime) < 0.4f )
|
if( ThisDot>0 && ThisDot<8000.f && M.IsAliveAndWell() && M.PlayerReplicationInfo!=None && M!=PlayerOwner.Pawn && (WorldInfo.TimeSeconds - M.Mesh.LastRenderTime) < 0.4f )
|
||||||
DrawFriendlyHUDZ(M);
|
DrawFriendlyHUDZ(M);
|
||||||
}
|
}
|
||||||
Canvas.EnableStencilTest(false);
|
Canvas.EnableStencilTest(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -634,10 +634,10 @@ simulated function DrawFriendlyHUDZ( KFPawn_Monster KFPH )
|
|||||||
local vector ScreenPos, TargetLocation;
|
local vector ScreenPos, TargetLocation;
|
||||||
local FontRenderInfo MyFontRenderInfo;
|
local FontRenderInfo MyFontRenderInfo;
|
||||||
local float FontScale;
|
local float FontScale;
|
||||||
local byte FadeAlpha;
|
local byte FadeAlpha;
|
||||||
|
|
||||||
MyFontRenderInfo = Canvas.CreateFontRenderInfo( true );
|
MyFontRenderInfo = Canvas.CreateFontRenderInfo( true );
|
||||||
FadeAlpha = DrawToDistance(KFPH);
|
FadeAlpha = DrawToDistance(KFPH);
|
||||||
|
|
||||||
BarLength = FMin(PlayerStatusBarLengthMax * (float(Canvas.SizeX) / 1024.f), PlayerStatusBarLengthMax) * FriendlyHudScale;
|
BarLength = FMin(PlayerStatusBarLengthMax * (float(Canvas.SizeX) / 1024.f), PlayerStatusBarLengthMax) * FriendlyHudScale;
|
||||||
BarHeight = FMin(8.f * (float(Canvas.SizeX) / 1024.f), 8.f) * FriendlyHudScale;
|
BarHeight = FMin(8.f * (float(Canvas.SizeX) / 1024.f), 8.f) * FriendlyHudScale;
|
||||||
@ -656,8 +656,8 @@ simulated function DrawFriendlyHUDZ( KFPawn_Monster KFPH )
|
|||||||
FontScale = class'KFGameEngine'.Static.GetKFFontScale() * FriendlyHudScale;
|
FontScale = class'KFGameEngine'.Static.GetKFFontScale() * FriendlyHudScale;
|
||||||
Canvas.Font = class'KFGameEngine'.Static.GetKFCanvasFont();
|
Canvas.Font = class'KFGameEngine'.Static.GetKFCanvasFont();
|
||||||
|
|
||||||
Canvas.DrawColor = PlayerBarTextColor;
|
Canvas.DrawColor = PlayerBarTextColor;
|
||||||
Canvas.DrawColor.A = FadeAlpha;
|
Canvas.DrawColor.A = FadeAlpha;
|
||||||
|
|
||||||
Canvas.SetPos(ScreenPos.X - (BarLength *0.5f), ScreenPos.Y - BarHeight * 2);
|
Canvas.SetPos(ScreenPos.X - (BarLength *0.5f), ScreenPos.Y - BarHeight * 2);
|
||||||
Canvas.DrawText( KFPH.PlayerReplicationInfo.PlayerName,,FontScale,FontScale, MyFontRenderInfo );
|
Canvas.DrawText( KFPH.PlayerReplicationInfo.PlayerName,,FontScale,FontScale, MyFontRenderInfo );
|
||||||
@ -673,8 +673,8 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH )
|
|||||||
local float ResModifier;
|
local float ResModifier;
|
||||||
local float PerkIconPosX, PerkIconPosY, SupplyIconPosX, SupplyIconPosY, PerkIconSize;
|
local float PerkIconPosX, PerkIconPosY, SupplyIconPosX, SupplyIconPosY, PerkIconSize;
|
||||||
local color CurrentArmorColor, CurrentHealthColor, TextColor;
|
local color CurrentArmorColor, CurrentHealthColor, TextColor;
|
||||||
local string S;
|
local string S;
|
||||||
local byte FadeAlpha;
|
local byte FadeAlpha;
|
||||||
|
|
||||||
ResModifier = WorldInfo.static.GetResolutionBasedHUDScale() * FriendlyHudScale;
|
ResModifier = WorldInfo.static.GetResolutionBasedHUDScale() * FriendlyHudScale;
|
||||||
KFPRI = ExtPlayerReplicationInfo(KFPH.PlayerReplicationInfo);
|
KFPRI = ExtPlayerReplicationInfo(KFPH.PlayerReplicationInfo);
|
||||||
@ -684,7 +684,7 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
FadeAlpha = DrawToDistance(KFPH);
|
FadeAlpha = DrawToDistance(KFPH);
|
||||||
MyFontRenderInfo = Canvas.CreateFontRenderInfo( true );
|
MyFontRenderInfo = Canvas.CreateFontRenderInfo( true );
|
||||||
BarLength = FMin(PlayerStatusBarLengthMax * (Canvas.ClipX / 1024.f), PlayerStatusBarLengthMax) * ResModifier;
|
BarLength = FMin(PlayerStatusBarLengthMax * (Canvas.ClipX / 1024.f), PlayerStatusBarLengthMax) * ResModifier;
|
||||||
BarHeight = FMin(8.f * (Canvas.ClipX / 1024.f), 8.f) * ResModifier;
|
BarHeight = FMin(8.f * (Canvas.ClipX / 1024.f), 8.f) * ResModifier;
|
||||||
@ -701,7 +701,7 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH )
|
|||||||
Canvas.Font = class'KFGameEngine'.Static.GetKFCanvasFont();
|
Canvas.Font = class'KFGameEngine'.Static.GetKFCanvasFont();
|
||||||
|
|
||||||
// drop shadow for player name text
|
// drop shadow for player name text
|
||||||
S = KFPRI.PlayerName;
|
S = KFPRI.PlayerName;
|
||||||
if( KFPRI.bBot )
|
if( KFPRI.bBot )
|
||||||
{
|
{
|
||||||
S = S$" (Bot)";
|
S = S$" (Bot)";
|
||||||
@ -716,31 +716,31 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH )
|
|||||||
|
|
||||||
if( bMeAdmin && KFPRI.FixedData>0 )
|
if( bMeAdmin && KFPRI.FixedData>0 )
|
||||||
{
|
{
|
||||||
TextColor = MakeColor(255,0,0,255);
|
TextColor = MakeColor(255,0,0,255);
|
||||||
S @= "-"$KFPRI.GetDesc();
|
S @= "-"$KFPRI.GetDesc();
|
||||||
}
|
}
|
||||||
|
|
||||||
TextColor.A = FadeAlpha;
|
TextColor.A = FadeAlpha;
|
||||||
|
|
||||||
Canvas.DrawColor = PlayerBarShadowColor;
|
Canvas.DrawColor = PlayerBarShadowColor;
|
||||||
Canvas.DrawColor.A = FadeAlpha;
|
Canvas.DrawColor.A = FadeAlpha;
|
||||||
Canvas.SetPos(ScreenPos.X - (BarLength * 0.5f) + 1, ScreenPos.Y + 8);
|
Canvas.SetPos(ScreenPos.X - (BarLength * 0.5f) + 1, ScreenPos.Y + 8);
|
||||||
Canvas.DrawText(S, , FontScale, FontScale, MyFontRenderInfo);
|
Canvas.DrawText(S, , FontScale, FontScale, MyFontRenderInfo);
|
||||||
|
|
||||||
Canvas.DrawColor = TextColor;
|
Canvas.DrawColor = TextColor;
|
||||||
Canvas.SetPos(ScreenPos.X - (BarLength * 0.5f), ScreenPos.Y + 7);
|
Canvas.SetPos(ScreenPos.X - (BarLength * 0.5f), ScreenPos.Y + 7);
|
||||||
Canvas.DrawText(S, , FontScale, FontScale, MyFontRenderInfo);
|
Canvas.DrawText(S, , FontScale, FontScale, MyFontRenderInfo);
|
||||||
|
|
||||||
//Draw armor bar
|
//Draw armor bar
|
||||||
Percentage = FMin(float(KFPH.Armor) / float(KFPH.MaxArmor), 100);
|
Percentage = FMin(float(KFPH.Armor) / float(KFPH.MaxArmor), 100);
|
||||||
CurrentArmorColor = ClassicPlayerInfo ? ClassicArmorColor : ArmorColor;
|
CurrentArmorColor = ClassicPlayerInfo ? ClassicArmorColor : ArmorColor;
|
||||||
CurrentArmorColor.A = FadeAlpha;
|
CurrentArmorColor.A = FadeAlpha;
|
||||||
DrawPlayerInfoBar(KFPH, Percentage, BarLength, BarHeight, ScreenPos.X - (BarLength * 0.5f), ScreenPos.Y + BarHeight + (36 * FontScale * ResModifier), CurrentArmorColor, FadeAlpha);
|
DrawPlayerInfoBar(KFPH, Percentage, BarLength, BarHeight, ScreenPos.X - (BarLength * 0.5f), ScreenPos.Y + BarHeight + (36 * FontScale * ResModifier), CurrentArmorColor, FadeAlpha);
|
||||||
|
|
||||||
//Draw health bar
|
//Draw health bar
|
||||||
Percentage = FMin(float(KFPH.Health) / float(KFPH.HealthMax), 100);
|
Percentage = FMin(float(KFPH.Health) / float(KFPH.HealthMax), 100);
|
||||||
CurrentHealthColor = ClassicPlayerInfo ? ClassicHealthColor : HealthColor;
|
CurrentHealthColor = ClassicPlayerInfo ? ClassicHealthColor : HealthColor;
|
||||||
CurrentHealthColor.A = FadeAlpha;
|
CurrentHealthColor.A = FadeAlpha;
|
||||||
DrawPlayerInfoBar(KFPH, Percentage, BarLength, BarHeight, ScreenPos.X - (BarLength * 0.5f), ScreenPos.Y + BarHeight * 2 + (36 * FontScale * ResModifier), CurrentHealthColor, FadeAlpha, true);
|
DrawPlayerInfoBar(KFPH, Percentage, BarLength, BarHeight, ScreenPos.X - (BarLength * 0.5f), ScreenPos.Y + BarHeight * 2 + (36 * FontScale * ResModifier), CurrentHealthColor, FadeAlpha, true);
|
||||||
|
|
||||||
if( KFPRI.ECurrentPerk == None )
|
if( KFPRI.ECurrentPerk == None )
|
||||||
@ -749,19 +749,19 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// drop shadow for perk name text
|
// drop shadow for perk name text
|
||||||
Canvas.DrawColor = PlayerBarShadowColor;
|
Canvas.DrawColor = PlayerBarShadowColor;
|
||||||
Canvas.DrawColor.A = FadeAlpha;
|
Canvas.DrawColor.A = FadeAlpha;
|
||||||
Canvas.SetPos(ScreenPos.X - (BarLength * 0.5f) + 1, ScreenPos.Y + BarHeight * 3 + (36 * FontScale * ResModifier) + 1);
|
Canvas.SetPos(ScreenPos.X - (BarLength * 0.5f) + 1, ScreenPos.Y + BarHeight * 3 + (36 * FontScale * ResModifier) + 1);
|
||||||
Canvas.DrawText(KFPRI.GetPerkLevelStr()@KFPRI.ECurrentPerk.default.PerkName, , FontScale, FontScale, MyFontRenderInfo);
|
Canvas.DrawText(KFPRI.GetPerkLevelStr()@KFPRI.ECurrentPerk.default.PerkName, , FontScale, FontScale, MyFontRenderInfo);
|
||||||
|
|
||||||
//Draw perk level and name text
|
//Draw perk level and name text
|
||||||
Canvas.DrawColor = PlayerBarTextColor;
|
Canvas.DrawColor = PlayerBarTextColor;
|
||||||
Canvas.DrawColor.A = FadeAlpha;
|
Canvas.DrawColor.A = FadeAlpha;
|
||||||
Canvas.SetPos(ScreenPos.X - (BarLength * 0.5f), ScreenPos.Y + BarHeight * 3 + (36 * FontScale * ResModifier));
|
Canvas.SetPos(ScreenPos.X - (BarLength * 0.5f), ScreenPos.Y + BarHeight * 3 + (36 * FontScale * ResModifier));
|
||||||
Canvas.DrawText(KFPRI.GetPerkLevelStr()@KFPRI.ECurrentPerk.default.PerkName, , FontScale, FontScale, MyFontRenderInfo);
|
Canvas.DrawText(KFPRI.GetPerkLevelStr()@KFPRI.ECurrentPerk.default.PerkName, , FontScale, FontScale, MyFontRenderInfo);
|
||||||
|
|
||||||
// drop shadow for perk icon
|
// drop shadow for perk icon
|
||||||
Canvas.DrawColor = PlayerBarShadowColor;
|
Canvas.DrawColor = PlayerBarShadowColor;
|
||||||
Canvas.DrawColor.A = FadeAlpha;
|
Canvas.DrawColor.A = FadeAlpha;
|
||||||
PerkIconSize = PlayerStatusIconSize * ResModifier;
|
PerkIconSize = PlayerStatusIconSize * ResModifier;
|
||||||
PerkIconPosX = ScreenPos.X - (BarLength * 0.5f) - PerkIconSize + 1;
|
PerkIconPosX = ScreenPos.X - (BarLength * 0.5f) - PerkIconSize + 1;
|
||||||
@ -771,7 +771,7 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH )
|
|||||||
DrawPerkIcons(KFPH, PerkIconSize, PerkIconPosX, PerkIconPosY, SupplyIconPosX, SupplyIconPosY, true);
|
DrawPerkIcons(KFPH, PerkIconSize, PerkIconPosX, PerkIconPosY, SupplyIconPosX, SupplyIconPosY, true);
|
||||||
|
|
||||||
//draw perk icon
|
//draw perk icon
|
||||||
Canvas.DrawColor = PlayerBarIconColor;
|
Canvas.DrawColor = PlayerBarIconColor;
|
||||||
Canvas.DrawColor.A = FadeAlpha;
|
Canvas.DrawColor.A = FadeAlpha;
|
||||||
PerkIconPosX = ScreenPos.X - (BarLength * 0.5f) - PerkIconSize;
|
PerkIconPosX = ScreenPos.X - (BarLength * 0.5f) - PerkIconSize;
|
||||||
PerkIconPosY = ScreenPos.Y + (36 * FontScale * ResModifier);
|
PerkIconPosY = ScreenPos.Y + (36 * FontScale * ResModifier);
|
||||||
@ -785,7 +785,7 @@ simulated final function DrawPlayerInfoBar( KFPawn P, float BarPercentage, float
|
|||||||
{
|
{
|
||||||
//background for status bar
|
//background for status bar
|
||||||
Canvas.DrawColor = PlayerBarBGColor;
|
Canvas.DrawColor = PlayerBarBGColor;
|
||||||
Canvas.DrawColor.A = FadeAlpha;
|
Canvas.DrawColor.A = FadeAlpha;
|
||||||
Canvas.SetPos(XPos, YPos);
|
Canvas.SetPos(XPos, YPos);
|
||||||
Canvas.DrawTileStretched(PlayerStatusBarBGTexture, BarLength, BarHeight, 0, 0, 32, 32);
|
Canvas.DrawTileStretched(PlayerStatusBarBGTexture, BarLength, BarHeight, 0, 0, 32, 32);
|
||||||
|
|
||||||
@ -796,7 +796,7 @@ simulated final function DrawPlayerInfoBar( KFPawn P, float BarPercentage, float
|
|||||||
|
|
||||||
//Forground for status bar.
|
//Forground for status bar.
|
||||||
Canvas.DrawColor = BarColor;
|
Canvas.DrawColor = BarColor;
|
||||||
Canvas.DrawColor.A = FadeAlpha;
|
Canvas.DrawColor.A = FadeAlpha;
|
||||||
Canvas.SetPos(XPos, YPos);
|
Canvas.SetPos(XPos, YPos);
|
||||||
Canvas.DrawTileStretched(PlayerStatusBarBGTexture, BarLength * BarPercentage, BarHeight, 0, 0, 32, 32);
|
Canvas.DrawTileStretched(PlayerStatusBarBGTexture, BarLength * BarPercentage, BarHeight, 0, 0, 32, 32);
|
||||||
|
|
||||||
@ -806,7 +806,7 @@ simulated final function DrawPlayerInfoBar( KFPawn P, float BarPercentage, float
|
|||||||
XPos+=(BarLength * BarPercentage);
|
XPos+=(BarLength * BarPercentage);
|
||||||
BarPercentage = FMin(float(ExtHumanPawn(P).RepRegenHP) / float(P.HealthMax),1.f-BarPercentage);
|
BarPercentage = FMin(float(ExtHumanPawn(P).RepRegenHP) / float(P.HealthMax),1.f-BarPercentage);
|
||||||
|
|
||||||
Canvas.DrawColor = MakeColor(255,128,128,FadeAlpha);
|
Canvas.DrawColor = MakeColor(255,128,128,FadeAlpha);
|
||||||
Canvas.SetPos(XPos, YPos);
|
Canvas.SetPos(XPos, YPos);
|
||||||
Canvas.DrawTileStretched(PlayerStatusBarBGTexture, BarLength * BarPercentage, BarHeight, 0, 0, 32, 32);
|
Canvas.DrawTileStretched(PlayerStatusBarBGTexture, BarLength * BarPercentage, BarHeight, 0, 0, 32, 32);
|
||||||
}
|
}
|
||||||
@ -884,13 +884,13 @@ simulated function DrawMonsterHUD( KFPawn KFPH )
|
|||||||
local Ext_T_MonsterPRI PRI;
|
local Ext_T_MonsterPRI PRI;
|
||||||
local FontRenderInfo MyFontRenderInfo;
|
local FontRenderInfo MyFontRenderInfo;
|
||||||
local float FontScale;
|
local float FontScale;
|
||||||
local byte FadeAlpha;
|
local byte FadeAlpha;
|
||||||
|
|
||||||
PRI = Ext_T_MonsterPRI(KFPH.PlayerReplicationInfo);
|
PRI = Ext_T_MonsterPRI(KFPH.PlayerReplicationInfo);
|
||||||
if( PRI==None )
|
if( PRI==None )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FadeAlpha = DrawToDistance(KFPH);
|
FadeAlpha = DrawToDistance(KFPH);
|
||||||
MyFontRenderInfo = Canvas.CreateFontRenderInfo( true );
|
MyFontRenderInfo = Canvas.CreateFontRenderInfo( true );
|
||||||
|
|
||||||
BarLength = FMin(PlayerStatusBarLengthMax * (float(Canvas.SizeX) / 1024.f), PlayerStatusBarLengthMax) * FriendlyHudScale;
|
BarLength = FMin(PlayerStatusBarLengthMax * (float(Canvas.SizeX) / 1024.f), PlayerStatusBarLengthMax) * FriendlyHudScale;
|
||||||
@ -964,73 +964,73 @@ simulated function DrawPetInfo()
|
|||||||
|
|
||||||
function byte DrawToDistance(Actor A, optional float StartAlpha=255.f, optional float MinAlpha=90.f)
|
function byte DrawToDistance(Actor A, optional float StartAlpha=255.f, optional float MinAlpha=90.f)
|
||||||
{
|
{
|
||||||
local float Dist, fZoom;
|
local float Dist, fZoom;
|
||||||
|
|
||||||
Dist = VSize(A.Location - PLCameraLoc);
|
Dist = VSize(A.Location - PLCameraLoc);
|
||||||
if ( Dist <= HealthBarFullVisDist || PlayerOwner.PlayerReplicationInfo.bOnlySpectator )
|
if ( Dist <= HealthBarFullVisDist || PlayerOwner.PlayerReplicationInfo.bOnlySpectator )
|
||||||
fZoom = 1.0;
|
fZoom = 1.0;
|
||||||
else fZoom = FMax(1.0 - (Dist - HealthBarFullVisDist) / (HealthBarCutoffDist - HealthBarFullVisDist), 0.0);
|
else fZoom = FMax(1.0 - (Dist - HealthBarFullVisDist) / (HealthBarCutoffDist - HealthBarFullVisDist), 0.0);
|
||||||
|
|
||||||
return Clamp(StartAlpha * fZoom, MinAlpha, StartAlpha);
|
return Clamp(StartAlpha * fZoom, MinAlpha, StartAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
final function AddNumberMsg( int Amount, vector Pos, byte Type )
|
final function AddNumberMsg( int Amount, vector Pos, byte Type )
|
||||||
{
|
{
|
||||||
local Color C;
|
local Color C;
|
||||||
|
|
||||||
DamagePopups[NextDamagePopupIndex].Damage = Amount;
|
DamagePopups[NextDamagePopupIndex].Damage = Amount;
|
||||||
DamagePopups[NextDamagePopupIndex].HitTime = WorldInfo.TimeSeconds;
|
DamagePopups[NextDamagePopupIndex].HitTime = WorldInfo.TimeSeconds;
|
||||||
DamagePopups[NextDamagePopupIndex].Type = Type;
|
DamagePopups[NextDamagePopupIndex].Type = Type;
|
||||||
DamagePopups[NextDamagePopupIndex].HitLocation = Pos;
|
DamagePopups[NextDamagePopupIndex].HitLocation = Pos;
|
||||||
//ser random speed of fading out, so multiple damages in the same hit location don't overlap each other
|
//ser random speed of fading out, so multiple damages in the same hit location don't overlap each other
|
||||||
DamagePopups[NextDamagePopupIndex].RandX = 2.0 * FRand();
|
DamagePopups[NextDamagePopupIndex].RandX = 2.0 * FRand();
|
||||||
DamagePopups[NextDamagePopupIndex].RandY = 1.0 + FRand();
|
DamagePopups[NextDamagePopupIndex].RandY = 1.0 + FRand();
|
||||||
|
|
||||||
C.A = 255;
|
C.A = 255;
|
||||||
if ( Type == 0 && Amount < 100 ) {
|
if ( Type == 0 && Amount < 100 ) {
|
||||||
C.R = 220;
|
C.R = 220;
|
||||||
C.G = 0;
|
C.G = 0;
|
||||||
C.B = 0;
|
C.B = 0;
|
||||||
}
|
}
|
||||||
else if ( Type == 1 ) {
|
else if ( Type == 1 ) {
|
||||||
C.R = 255;
|
C.R = 255;
|
||||||
C.G = 255;
|
C.G = 255;
|
||||||
C.B = 25;
|
C.B = 25;
|
||||||
}
|
}
|
||||||
else if ( Type == 2 ) {
|
else if ( Type == 2 ) {
|
||||||
C.R = 32;
|
C.R = 32;
|
||||||
C.G = 240;
|
C.G = 240;
|
||||||
C.B = 32;
|
C.B = 32;
|
||||||
}
|
}
|
||||||
else if ( Amount >= 300 ) {
|
else if ( Amount >= 300 ) {
|
||||||
C.R = 0;
|
C.R = 0;
|
||||||
C.G = 206;
|
C.G = 206;
|
||||||
C.B = 0;
|
C.B = 0;
|
||||||
}
|
}
|
||||||
else if ( Amount >= 100 ) {
|
else if ( Amount >= 100 ) {
|
||||||
C.R = 206;
|
C.R = 206;
|
||||||
C.G = 206;
|
C.G = 206;
|
||||||
C.B = 0;
|
C.B = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
C.R = 127;
|
C.R = 127;
|
||||||
C.G = 127;
|
C.G = 127;
|
||||||
C.B = 127;
|
C.B = 127;
|
||||||
}
|
}
|
||||||
DamagePopups[NextDamagePopupIndex].FontColor = C;
|
DamagePopups[NextDamagePopupIndex].FontColor = C;
|
||||||
|
|
||||||
if( ++NextDamagePopupIndex >= DAMAGEPOPUP_COUNT)
|
if( ++NextDamagePopupIndex >= DAMAGEPOPUP_COUNT)
|
||||||
NextDamagePopupIndex=0;
|
NextDamagePopupIndex=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
final function DrawDamage()
|
final function DrawDamage()
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
local float TimeSinceHit;
|
local float TimeSinceHit;
|
||||||
local vector CameraLocation, CamDir;
|
local vector CameraLocation, CamDir;
|
||||||
local rotator CameraRotation;
|
local rotator CameraRotation;
|
||||||
local vector HBScreenPos;
|
local vector HBScreenPos;
|
||||||
local float TextWidth, TextHeight, x, Sc;
|
local float TextWidth, TextHeight, x, Sc;
|
||||||
local string S;
|
local string S;
|
||||||
|
|
||||||
Canvas.Font = class'Engine'.Static.GetMediumFont();
|
Canvas.Font = class'Engine'.Static.GetMediumFont();
|
||||||
@ -1039,12 +1039,12 @@ final function DrawDamage()
|
|||||||
KFPlayerController(Owner).GetPlayerViewPoint(CameraLocation, CameraRotation);
|
KFPlayerController(Owner).GetPlayerViewPoint(CameraLocation, CameraRotation);
|
||||||
CamDir = vector(CameraRotation);
|
CamDir = vector(CameraRotation);
|
||||||
|
|
||||||
for( i=0; i < DAMAGEPOPUP_COUNT ; i++ )
|
for( i=0; i < DAMAGEPOPUP_COUNT ; i++ )
|
||||||
{
|
{
|
||||||
TimeSinceHit = WorldInfo.TimeSeconds - DamagePopups[i].HitTime;
|
TimeSinceHit = WorldInfo.TimeSeconds - DamagePopups[i].HitTime;
|
||||||
if( TimeSinceHit > DamagePopupFadeOutTime
|
if( TimeSinceHit > DamagePopupFadeOutTime
|
||||||
|| ( Normal(DamagePopups[i].HitLocation - CameraLocation) dot Normal(CamDir) < 0.1 ) ) //don't draw if player faced back to the hit location
|
|| ( Normal(DamagePopups[i].HitLocation - CameraLocation) dot Normal(CamDir) < 0.1 ) ) //don't draw if player faced back to the hit location
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch( DamagePopups[i].Type )
|
switch( DamagePopups[i].Type )
|
||||||
{
|
{
|
||||||
@ -1059,27 +1059,27 @@ final function DrawDamage()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
HBScreenPos = Canvas.Project(DamagePopups[i].HitLocation);
|
HBScreenPos = Canvas.Project(DamagePopups[i].HitLocation);
|
||||||
Canvas.TextSize(S,TextWidth,TextHeight,Sc,Sc);
|
Canvas.TextSize(S,TextWidth,TextHeight,Sc,Sc);
|
||||||
//draw just on the hit location
|
//draw just on the hit location
|
||||||
HBScreenPos.Y -= TextHeight/2;
|
HBScreenPos.Y -= TextHeight/2;
|
||||||
HBScreenPos.X -= TextWidth/2;
|
HBScreenPos.X -= TextWidth/2;
|
||||||
|
|
||||||
//let numbers to fly up
|
//let numbers to fly up
|
||||||
HBScreenPos.Y -= TimeSinceHit * TextHeight * DamagePopups[i].RandY;
|
HBScreenPos.Y -= TimeSinceHit * TextHeight * DamagePopups[i].RandY;
|
||||||
x = Sin(2*Pi * TimeSinceHit/DamagePopupFadeOutTime) * TextWidth * DamagePopups[i].RandX;
|
x = Sin(2*Pi * TimeSinceHit/DamagePopupFadeOutTime) * TextWidth * DamagePopups[i].RandX;
|
||||||
// odd numbers start to flying to the right side, even - left
|
// odd numbers start to flying to the right side, even - left
|
||||||
// So in situations of decapitaion player could see both damages
|
// So in situations of decapitaion player could see both damages
|
||||||
if ( i % 2 == 0)
|
if ( i % 2 == 0)
|
||||||
x *= -1.0;
|
x *= -1.0;
|
||||||
HBScreenPos.X += x;
|
HBScreenPos.X += x;
|
||||||
|
|
||||||
Canvas.DrawColor = DamagePopups[i].FontColor;
|
Canvas.DrawColor = DamagePopups[i].FontColor;
|
||||||
Canvas.DrawColor.A = 255 * Cos(0.5*Pi * TimeSinceHit/DamagePopupFadeOutTime);
|
Canvas.DrawColor.A = 255 * Cos(0.5*Pi * TimeSinceHit/DamagePopupFadeOutTime);
|
||||||
|
|
||||||
Canvas.SetPos( HBScreenPos.X, HBScreenPos.Y);
|
Canvas.SetPos( HBScreenPos.X, HBScreenPos.Y);
|
||||||
Canvas.DrawText( S );
|
Canvas.DrawText( S );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search for new inventory!
|
// Search for new inventory!
|
||||||
|
@ -17,8 +17,8 @@ function DrawMenu()
|
|||||||
if( bIsHighlighted )
|
if( bIsHighlighted )
|
||||||
{
|
{
|
||||||
Canvas.DrawColor.R = Min(Canvas.DrawColor.R + 25, FrameOpacity);
|
Canvas.DrawColor.R = Min(Canvas.DrawColor.R + 25, FrameOpacity);
|
||||||
Canvas.DrawColor.G = Min(Canvas.DrawColor.G + 25, FrameOpacity);
|
Canvas.DrawColor.G = Min(Canvas.DrawColor.G + 25, FrameOpacity);
|
||||||
Canvas.DrawColor.B = Min(Canvas.DrawColor.B + 25, FrameOpacity);
|
Canvas.DrawColor.B = Min(Canvas.DrawColor.B + 25, FrameOpacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
Canvas.SetPos(0.f,0.f);
|
Canvas.SetPos(0.f,0.f);
|
||||||
|
@ -2,7 +2,7 @@ class KFPawn_ZedSirenX extends KFPawn_ZedSiren;
|
|||||||
|
|
||||||
function bool CanBeGrabbed(KFPawn GrabbingPawn, optional bool bIgnoreFalling, optional bool bAllowSameTeamGrab)
|
function bool CanBeGrabbed(KFPawn GrabbingPawn, optional bool bIgnoreFalling, optional bool bAllowSameTeamGrab)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
|
@ -5,8 +5,8 @@ event Timer();
|
|||||||
|
|
||||||
event InitGame( string Options, out string ErrorMessage )
|
event InitGame( string Options, out string ErrorMessage )
|
||||||
{
|
{
|
||||||
MaxPlayers = 99;
|
MaxPlayers = 99;
|
||||||
MaxSpectators = 99;
|
MaxSpectators = 99;
|
||||||
class'MS_TMPUI'.Static.Remove();
|
class'MS_TMPUI'.Static.Remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,70 +33,70 @@ function InitMenu()
|
|||||||
|
|
||||||
static final function string FormatTimeSMH (float Sec)
|
static final function string FormatTimeSMH (float Sec)
|
||||||
{
|
{
|
||||||
local int Hours, Seconds, Minutes;
|
local int Hours, Seconds, Minutes;
|
||||||
|
|
||||||
Sec = Abs (Sec);
|
Sec = Abs (Sec);
|
||||||
Seconds = int (Sec);
|
Seconds = int (Sec);
|
||||||
Minutes = Seconds / 60;
|
Minutes = Seconds / 60;
|
||||||
Seconds -= Minutes * 60;
|
Seconds -= Minutes * 60;
|
||||||
Hours = Minutes / 60;
|
Hours = Minutes / 60;
|
||||||
|
|
||||||
return ((Hours < 1) ? "0" $Hours : string (Hours)) @":" @((Minutes < 10) ? "0" $Minutes : string (Minutes)) @":" @((Seconds < 10) ? "0" $Seconds : string (Seconds));
|
return ((Hours < 1) ? "0" $Hours : string (Hours)) @":" @((Minutes < 10) ? "0" $Minutes : string (Minutes)) @":" @((Seconds < 10) ? "0" $Seconds : string (Seconds));
|
||||||
}
|
}
|
||||||
|
|
||||||
function DrawMenu()
|
function DrawMenu()
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
local PlayerController PC;
|
local PlayerController PC;
|
||||||
local PlayerReplicationInfo PRI;
|
local PlayerReplicationInfo PRI;
|
||||||
local ExtPlayerReplicationInfo KFPRI;
|
local ExtPlayerReplicationInfo KFPRI;
|
||||||
local float XPos, YPos, XL, YL, FontScalar, XPosCenter, CurrentBoxY;
|
local float XPos, YPos, XL, YL, FontScalar, XPosCenter, CurrentBoxY;
|
||||||
local int i, j, NumSpec, NumPlayer, NumAlivePlayer, Width, NotShownCount;
|
local int i, j, NumSpec, NumPlayer, NumAlivePlayer, Width, NotShownCount;
|
||||||
local byte DefFont;
|
local byte DefFont;
|
||||||
|
|
||||||
PC = GetPlayer ();
|
PC = GetPlayer ();
|
||||||
if (KFGRI == None) {
|
if (KFGRI == None) {
|
||||||
KFGRI = KFGameReplicationInfo (PC.WorldInfo.GRI);
|
KFGRI = KFGameReplicationInfo (PC.WorldInfo.GRI);
|
||||||
if (KFGRI == None)
|
if (KFGRI == None)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort player list.
|
// Sort player list.
|
||||||
for (i = (KFGRI.PRIArray.Length - 1); i > 0; --i) {
|
for (i = (KFGRI.PRIArray.Length - 1); i > 0; --i) {
|
||||||
for (j = i - 1; j >= 0; --j) {
|
for (j = i - 1; j >= 0; --j) {
|
||||||
if (!InOrder (KFGRI.PRIArray [i], KFGRI.PRIArray [j])) {
|
if (!InOrder (KFGRI.PRIArray [i], KFGRI.PRIArray [j])) {
|
||||||
PRI = KFGRI.PRIArray [i];
|
PRI = KFGRI.PRIArray [i];
|
||||||
KFGRI.PRIArray [i] = KFGRI.PRIArray [j];
|
KFGRI.PRIArray [i] = KFGRI.PRIArray [j];
|
||||||
KFGRI.PRIArray [j] = PRI;
|
KFGRI.PRIArray [j] = PRI;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check players.
|
// Check players.
|
||||||
NumPlayer = 0;
|
NumPlayer = 0;
|
||||||
for (i = (KFGRI.PRIArray.Length - 1); i >= 0; --i) {
|
for (i = (KFGRI.PRIArray.Length - 1); i >= 0; --i) {
|
||||||
KFPRI = ExtPlayerReplicationInfo (KFGRI.PRIArray [i]);
|
KFPRI = ExtPlayerReplicationInfo (KFGRI.PRIArray [i]);
|
||||||
if (KFPRI == None)
|
if (KFPRI == None)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (KFPRI.bOnlySpectator) {
|
if (KFPRI.bOnlySpectator) {
|
||||||
++NumSpec;
|
++NumSpec;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (KFPRI.PlayerHealth > 0 && KFPRI.PlayerHealthPercent > 0 && KFPRI.GetTeamNum () == 0)
|
if (KFPRI.PlayerHealth > 0 && KFPRI.PlayerHealthPercent > 0 && KFPRI.GetTeamNum () == 0)
|
||||||
++NumAlivePlayer;
|
++NumAlivePlayer;
|
||||||
++NumPlayer;
|
++NumPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
//`Log ("DrawMenu (): PlayList.Length = " @PRIList.Length);
|
//`Log ("DrawMenu (): PlayList.Length = " @PRIList.Length);
|
||||||
|
|
||||||
// Header font info.
|
// Header font info.
|
||||||
DefFont = Owner.CurrentStyle.DefaultFontSize;
|
DefFont = Owner.CurrentStyle.DefaultFontSize;
|
||||||
Canvas.Font = Owner.CurrentStyle.PickFont(DefFont, FontScalar);
|
Canvas.Font = Owner.CurrentStyle.PickFont(DefFont, FontScalar);
|
||||||
|
|
||||||
YL = Owner.CurrentStyle.DefaultHeight;
|
YL = Owner.CurrentStyle.DefaultHeight;
|
||||||
XPosCenter = (Canvas.ClipX * 0.5);
|
XPosCenter = (Canvas.ClipX * 0.5);
|
||||||
|
|
||||||
// ServerName
|
// ServerName
|
||||||
|
|
||||||
@ -282,7 +282,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
|
|||||||
bFocus = bFocus || (bHasSelectedPlayer && RightClickPlayer==KFPRI);
|
bFocus = bFocus || (bHasSelectedPlayer && RightClickPlayer==KFPRI);
|
||||||
|
|
||||||
DefFont = Owner.CurrentStyle.DefaultFontSize;
|
DefFont = Owner.CurrentStyle.DefaultFontSize;
|
||||||
C.Font = Owner.CurrentStyle.PickFont(DefFont, FontScalar);
|
C.Font = Owner.CurrentStyle.PickFont(DefFont, FontScalar);
|
||||||
|
|
||||||
if (KFPRI == GetPlayer().PlayerReplicationInfo)
|
if (KFPRI == GetPlayer().PlayerReplicationInfo)
|
||||||
{
|
{
|
||||||
|
@ -431,7 +431,7 @@ function bool DoJump( bool bUpdating )
|
|||||||
// Nope.
|
// Nope.
|
||||||
function bool CanBeGrabbed(KFPawn GrabbingPawn, optional bool bIgnoreFalling, optional bool bAllowSameTeamGrab)
|
function bool CanBeGrabbed(KFPawn GrabbingPawn, optional bool bIgnoreFalling, optional bool bAllowSameTeamGrab)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// UI stuff.
|
// UI stuff.
|
||||||
|
@ -8,7 +8,7 @@ simulated event PostInitAnimTree(SkeletalMeshComponent SkelComp)
|
|||||||
if( bCanHeadTrack )
|
if( bCanHeadTrack )
|
||||||
{
|
{
|
||||||
IK_Look_Head = SkelControlLookAt(Mesh.FindSkelControl('HeadLook'));
|
IK_Look_Head = SkelControlLookAt(Mesh.FindSkelControl('HeadLook'));
|
||||||
//IK_Look_Spine = SkelControlLookAt(Mesh.FindSkelControl('SpineLook'));
|
//IK_Look_Spine = SkelControlLookAt(Mesh.FindSkelControl('SpineLook'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ simulated function SetCharacterAnimationInfo()
|
|||||||
|
|
||||||
// Keep monster animations.
|
// Keep monster animations.
|
||||||
M = KFCharacterInfo_Monster'ZED_ARCH.ZED_Clot_UnDev_Archetype';
|
M = KFCharacterInfo_Monster'ZED_ARCH.ZED_Clot_UnDev_Archetype';
|
||||||
Mesh.AnimSets = M.AnimSets;
|
Mesh.AnimSets = M.AnimSets;
|
||||||
if ( Mesh.AnimTreeTemplate != M.AnimTreeTemplate )
|
if ( Mesh.AnimTreeTemplate != M.AnimTreeTemplate )
|
||||||
Mesh.SetAnimTreeTemplate(M.AnimTreeTemplate);
|
Mesh.SetAnimTreeTemplate(M.AnimTreeTemplate);
|
||||||
if ( M.AnimArchetype != None )
|
if ( M.AnimArchetype != None )
|
||||||
@ -100,7 +100,7 @@ simulated function SetCharacterArch(KFCharacterInfoBase Info, optional bool bFor
|
|||||||
{
|
{
|
||||||
local KFPlayerReplicationInfo KFPRI;
|
local KFPlayerReplicationInfo KFPRI;
|
||||||
|
|
||||||
KFPRI = KFPlayerReplicationInfo( PlayerReplicationInfo );
|
KFPRI = KFPlayerReplicationInfo( PlayerReplicationInfo );
|
||||||
if (Info != CharacterArch)
|
if (Info != CharacterArch)
|
||||||
{
|
{
|
||||||
// Set Family Info
|
// Set Family Info
|
||||||
|
@ -545,30 +545,30 @@ function AddMutator(Mutator M)
|
|||||||
|
|
||||||
function bool IsFromMod(Object O)
|
function bool IsFromMod(Object O)
|
||||||
{
|
{
|
||||||
local string PackageName;
|
local string PackageName;
|
||||||
|
|
||||||
if( O == None )
|
if( O == None )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
PackageName = string(O.GetPackageName());
|
PackageName = string(O.GetPackageName());
|
||||||
if( Len(PackageName)>1 && InStr(Caps(PackageName), "KF") == 0)
|
if( Len(PackageName)>1 && InStr(Caps(PackageName), "KF") == 0)
|
||||||
{
|
{
|
||||||
PackageName = string(O);
|
PackageName = string(O);
|
||||||
if( Len(PackageName)>1 && InStr(Caps(PackageName), "KF") == 0)
|
if( Len(PackageName)>1 && InStr(Caps(PackageName), "KF") == 0)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ScoreKill(Controller Killer, Controller Killed)
|
function ScoreKill(Controller Killer, Controller Killed)
|
||||||
{
|
{
|
||||||
local KFPawn_Monster KFM;
|
local KFPawn_Monster KFM;
|
||||||
local int i, j;
|
local int i, j;
|
||||||
local KFPlayerReplicationInfo DamagerKFPRI;
|
local KFPlayerReplicationInfo DamagerKFPRI;
|
||||||
local float XP;
|
local float XP;
|
||||||
local KFPerk InstigatorPerk;
|
local KFPerk InstigatorPerk;
|
||||||
local bool cont;
|
local bool cont;
|
||||||
|
|
||||||
local KFPlayerController KFPC;
|
local KFPlayerController KFPC;
|
||||||
local ExtPerkManager KillersPerk;
|
local ExtPerkManager KillersPerk;
|
||||||
@ -583,64 +583,64 @@ function ScoreKill(Controller Killer, Controller Killed)
|
|||||||
if( bKillMessages && Killer.PlayerReplicationInfo!=None )
|
if( bKillMessages && Killer.PlayerReplicationInfo!=None )
|
||||||
BroadcastKillMessage(Killed.Pawn,Killer);
|
BroadcastKillMessage(Killed.Pawn,Killer);
|
||||||
if( KFM.DamageHistory.Length > 0 )
|
if( KFM.DamageHistory.Length > 0 )
|
||||||
{
|
{
|
||||||
for( i = 0; i<KFM.DamageHistory.Length; i++ )
|
for( i = 0; i<KFM.DamageHistory.Length; i++ )
|
||||||
{
|
{
|
||||||
DamagerKFPRI = KFPlayerReplicationInfo(KFM.DamageHistory[i].DamagerPRI);
|
DamagerKFPRI = KFPlayerReplicationInfo(KFM.DamageHistory[i].DamagerPRI);
|
||||||
if( DamagerKFPRI != None )
|
if( DamagerKFPRI != None )
|
||||||
{
|
{
|
||||||
if( KFM.DamageHistory[i].DamagePerks.Length <= 0 )
|
if( KFM.DamageHistory[i].DamagePerks.Length <= 0 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cont = true;
|
cont = true;
|
||||||
for(j=0;j<KFM.DamageHistory[i].DamageCausers.Length;j++)
|
for(j=0;j<KFM.DamageHistory[i].DamageCausers.Length;j++)
|
||||||
{
|
{
|
||||||
if(IsFromMod(KFM.DamageHistory[i].DamageCausers[j]) || IsFromMod(KFM.DamageHistory[i].DamageTypes[j]))
|
if(IsFromMod(KFM.DamageHistory[i].DamageCausers[j]) || IsFromMod(KFM.DamageHistory[i].DamageTypes[j]))
|
||||||
{
|
{
|
||||||
cont = false;
|
cont = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(cont && !IsFromMod(KFM))
|
if(cont && !IsFromMod(KFM))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Distribute experience points
|
// Distribute experience points
|
||||||
KFPC = KFPlayerController(DamagerKFPRI.Owner);
|
KFPC = KFPlayerController(DamagerKFPRI.Owner);
|
||||||
if( KFPC != none )
|
if( KFPC != none )
|
||||||
{
|
{
|
||||||
`log("ScoreKill:"@PathName(KFM));
|
`log("ScoreKill:"@PathName(KFM));
|
||||||
|
|
||||||
XP = 0;
|
XP = 0;
|
||||||
for(j=0;j<CustomZedXPArray.Length;j++)
|
for(j=0;j<CustomZedXPArray.Length;j++)
|
||||||
{
|
{
|
||||||
if(KFM.Class == CustomZedXPArray[j].zedclass)
|
if(KFM.Class == CustomZedXPArray[j].zedclass)
|
||||||
{
|
{
|
||||||
XP = CustomZedXPArray[j].XPValues[MyKFGI.GameDifficulty];
|
XP = CustomZedXPArray[j].XPValues[MyKFGI.GameDifficulty];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(XP == 0)
|
if(XP == 0)
|
||||||
XP = KFM.static.GetXPValue(MyKFGI.GameDifficulty);
|
XP = KFM.static.GetXPValue(MyKFGI.GameDifficulty);
|
||||||
|
|
||||||
InstigatorPerk = KFPC.GetPerk();
|
InstigatorPerk = KFPC.GetPerk();
|
||||||
if( InstigatorPerk.ShouldGetAllTheXP() )
|
if( InstigatorPerk.ShouldGetAllTheXP() )
|
||||||
{
|
{
|
||||||
KFPC.OnPlayerXPAdded(XP, InstigatorPerk.Class);
|
KFPC.OnPlayerXPAdded(XP, InstigatorPerk.Class);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
XP /= KFM.DamageHistory[i].DamagePerks.Length;
|
XP /= KFM.DamageHistory[i].DamagePerks.Length;
|
||||||
|
|
||||||
for( j = 0; j < KFM.DamageHistory[i].DamagePerks.Length; j++ )
|
for( j = 0; j < KFM.DamageHistory[i].DamagePerks.Length; j++ )
|
||||||
{
|
{
|
||||||
KFPC.OnPlayerXPAdded(FCeil(XP), KFM.DamageHistory[i].DamagePerks[j]);
|
KFPC.OnPlayerXPAdded(FCeil(XP), KFM.DamageHistory[i].DamagePerks[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( MyKFGI != None && MyKFGI.IsZedTimeActive() && KFPawn_Monster(Killed.Pawn) != None )
|
if ( MyKFGI != None && MyKFGI.IsZedTimeActive() && KFPawn_Monster(Killed.Pawn) != None )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user