style: brackets
This commit is contained in:
parent
63b031b111
commit
ee260f7a10
@ -24,10 +24,10 @@ function DoAutoPurchase()
|
|||||||
GetTraderItems();
|
GetTraderItems();
|
||||||
EP = GetExtPerk();
|
EP = GetExtPerk();
|
||||||
|
|
||||||
if( EP==None || EP.AutoBuyLoadOutPath.length == 0)
|
if(EP==None || EP.AutoBuyLoadOutPath.length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for( i = 0; i<EP.AutoBuyLoadOutPath.length; i++ )
|
for(i = 0; i<EP.AutoBuyLoadOutPath.length; i++)
|
||||||
{
|
{
|
||||||
ItemIndex = TraderItems.SaleItems.Find('WeaponDef', EP.AutoBuyLoadOutPath[i]);
|
ItemIndex = TraderItems.SaleItems.Find('WeaponDef', EP.AutoBuyLoadOutPath[i]);
|
||||||
if(ItemIndex != INDEX_NONE)
|
if(ItemIndex != INDEX_NONE)
|
||||||
@ -38,7 +38,7 @@ function DoAutoPurchase()
|
|||||||
|
|
||||||
TopTierWeapon = GetTopTierWeapon(OnPerkWeapons);
|
TopTierWeapon = GetTopTierWeapon(OnPerkWeapons);
|
||||||
//can I afford my top teir without selling my current weapon?
|
//can I afford my top teir without selling my current weapon?
|
||||||
if(!DoIOwnThisWeapon(TopTierWeapon) && GetCanAfford( GetAdjustedBuyPriceFor(TopTierWeapon) + DoshBuffer ) && CanCarry( TopTierWeapon ) )
|
if(!DoIOwnThisWeapon(TopTierWeapon) && GetCanAfford(GetAdjustedBuyPriceFor(TopTierWeapon) + DoshBuffer) && CanCarry(TopTierWeapon))
|
||||||
{
|
{
|
||||||
bUpgradeSuccess = AttemptUpgrade(TotalDosh, OnPerkWeapons, true);
|
bUpgradeSuccess = AttemptUpgrade(TotalDosh, OnPerkWeapons, true);
|
||||||
}
|
}
|
||||||
@ -80,7 +80,7 @@ function DoAutoPurchase()
|
|||||||
|
|
||||||
if(MyGFxHUD != none)
|
if(MyGFxHUD != none)
|
||||||
{
|
{
|
||||||
MyGFxHUD.ShowNonCriticalMessage( class'KFCommon_LocalizedStrings'.default.AutoTradeCompleteString$AutoFillMessageString );
|
MyGFxHUD.ShowNonCriticalMessage(class'KFCommon_LocalizedStrings'.default.AutoTradeCompleteString$AutoFillMessageString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,11 +90,11 @@ function SellOnPerkWeapons()
|
|||||||
local class<KFPerk> Perk;
|
local class<KFPerk> Perk;
|
||||||
|
|
||||||
Perk = GetBasePerk();
|
Perk = GetBasePerk();
|
||||||
if( Perk!=None )
|
if(Perk!=None)
|
||||||
{
|
{
|
||||||
for (i = 0; i < OwnedItemList.length; i++)
|
for (i = 0; i < OwnedItemList.length; i++)
|
||||||
{
|
{
|
||||||
if( OwnedItemList[i].DefaultItem.AssociatedPerkClasses.Find(Perk)!=INDEX_NONE && OwnedItemList[i].DefaultItem.BlocksRequired != -1)
|
if(OwnedItemList[i].DefaultItem.AssociatedPerkClasses.Find(Perk)!=INDEX_NONE && OwnedItemList[i].DefaultItem.BlocksRequired != -1)
|
||||||
{
|
{
|
||||||
SellWeapon(OwnedItemList[i], i);
|
SellWeapon(OwnedItemList[i], i);
|
||||||
i=-1;
|
i=-1;
|
||||||
@ -112,7 +112,7 @@ function SellOffPerkWeapons()
|
|||||||
|
|
||||||
for (i = 0; i < OwnedItemList.length; i++)
|
for (i = 0; i < OwnedItemList.length; i++)
|
||||||
{
|
{
|
||||||
if( OwnedItemList[i].DefaultItem.AssociatedPerkClasses.Find(EP.BasePerk)==INDEX_NONE && OwnedItemList[i].DefaultItem.BlocksRequired != -1 && OwnedItemList[i].SellPrice != 0 )
|
if(OwnedItemList[i].DefaultItem.AssociatedPerkClasses.Find(EP.BasePerk)==INDEX_NONE && OwnedItemList[i].DefaultItem.BlocksRequired != -1 && OwnedItemList[i].SellPrice != 0)
|
||||||
{
|
{
|
||||||
if(EP.AutoBuyLoadOutPath.Find(OwnedItemList[i].DefaultItem.WeaponDef) == INDEX_NONE)
|
if(EP.AutoBuyLoadOutPath.Find(OwnedItemList[i].DefaultItem.WeaponDef) == INDEX_NONE)
|
||||||
{
|
{
|
||||||
@ -133,10 +133,10 @@ function InitializeOwnedItemList()
|
|||||||
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;
|
||||||
@ -153,13 +153,13 @@ function InitializeOwnedItemList()
|
|||||||
// @temp: fill in stuff that is normally serialized in the archetype
|
// @temp: fill in stuff that is normally serialized in the archetype
|
||||||
GrenadeItem.DefaultItem.AssociatedPerkClasses[0] = CurrentPerk.Class;
|
GrenadeItem.DefaultItem.AssociatedPerkClasses[0] = CurrentPerk.Class;
|
||||||
|
|
||||||
for ( Inv = MyKFIM.InventoryChain; Inv != none; Inv = Inv.Inventory )
|
for (Inv = MyKFIM.InventoryChain; Inv != none; Inv = Inv.Inventory)
|
||||||
{
|
{
|
||||||
KFW = KFWeapon( Inv );
|
KFW = KFWeapon(Inv);
|
||||||
if( KFW != none )
|
if(KFW != none)
|
||||||
{
|
{
|
||||||
// Set the weapon information and add it to the OwnedItemList
|
// Set the weapon information and add it to the OwnedItemList
|
||||||
SetWeaponInformation( KFW );
|
SetWeaponInformation(KFW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ function InitializeOwnedItemList()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function int AddItemByPriority( out SItemInformation WeaponInfo )
|
function int AddItemByPriority(out SItemInformation WeaponInfo)
|
||||||
{
|
{
|
||||||
local byte i;
|
local byte i;
|
||||||
local byte WeaponGroup, WeaponPriority;
|
local byte WeaponGroup, WeaponPriority;
|
||||||
@ -183,23 +183,23 @@ function int AddItemByPriority( out SItemInformation WeaponInfo )
|
|||||||
WeaponGroup = WeaponInfo.DefaultItem.InventoryGroup;
|
WeaponGroup = WeaponInfo.DefaultItem.InventoryGroup;
|
||||||
WeaponPriority = WeaponInfo.DefaultItem.GroupPriority;
|
WeaponPriority = WeaponInfo.DefaultItem.GroupPriority;
|
||||||
|
|
||||||
for( i = 0; i < OwnedItemList.length; i++ )
|
for(i = 0; i < OwnedItemList.length; i++)
|
||||||
{
|
{
|
||||||
// If the weapon belongs in the group prior to the current weapon, we've found the spot
|
// If the weapon belongs in the group prior to the current weapon, we've found the spot
|
||||||
if( WeaponGroup < OwnedItemList[i].DefaultItem.InventoryGroup )
|
if(WeaponGroup < OwnedItemList[i].DefaultItem.InventoryGroup)
|
||||||
{
|
{
|
||||||
BestIndex = i;
|
BestIndex = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if( WeaponGroup == OwnedItemList[i].DefaultItem.InventoryGroup )
|
else if(WeaponGroup == OwnedItemList[i].DefaultItem.InventoryGroup)
|
||||||
{
|
{
|
||||||
if( WeaponPriority > OwnedItemList[i].DefaultItem.GroupPriority )
|
if(WeaponPriority > OwnedItemList[i].DefaultItem.GroupPriority)
|
||||||
{
|
{
|
||||||
// if the weapon is in the same group but has a higher priority, we've found the spot
|
// if the weapon is in the same group but has a higher priority, we've found the spot
|
||||||
BestIndex = i;
|
BestIndex = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if( WeaponPriority == OwnedItemList[i].DefaultItem.GroupPriority && WeaponInfo.DefaultItem.AssociatedPerkClasses.Find(Perk)>=0 )
|
else if(WeaponPriority == OwnedItemList[i].DefaultItem.GroupPriority && WeaponInfo.DefaultItem.AssociatedPerkClasses.Find(Perk)>=0)
|
||||||
{
|
{
|
||||||
// if the weapons have the same priority give the slot to the on perk weapon
|
// if the weapons have the same priority give the slot to the on perk weapon
|
||||||
BestIndex = i;
|
BestIndex = i;
|
||||||
@ -212,17 +212,17 @@ function int AddItemByPriority( out SItemInformation WeaponInfo )
|
|||||||
BestIndex = i + 1;
|
BestIndex = i + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OwnedItemList.InsertItem( BestIndex, WeaponInfo );
|
OwnedItemList.InsertItem(BestIndex, WeaponInfo);
|
||||||
|
|
||||||
// Add secondary ammo immediately after the main weapon
|
// Add secondary ammo immediately after the main weapon
|
||||||
if( WeaponInfo.DefaultItem.WeaponDef.static.UsesSecondaryAmmo() )
|
if(WeaponInfo.DefaultItem.WeaponDef.static.UsesSecondaryAmmo())
|
||||||
{
|
{
|
||||||
WeaponInfo.bIsSecondaryAmmo = true;
|
WeaponInfo.bIsSecondaryAmmo = true;
|
||||||
WeaponInfo.SellPrice = 0;
|
WeaponInfo.SellPrice = 0;
|
||||||
OwnedItemList.InsertItem( BestIndex + 1, WeaponInfo );
|
OwnedItemList.InsertItem(BestIndex + 1, WeaponInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( MyGfxManager != none && MyGfxManager.TraderMenu != none )
|
if(MyGfxManager != none && MyGfxManager.TraderMenu != none)
|
||||||
{
|
{
|
||||||
MyGfxManager.TraderMenu.OwnedItemList = OwnedItemList;
|
MyGfxManager.TraderMenu.OwnedItemList = OwnedItemList;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ final function FMyCustomChar LoadData()
|
|||||||
{
|
{
|
||||||
local FMyCustomChar R;
|
local FMyCustomChar R;
|
||||||
|
|
||||||
if( HasInit==0 )
|
if(HasInit==0)
|
||||||
{
|
{
|
||||||
AttachmentMesh0 = 255;
|
AttachmentMesh0 = 255;
|
||||||
AttachmentMesh1 = 255;
|
AttachmentMesh1 = 255;
|
||||||
@ -27,7 +27,7 @@ final function FMyCustomChar LoadData()
|
|||||||
R.AttachmentSkinIndices[2] = AttachmentSkin2;
|
R.AttachmentSkinIndices[2] = AttachmentSkin2;
|
||||||
return R;
|
return R;
|
||||||
}
|
}
|
||||||
final function SaveData( FMyCustomChar R )
|
final function SaveData(FMyCustomChar R)
|
||||||
{
|
{
|
||||||
HeadMeshIndex = R.HeadMeshIndex;
|
HeadMeshIndex = R.HeadMeshIndex;
|
||||||
HeadSkinIndex = R.HeadSkinIndex;
|
HeadSkinIndex = R.HeadSkinIndex;
|
||||||
|
@ -3,32 +3,32 @@ class ExtCharacterInfo extends Object
|
|||||||
abstract;
|
abstract;
|
||||||
|
|
||||||
// Hack fix for not being able to compile materials in run-time.
|
// Hack fix for not being able to compile materials in run-time.
|
||||||
static final function CloneMIC( MaterialInstanceConstant B )
|
static final function CloneMIC(MaterialInstanceConstant B)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
local MaterialInstanceConstant M;
|
local MaterialInstanceConstant M;
|
||||||
local LinearColor C;
|
local LinearColor C;
|
||||||
|
|
||||||
M = MaterialInstanceConstant(B.Parent);
|
M = MaterialInstanceConstant(B.Parent);
|
||||||
if( M==None )
|
if(M==None)
|
||||||
return;
|
return;
|
||||||
B.SetParent(M.Parent);
|
B.SetParent(M.Parent);
|
||||||
|
|
||||||
for( i=0; i<M.TextureParameterValues.Length; ++i )
|
for(i=0; i<M.TextureParameterValues.Length; ++i)
|
||||||
if( M.TextureParameterValues[i].ParameterValue!=None )
|
if(M.TextureParameterValues[i].ParameterValue!=None)
|
||||||
B.SetTextureParameterValue(M.TextureParameterValues[i].ParameterName,M.TextureParameterValues[i].ParameterValue);
|
B.SetTextureParameterValue(M.TextureParameterValues[i].ParameterName,M.TextureParameterValues[i].ParameterValue);
|
||||||
|
|
||||||
for( i=0; i<M.ScalarParameterValues.Length; ++i )
|
for(i=0; i<M.ScalarParameterValues.Length; ++i)
|
||||||
B.SetScalarParameterValue(M.ScalarParameterValues[i].ParameterName,M.ScalarParameterValues[i].ParameterValue);
|
B.SetScalarParameterValue(M.ScalarParameterValues[i].ParameterName,M.ScalarParameterValues[i].ParameterValue);
|
||||||
|
|
||||||
for( i=0; i<M.VectorParameterValues.Length; ++i )
|
for(i=0; i<M.VectorParameterValues.Length; ++i)
|
||||||
{
|
{
|
||||||
C = M.VectorParameterValues[i].ParameterValue;
|
C = M.VectorParameterValues[i].ParameterValue;
|
||||||
B.SetVectorParameterValue(M.VectorParameterValues[i].ParameterName,C);
|
B.SetVectorParameterValue(M.VectorParameterValues[i].ParameterName,C);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final function Object SafeLoadObject( string S, Class ObjClass )
|
static final function Object SafeLoadObject(string S, Class ObjClass)
|
||||||
{
|
{
|
||||||
local Object O;
|
local Object O;
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ static function InitCharacterMICs(KFCharacterInfo_Human C, KFPawn P, optional bo
|
|||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
if( P.WorldInfo.NetMode == NM_DedicatedServer )
|
if(P.WorldInfo.NetMode == NM_DedicatedServer)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -48,18 +48,18 @@ static function InitCharacterMICs(KFCharacterInfo_Human C, KFPawn P, optional bo
|
|||||||
P.CharacterMICs.Remove(0, P.CharacterMICs.Length);
|
P.CharacterMICs.Remove(0, P.CharacterMICs.Length);
|
||||||
|
|
||||||
// body MIC
|
// body MIC
|
||||||
if ( P.Mesh != None )
|
if (P.Mesh != None)
|
||||||
{
|
{
|
||||||
P.CharacterMICs[0] = P.Mesh.CreateAndSetMaterialInstanceConstant(C.BodyMaterialID);
|
P.CharacterMICs[0] = P.Mesh.CreateAndSetMaterialInstanceConstant(C.BodyMaterialID);
|
||||||
CloneMIC(P.CharacterMICs[0]);
|
CloneMIC(P.CharacterMICs[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// head MIC
|
// head MIC
|
||||||
if( P.ThirdPersonHeadMeshComponent != None )
|
if(P.ThirdPersonHeadMeshComponent != None)
|
||||||
{
|
{
|
||||||
P.CharacterMICs[1] = P.ThirdPersonHeadMeshComponent.CreateAndSetMaterialInstanceConstant(C.HeadMaterialID);
|
P.CharacterMICs[1] = P.ThirdPersonHeadMeshComponent.CreateAndSetMaterialInstanceConstant(C.HeadMaterialID);
|
||||||
|
|
||||||
if ( bMaskHead )
|
if (bMaskHead)
|
||||||
{
|
{
|
||||||
// initial mask for new head MIC (also see ResetHeadMaskParam())
|
// initial mask for new head MIC (also see ResetHeadMaskParam())
|
||||||
P.CharacterMICs[1].SetScalarParameterValue('Scalar_Mask', 1.f);
|
P.CharacterMICs[1].SetScalarParameterValue('Scalar_Mask', 1.f);
|
||||||
@ -67,9 +67,9 @@ static function InitCharacterMICs(KFCharacterInfo_Human C, KFPawn P, optional bo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// attachment MIC
|
// attachment MIC
|
||||||
for( i=0; i < `MAX_COSMETIC_ATTACHMENTS; i++ )
|
for(i=0; i < `MAX_COSMETIC_ATTACHMENTS; i++)
|
||||||
{
|
{
|
||||||
if( P.ThirdPersonAttachments[i] != none )
|
if(P.ThirdPersonAttachments[i] != none)
|
||||||
{
|
{
|
||||||
P.CharacterMICs.AddItem(P.ThirdPersonAttachments[i].CreateAndSetMaterialInstanceConstant(0));
|
P.CharacterMICs.AddItem(P.ThirdPersonAttachments[i].CreateAndSetMaterialInstanceConstant(0));
|
||||||
}
|
}
|
||||||
@ -82,13 +82,13 @@ static function InitCharacterMICs(KFCharacterInfo_Human C, KFPawn P, optional bo
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the pawns character mesh from it's CharacterInfo, and updates instance of player in map if there is one. */
|
/** Sets the pawns character mesh from it's CharacterInfo, and updates instance of player in map if there is one. */
|
||||||
static final function SetCharacterMeshFromArch( KFCharacterInfo_Human C, KFPawn KFP, optional KFPlayerReplicationInfo KFPRI )
|
static final function SetCharacterMeshFromArch(KFCharacterInfo_Human C, KFPawn KFP, optional KFPlayerReplicationInfo KFPRI)
|
||||||
{
|
{
|
||||||
local ExtPlayerReplicationInfo EPRI;
|
local ExtPlayerReplicationInfo EPRI;
|
||||||
local int AttachmentIdx, CosmeticMeshIdx;
|
local int AttachmentIdx, CosmeticMeshIdx;
|
||||||
local bool bMaskHeadMesh, bCustom;
|
local bool bMaskHeadMesh, bCustom;
|
||||||
|
|
||||||
if ( KFPRI == none )
|
if (KFPRI == none)
|
||||||
{
|
{
|
||||||
`Warn("Does not have a KFPRI" @ C);
|
`Warn("Does not have a KFPRI" @ C);
|
||||||
return;
|
return;
|
||||||
@ -111,21 +111,21 @@ static final function SetCharacterMeshFromArch( KFCharacterInfo_Human C, KFPawn
|
|||||||
KFPRI);
|
KFPRI);
|
||||||
|
|
||||||
// skip dedicated for purely cosmetic stuff
|
// skip dedicated for purely cosmetic stuff
|
||||||
if ( KFP.WorldInfo.NetMode != NM_DedicatedServer )
|
if (KFP.WorldInfo.NetMode != NM_DedicatedServer)
|
||||||
{
|
{
|
||||||
// Must clear all attachments before trying to attach new ones,
|
// Must clear all attachments before trying to attach new ones,
|
||||||
// otherwise we might accidentally remove things we're not supposed to
|
// otherwise we might accidentally remove things we're not supposed to
|
||||||
for( AttachmentIdx=0; AttachmentIdx < `MAX_COSMETIC_ATTACHMENTS; AttachmentIdx++ )
|
for(AttachmentIdx=0; AttachmentIdx < `MAX_COSMETIC_ATTACHMENTS; AttachmentIdx++)
|
||||||
{
|
{
|
||||||
// Clear any previous attachments from other characters
|
// Clear any previous attachments from other characters
|
||||||
C.DetachAttachment(AttachmentIdx, KFP);
|
C.DetachAttachment(AttachmentIdx, KFP);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cosmetic attachment mesh & skin. Index of 255 implies don't use any attachments (default)
|
// Cosmetic attachment mesh & skin. Index of 255 implies don't use any attachments (default)
|
||||||
for( AttachmentIdx=0; AttachmentIdx < `MAX_COSMETIC_ATTACHMENTS; AttachmentIdx++ )
|
for(AttachmentIdx=0; AttachmentIdx < `MAX_COSMETIC_ATTACHMENTS; AttachmentIdx++)
|
||||||
{
|
{
|
||||||
CosmeticMeshIdx = bCustom ? EPRI.CustomCharacter.AttachmentMeshIndices[AttachmentIdx] : KFPRI.RepCustomizationInfo.AttachmentMeshIndices[AttachmentIdx];
|
CosmeticMeshIdx = bCustom ? EPRI.CustomCharacter.AttachmentMeshIndices[AttachmentIdx] : KFPRI.RepCustomizationInfo.AttachmentMeshIndices[AttachmentIdx];
|
||||||
if ( CosmeticMeshIdx != `CLEARED_ATTACHMENT_INDEX && CosmeticMeshIdx != INDEX_NONE )
|
if (CosmeticMeshIdx != `CLEARED_ATTACHMENT_INDEX && CosmeticMeshIdx != INDEX_NONE)
|
||||||
{
|
{
|
||||||
bMaskHeadMesh = bMaskHeadMesh || C.CosmeticVariants[CosmeticMeshIdx].bMaskHeadMesh;
|
bMaskHeadMesh = bMaskHeadMesh || C.CosmeticVariants[CosmeticMeshIdx].bMaskHeadMesh;
|
||||||
|
|
||||||
@ -142,11 +142,11 @@ static final function SetCharacterMeshFromArch( KFCharacterInfo_Human C, KFPawn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final function SetBodyMeshAndSkin( KFCharacterInfo_Human C,
|
static final function SetBodyMeshAndSkin(KFCharacterInfo_Human C,
|
||||||
byte CurrentBodyMeshIndex,
|
byte CurrentBodyMeshIndex,
|
||||||
byte CurrentBodySkinIndex,
|
byte CurrentBodySkinIndex,
|
||||||
KFPawn KFP,
|
KFPawn KFP,
|
||||||
KFPlayerReplicationInfo KFPRI )
|
KFPlayerReplicationInfo KFPRI)
|
||||||
{
|
{
|
||||||
local string CharBodyMeshName;
|
local string CharBodyMeshName;
|
||||||
local SkeletalMesh CharBodyMesh;
|
local SkeletalMesh CharBodyMesh;
|
||||||
@ -159,7 +159,7 @@ static final function SetBodyMeshAndSkin( KFCharacterInfo_Human C,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Character Mesh
|
// Character Mesh
|
||||||
if( C.BodyVariants.length > 0 )
|
if(C.BodyVariants.length > 0)
|
||||||
{
|
{
|
||||||
// Assign a skin to the body mesh as a material override
|
// Assign a skin to the body mesh as a material override
|
||||||
CurrentBodyMeshIndex = (CurrentBodyMeshIndex < C.BodyVariants.length) ? CurrentBodyMeshIndex : 0;
|
CurrentBodyMeshIndex = (CurrentBodyMeshIndex < C.BodyVariants.length) ? CurrentBodyMeshIndex : 0;
|
||||||
@ -176,7 +176,7 @@ static final function SetBodyMeshAndSkin( KFCharacterInfo_Human C,
|
|||||||
CharBodyMesh = SkeletalMesh(SafeLoadObject(CharBodyMeshName, class'SkeletalMesh'));
|
CharBodyMesh = SkeletalMesh(SafeLoadObject(CharBodyMeshName, class'SkeletalMesh'));
|
||||||
|
|
||||||
// Assign the body mesh to the pawn
|
// Assign the body mesh to the pawn
|
||||||
if ( CharBodyMesh != KFP.Mesh.SkeletalMesh )
|
if (CharBodyMesh != KFP.Mesh.SkeletalMesh)
|
||||||
{
|
{
|
||||||
KFP.Mesh.SetSkeletalMesh(CharBodyMesh);
|
KFP.Mesh.SetSkeletalMesh(CharBodyMesh);
|
||||||
KFP.OnCharacterMeshChanged();
|
KFP.OnCharacterMeshChanged();
|
||||||
@ -193,13 +193,13 @@ static final function SetBodyMeshAndSkin( KFCharacterInfo_Human C,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final function SetBodySkinMaterial( KFCharacterInfo_Human C, OutfitVariants CurrentVariant, byte NewSkinIndex, KFPawn KFP)
|
static final function SetBodySkinMaterial(KFCharacterInfo_Human C, OutfitVariants CurrentVariant, byte NewSkinIndex, KFPawn KFP)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
if (KFP.WorldInfo.NetMode != NM_DedicatedServer)
|
if (KFP.WorldInfo.NetMode != NM_DedicatedServer)
|
||||||
{
|
{
|
||||||
if( CurrentVariant.SkinVariations.length > 0 )
|
if(CurrentVariant.SkinVariations.length > 0)
|
||||||
{
|
{
|
||||||
// Assign a skin to the body mesh as a material override
|
// Assign a skin to the body mesh as a material override
|
||||||
NewSkinIndex = (NewSkinIndex < CurrentVariant.SkinVariations.length) ? NewSkinIndex : 0;
|
NewSkinIndex = (NewSkinIndex < CurrentVariant.SkinVariations.length) ? NewSkinIndex : 0;
|
||||||
@ -208,7 +208,7 @@ static final function SetBodySkinMaterial( KFCharacterInfo_Human C, OutfitVarian
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Use material specified in the mesh asset
|
// Use material specified in the mesh asset
|
||||||
for( i=0; i<KFP.Mesh.GetNumElements(); i++ )
|
for(i=0; i<KFP.Mesh.GetNumElements(); i++)
|
||||||
{
|
{
|
||||||
KFP.Mesh.SetMaterial(i, none);
|
KFP.Mesh.SetMaterial(i, none);
|
||||||
}
|
}
|
||||||
@ -216,13 +216,13 @@ static final function SetBodySkinMaterial( KFCharacterInfo_Human C, OutfitVarian
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final function SetHeadSkinMaterial( KFCharacterInfo_Human C, OutfitVariants CurrentVariant, byte NewSkinIndex, KFPawn KFP )
|
static final function SetHeadSkinMaterial(KFCharacterInfo_Human C, OutfitVariants CurrentVariant, byte NewSkinIndex, KFPawn KFP)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
if (KFP.WorldInfo.NetMode != NM_DedicatedServer)
|
if (KFP.WorldInfo.NetMode != NM_DedicatedServer)
|
||||||
{
|
{
|
||||||
if( CurrentVariant.SkinVariations.length > 0 )
|
if(CurrentVariant.SkinVariations.length > 0)
|
||||||
{
|
{
|
||||||
// Assign a skin to the body mesh as a material override
|
// Assign a skin to the body mesh as a material override
|
||||||
NewSkinIndex = (NewSkinIndex < CurrentVariant.SkinVariations.length) ? NewSkinIndex : 0;
|
NewSkinIndex = (NewSkinIndex < CurrentVariant.SkinVariations.length) ? NewSkinIndex : 0;
|
||||||
@ -231,7 +231,7 @@ static final function SetHeadSkinMaterial( KFCharacterInfo_Human C, OutfitVarian
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Use material specified in the mesh asset
|
// Use material specified in the mesh asset
|
||||||
for( i=0; i<KFP.ThirdPersonHeadMeshComponent.GetNumElements(); i++ )
|
for(i=0; i<KFP.ThirdPersonHeadMeshComponent.GetNumElements(); i++)
|
||||||
{
|
{
|
||||||
KFP.ThirdPersonHeadMeshComponent.SetMaterial(i, none);
|
KFP.ThirdPersonHeadMeshComponent.SetMaterial(i, none);
|
||||||
}
|
}
|
||||||
@ -239,16 +239,16 @@ static final function SetHeadSkinMaterial( KFCharacterInfo_Human C, OutfitVarian
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final function SetHeadMeshAndSkin( KFCharacterInfo_Human C,
|
static final function SetHeadMeshAndSkin(KFCharacterInfo_Human C,
|
||||||
byte CurrentHeadMeshIndex,
|
byte CurrentHeadMeshIndex,
|
||||||
byte CurrentHeadSkinIndex,
|
byte CurrentHeadSkinIndex,
|
||||||
KFPawn KFP,
|
KFPawn KFP,
|
||||||
KFPlayerReplicationInfo KFPRI )
|
KFPlayerReplicationInfo KFPRI)
|
||||||
{
|
{
|
||||||
local string CharHeadMeshName;
|
local string CharHeadMeshName;
|
||||||
local SkeletalMesh CharHeadMesh;
|
local SkeletalMesh CharHeadMesh;
|
||||||
|
|
||||||
if ( C.HeadVariants.length > 0 )
|
if (C.HeadVariants.length > 0)
|
||||||
{
|
{
|
||||||
CurrentHeadMeshIndex = (CurrentHeadMeshIndex < C.HeadVariants.length) ? CurrentHeadMeshIndex : 0;
|
CurrentHeadMeshIndex = (CurrentHeadMeshIndex < C.HeadVariants.length) ? CurrentHeadMeshIndex : 0;
|
||||||
|
|
||||||
@ -277,7 +277,7 @@ static final function SetHeadMeshAndSkin( KFCharacterInfo_Human C,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final function SetAttachmentSkinMaterial( KFCharacterInfo_Human C,
|
static final function SetAttachmentSkinMaterial(KFCharacterInfo_Human C,
|
||||||
int PawnAttachmentIndex,
|
int PawnAttachmentIndex,
|
||||||
const out AttachmentVariants CurrentVariant,
|
const out AttachmentVariants CurrentVariant,
|
||||||
byte NewSkinIndex,
|
byte NewSkinIndex,
|
||||||
@ -287,10 +287,10 @@ static final function SetAttachmentSkinMaterial( KFCharacterInfo_Human C,
|
|||||||
local int i;
|
local int i;
|
||||||
if (KFP.WorldInfo.NetMode != NM_DedicatedServer)
|
if (KFP.WorldInfo.NetMode != NM_DedicatedServer)
|
||||||
{
|
{
|
||||||
if( CurrentVariant.AttachmentItem.SkinVariations.length > 0 )
|
if(CurrentVariant.AttachmentItem.SkinVariations.length > 0)
|
||||||
{
|
{
|
||||||
// Assign a skin to the attachment mesh as a material override
|
// Assign a skin to the attachment mesh as a material override
|
||||||
if ( NewSkinIndex < CurrentVariant.AttachmentItem.SkinVariations.length )
|
if (NewSkinIndex < CurrentVariant.AttachmentItem.SkinVariations.length)
|
||||||
{
|
{
|
||||||
if (bIsFirstPerson)
|
if (bIsFirstPerson)
|
||||||
{
|
{
|
||||||
@ -329,7 +329,7 @@ static final function SetAttachmentSkinMaterial( KFCharacterInfo_Human C,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Use material specified in the mesh asset
|
// Use material specified in the mesh asset
|
||||||
for( i=0; i < KFP.ThirdPersonAttachments[PawnAttachmentIndex].GetNumElements(); i++ )
|
for(i=0; i < KFP.ThirdPersonAttachments[PawnAttachmentIndex].GetNumElements(); i++)
|
||||||
{
|
{
|
||||||
KFP.ThirdPersonAttachments[PawnAttachmentIndex].SetMaterial(i, none);
|
KFP.ThirdPersonAttachments[PawnAttachmentIndex].SetMaterial(i, none);
|
||||||
}
|
}
|
||||||
@ -338,12 +338,12 @@ static final function SetAttachmentSkinMaterial( KFCharacterInfo_Human C,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final function SetAttachmentMeshAndSkin( KFCharacterInfo_Human C,
|
static final function SetAttachmentMeshAndSkin(KFCharacterInfo_Human C,
|
||||||
int CurrentAttachmentMeshIndex,
|
int CurrentAttachmentMeshIndex,
|
||||||
int CurrentAttachmentSkinIndex,
|
int CurrentAttachmentSkinIndex,
|
||||||
KFPawn KFP,
|
KFPawn KFP,
|
||||||
KFPlayerReplicationInfo KFPRI,
|
KFPlayerReplicationInfo KFPRI,
|
||||||
optional bool bIsFirstPerson )
|
optional bool bIsFirstPerson)
|
||||||
{
|
{
|
||||||
local string CharAttachmentMeshName;
|
local string CharAttachmentMeshName;
|
||||||
local name CharAttachmentSocketName;
|
local name CharAttachmentSocketName;
|
||||||
@ -367,8 +367,8 @@ static final function SetAttachmentMeshAndSkin( KFCharacterInfo_Human C,
|
|||||||
|
|
||||||
// Since cosmetic attachments are optional, do not choose index 0 if none is
|
// Since cosmetic attachments are optional, do not choose index 0 if none is
|
||||||
// specified unlike the the head and body meshes
|
// specified unlike the the head and body meshes
|
||||||
if ( C.CosmeticVariants.Length > 0 &&
|
if (C.CosmeticVariants.Length > 0 &&
|
||||||
CurrentAttachmentMeshIndex < C.CosmeticVariants.Length )
|
CurrentAttachmentMeshIndex < C.CosmeticVariants.Length)
|
||||||
{
|
{
|
||||||
if (KFPRI.StartLoadCosmeticContent(C, ECOSMETICTYPE_Attachment, CurrentAttachmentMeshIndex))
|
if (KFPRI.StartLoadCosmeticContent(C, ECOSMETICTYPE_Attachment, CurrentAttachmentMeshIndex))
|
||||||
{
|
{
|
||||||
@ -382,9 +382,9 @@ static final function SetAttachmentMeshAndSkin( KFCharacterInfo_Human C,
|
|||||||
|
|
||||||
// If previously attached and we could have changed outfits (e.g. local player UI) then re-validate
|
// If previously attached and we could have changed outfits (e.g. local player UI) then re-validate
|
||||||
// required skeletal mesh socket. Must be after body mesh DLO, but before AttachComponent.
|
// required skeletal mesh socket. Must be after body mesh DLO, but before AttachComponent.
|
||||||
if ( KFP.IsLocallyControlled() )
|
if (KFP.IsLocallyControlled())
|
||||||
{
|
{
|
||||||
if ( CharAttachmentSocketName != '' && KFP.Mesh.GetSocketByName(CharAttachmentSocketName) == None )
|
if (CharAttachmentSocketName != '' && KFP.Mesh.GetSocketByName(CharAttachmentSocketName) == None)
|
||||||
{
|
{
|
||||||
C.RemoveAttachmentMeshAndSkin(AttachmentSlotIndex, KFP, KFPRI);
|
C.RemoveAttachmentMeshAndSkin(AttachmentSlotIndex, KFP, KFPRI);
|
||||||
return;
|
return;
|
||||||
@ -418,7 +418,7 @@ static final function SetAttachmentMeshAndSkin( KFCharacterInfo_Human C,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Treat `CLEARED_ATTACHMENT_INDEX as special value (for client detachment)
|
// Treat `CLEARED_ATTACHMENT_INDEX as special value (for client detachment)
|
||||||
if( CurrentAttachmentMeshIndex == `CLEARED_ATTACHMENT_INDEX )
|
if(CurrentAttachmentMeshIndex == `CLEARED_ATTACHMENT_INDEX)
|
||||||
{
|
{
|
||||||
C.RemoveAttachmentMeshAndSkin(AttachmentSlotIndex, KFP, KFPRI);
|
C.RemoveAttachmentMeshAndSkin(AttachmentSlotIndex, KFP, KFPRI);
|
||||||
}
|
}
|
||||||
@ -547,45 +547,45 @@ static final function SetAttachmentMesh(KFCharacterInfo_Human C, int CurrentAtta
|
|||||||
* Removes any attachments that exist in the same socket or have overriding cases
|
* Removes any attachments that exist in the same socket or have overriding cases
|
||||||
* Network: Local Player
|
* Network: Local Player
|
||||||
*/
|
*/
|
||||||
static final function DetachConflictingAttachments( KFCharacterInfo_Human C, int NewAttachmentMeshIndex, KFPawn KFP, optional KFPlayerReplicationInfo KFPRI)
|
static final function DetachConflictingAttachments(KFCharacterInfo_Human C, int NewAttachmentMeshIndex, KFPawn KFP, optional KFPlayerReplicationInfo KFPRI)
|
||||||
{
|
{
|
||||||
local name NewAttachmentSocketName;
|
local name NewAttachmentSocketName;
|
||||||
local int i, CurrentAttachmentIdx;
|
local int i, CurrentAttachmentIdx;
|
||||||
local ExtPlayerReplicationInfo EPRI;
|
local ExtPlayerReplicationInfo EPRI;
|
||||||
|
|
||||||
EPRI = ExtPlayerReplicationInfo(KFPRI);
|
EPRI = ExtPlayerReplicationInfo(KFPRI);
|
||||||
if ( EPRI==none || !EPRI.UsesCustomChar() )
|
if (EPRI==none || !EPRI.UsesCustomChar())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( C.CosmeticVariants.length > 0 &&
|
if (C.CosmeticVariants.length > 0 &&
|
||||||
NewAttachmentMeshIndex < C.CosmeticVariants.length )
|
NewAttachmentMeshIndex < C.CosmeticVariants.length)
|
||||||
{
|
{
|
||||||
// The socket that this attachment requires
|
// The socket that this attachment requires
|
||||||
NewAttachmentSocketName = C.CosmeticVariants[NewAttachmentMeshIndex].AttachmentItem.SocketName;
|
NewAttachmentSocketName = C.CosmeticVariants[NewAttachmentMeshIndex].AttachmentItem.SocketName;
|
||||||
|
|
||||||
for( i=0; i < `MAX_COSMETIC_ATTACHMENTS; i++ )
|
for(i=0; i < `MAX_COSMETIC_ATTACHMENTS; i++)
|
||||||
{
|
{
|
||||||
CurrentAttachmentIdx = EPRI.CustomCharacter.AttachmentMeshIndices[i];
|
CurrentAttachmentIdx = EPRI.CustomCharacter.AttachmentMeshIndices[i];
|
||||||
if ( CurrentAttachmentIdx == `CLEARED_ATTACHMENT_INDEX )
|
if (CurrentAttachmentIdx == `CLEARED_ATTACHMENT_INDEX)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Remove the object if it is taking up our desired slot
|
// Remove the object if it is taking up our desired slot
|
||||||
if( KFP.ThirdPersonAttachmentSocketNames[i] != '' &&
|
if(KFP.ThirdPersonAttachmentSocketNames[i] != '' &&
|
||||||
KFP.ThirdPersonAttachmentSocketNames[i] == NewAttachmentSocketName )
|
KFP.ThirdPersonAttachmentSocketNames[i] == NewAttachmentSocketName)
|
||||||
{
|
{
|
||||||
C.RemoveAttachmentMeshAndSkin(i, KFP, KFPRI);
|
C.RemoveAttachmentMeshAndSkin(i, KFP, KFPRI);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the object if it cannot exist at the same time as another equipped item
|
// Remove the object if it cannot exist at the same time as another equipped item
|
||||||
if( C.GetOverrideCase(CurrentAttachmentIdx, NewAttachmentMeshIndex) )
|
if(C.GetOverrideCase(CurrentAttachmentIdx, NewAttachmentMeshIndex))
|
||||||
{
|
{
|
||||||
C.RemoveAttachmentMeshAndSkin(i, KFP, KFPRI);
|
C.RemoveAttachmentMeshAndSkin(i, KFP, KFPRI);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check inverse override
|
// Check inverse override
|
||||||
if( C.GetOverrideCase(NewAttachmentMeshIndex, CurrentAttachmentIdx) )
|
if(C.GetOverrideCase(NewAttachmentMeshIndex, CurrentAttachmentIdx))
|
||||||
{
|
{
|
||||||
C.RemoveAttachmentMeshAndSkin(i, KFP, KFPRI);
|
C.RemoveAttachmentMeshAndSkin(i, KFP, KFPRI);
|
||||||
continue;
|
continue;
|
||||||
@ -595,14 +595,14 @@ static final function DetachConflictingAttachments( KFCharacterInfo_Human C, int
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Assign an arm mesh and material to this pawn */
|
/** Assign an arm mesh and material to this pawn */
|
||||||
static final function SetFirstPersonArmsFromArch( KFCharacterInfo_Human C, KFPawn KFP, optional KFPlayerReplicationInfo KFPRI )
|
static final function SetFirstPersonArmsFromArch(KFCharacterInfo_Human C, KFPawn KFP, optional KFPlayerReplicationInfo KFPRI)
|
||||||
{
|
{
|
||||||
local MaterialInstanceConstant M;
|
local MaterialInstanceConstant M;
|
||||||
local ExtPlayerReplicationInfo EPRI;
|
local ExtPlayerReplicationInfo EPRI;
|
||||||
local bool bCustom;
|
local bool bCustom;
|
||||||
local int AttachmentIdx, CosmeticMeshIdx;
|
local int AttachmentIdx, CosmeticMeshIdx;
|
||||||
|
|
||||||
if ( KFPRI == none )
|
if (KFPRI == none)
|
||||||
{
|
{
|
||||||
`Warn("Does not have a KFPRI" @ C);
|
`Warn("Does not have a KFPRI" @ C);
|
||||||
return;
|
return;
|
||||||
@ -633,7 +633,7 @@ static final function SetFirstPersonArmsFromArch( KFCharacterInfo_Human C, KFPaw
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Hack fix for a material bug on KF2
|
// Hack fix for a material bug on KF2
|
||||||
if( bCustom && KFP.ArmsMesh.SkeletalMesh!=None && KFP.ArmsMesh.GetMaterial(0)!=None )
|
if(bCustom && KFP.ArmsMesh.SkeletalMesh!=None && KFP.ArmsMesh.GetMaterial(0)!=None)
|
||||||
{
|
{
|
||||||
M = KFP.ArmsMesh.CreateAndSetMaterialInstanceConstant(0);
|
M = KFP.ArmsMesh.CreateAndSetMaterialInstanceConstant(0);
|
||||||
CloneMIC(M);
|
CloneMIC(M);
|
||||||
@ -650,7 +650,7 @@ static function int GetAttachmentSlotIndex(
|
|||||||
local ExtPlayerReplicationInfo EPRI;
|
local ExtPlayerReplicationInfo EPRI;
|
||||||
local bool bCustom;
|
local bool bCustom;
|
||||||
|
|
||||||
if( KFPRI == None )
|
if(KFPRI == None)
|
||||||
{
|
{
|
||||||
`warn("GetAttachmentSlotIndex - NO KFPRI");
|
`warn("GetAttachmentSlotIndex - NO KFPRI");
|
||||||
return INDEX_NONE;
|
return INDEX_NONE;
|
||||||
@ -660,10 +660,10 @@ static function int GetAttachmentSlotIndex(
|
|||||||
bCustom = (EPRI!=None ? EPRI.UsesCustomChar() : false);
|
bCustom = (EPRI!=None ? EPRI.UsesCustomChar() : false);
|
||||||
|
|
||||||
// Return the next available attachment index or the index that matches this mesh
|
// Return the next available attachment index or the index that matches this mesh
|
||||||
for( AttachmentIdx = 0; AttachmentIdx < `MAX_COSMETIC_ATTACHMENTS; AttachmentIdx++ )
|
for(AttachmentIdx = 0; AttachmentIdx < `MAX_COSMETIC_ATTACHMENTS; AttachmentIdx++)
|
||||||
{
|
{
|
||||||
CosmeticMeshIdx = bCustom ? EPRI.CustomCharacter.AttachmentMeshIndices[AttachmentIdx] : KFPRI.RepCustomizationInfo.AttachmentMeshIndices[AttachmentIdx];
|
CosmeticMeshIdx = bCustom ? EPRI.CustomCharacter.AttachmentMeshIndices[AttachmentIdx] : KFPRI.RepCustomizationInfo.AttachmentMeshIndices[AttachmentIdx];
|
||||||
if( CosmeticMeshIdx == INDEX_NONE || CosmeticMeshIdx == CurrentAttachmentMeshIndex )
|
if(CosmeticMeshIdx == INDEX_NONE || CosmeticMeshIdx == CurrentAttachmentMeshIndex)
|
||||||
{
|
{
|
||||||
return AttachmentIdx;
|
return AttachmentIdx;
|
||||||
}
|
}
|
||||||
@ -673,7 +673,7 @@ static function int GetAttachmentSlotIndex(
|
|||||||
|
|
||||||
static function bool IsAttachmentAvailable(KFCharacterInfo_Human C, const out AttachmentVariants Attachment, Pawn PreviewPawn)
|
static function bool IsAttachmentAvailable(KFCharacterInfo_Human C, const out AttachmentVariants Attachment, Pawn PreviewPawn)
|
||||||
{
|
{
|
||||||
if ( Attachment.AttachmentItem.SocketName != '' && PreviewPawn.Mesh.GetSocketByName(Attachment.AttachmentItem.SocketName) == None )
|
if (Attachment.AttachmentItem.SocketName != '' && PreviewPawn.Mesh.GetSocketByName(Attachment.AttachmentItem.SocketName) == None)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -3,23 +3,23 @@ class ExtEmoteList extends Object
|
|||||||
|
|
||||||
var const array<Emote> Emotes;
|
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;
|
||||||
|
|
||||||
i = default.Emotes.Find('Id', ItemId);
|
i = default.Emotes.Find('Id', ItemId);
|
||||||
if( i > -1 )
|
if(i > -1)
|
||||||
{
|
{
|
||||||
Anim = default.Emotes[i].AnimName;
|
Anim = default.Emotes[i].AnimName;
|
||||||
PRI = ExtPlayerReplicationInfo(PC.PlayerReplicationInfo);
|
PRI = ExtPlayerReplicationInfo(PC.PlayerReplicationInfo);
|
||||||
|
|
||||||
if( PRI == None )
|
if(PRI == None)
|
||||||
return Anim;
|
return Anim;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if( InStr(string(Anim), "Deluxe") != INDEX_NONE && PRI.AdminType == 255 )
|
if(InStr(string(Anim), "Deluxe") != INDEX_NONE && PRI.AdminType == 255)
|
||||||
return 'NONE';
|
return 'NONE';
|
||||||
*/
|
*/
|
||||||
else return Anim;
|
else return Anim;
|
||||||
@ -28,9 +28,9 @@ static final function name GetUnlockedEmote( int ItemId, ExtPlayerController PC
|
|||||||
return 'NONE';
|
return 'NONE';
|
||||||
}
|
}
|
||||||
|
|
||||||
static final function SaveEquippedEmote( int ItemId, ExtPlayerController PC )
|
static final function SaveEquippedEmote(int ItemId, ExtPlayerController PC)
|
||||||
{
|
{
|
||||||
if( PC == None )
|
if(PC == None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PC.SelectedEmoteIndex = ItemId;
|
PC.SelectedEmoteIndex = ItemId;
|
||||||
@ -42,11 +42,11 @@ static final function array<Emote> GetEmoteArray()
|
|||||||
return default.Emotes;
|
return default.Emotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@ -54,7 +54,7 @@ static final function byte GetEmoteIndex( int ItemId )
|
|||||||
|
|
||||||
static final function int GetEquippedEmoteId(ExtPlayerController PC)
|
static final function int GetEquippedEmoteId(ExtPlayerController PC)
|
||||||
{
|
{
|
||||||
if( PC == None )
|
if(PC == None)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return PC.SelectedEmoteIndex;
|
return PC.SelectedEmoteIndex;
|
||||||
|
@ -8,7 +8,7 @@ function InitMenu()
|
|||||||
PageSwitcher = KFGUI_SwitchMenuBar(FindComponentID('Pager'));
|
PageSwitcher = KFGUI_SwitchMenuBar(FindComponentID('Pager'));
|
||||||
Super(KFGUI_Page).InitMenu();
|
Super(KFGUI_Page).InitMenu();
|
||||||
|
|
||||||
for( i=0; i<Pages.Length; ++i )
|
for(i=0; i<Pages.Length; ++i)
|
||||||
{
|
{
|
||||||
PageSwitcher.AddPage(Pages[i],B).InitMenu();
|
PageSwitcher.AddPage(Pages[i],B).InitMenu();
|
||||||
}
|
}
|
||||||
@ -28,14 +28,14 @@ function PreDraw()
|
|||||||
|
|
||||||
Viewport = LocalPlayer(GetPlayer().Player).ViewportClient;
|
Viewport = LocalPlayer(GetPlayer().Player).ViewportClient;
|
||||||
MovieManager = ExtMoviePlayer_Manager(KFPlayerController(GetPlayer()).MyGFxManager);
|
MovieManager = ExtMoviePlayer_Manager(KFPlayerController(GetPlayer()).MyGFxManager);
|
||||||
if( CaptureMouse() )
|
if(CaptureMouse())
|
||||||
{
|
{
|
||||||
Viewport.bDisplayHardwareMouseCursor = true;
|
Viewport.bDisplayHardwareMouseCursor = true;
|
||||||
Viewport.ForceUpdateMouseCursor(true);
|
Viewport.ForceUpdateMouseCursor(true);
|
||||||
|
|
||||||
MovieManager.SetMovieCanReceiveInput(false);
|
MovieManager.SetMovieCanReceiveInput(false);
|
||||||
}
|
}
|
||||||
else if( Viewport.bDisplayHardwareMouseCursor )
|
else if(Viewport.bDisplayHardwareMouseCursor)
|
||||||
{
|
{
|
||||||
Viewport.bDisplayHardwareMouseCursor = false;
|
Viewport.bDisplayHardwareMouseCursor = false;
|
||||||
Viewport.ForceUpdateMouseCursor(true);
|
Viewport.ForceUpdateMouseCursor(true);
|
||||||
|
@ -11,11 +11,11 @@ function UpdateGrenades()
|
|||||||
CurrentGrenades = MyKFInvManager.GrenadeCount;
|
CurrentGrenades = MyKFInvManager.GrenadeCount;
|
||||||
|
|
||||||
//Update the icon the for grenade type.
|
//Update the icon the for grenade type.
|
||||||
if( ExtPlayerController(MyKFPC)!=None )
|
if(ExtPlayerController(MyKFPC)!=None)
|
||||||
{
|
{
|
||||||
PM = ExtPlayerController(MyKFPC).ActivePerkManager;
|
PM = ExtPlayerController(MyKFPC).ActivePerkManager;
|
||||||
|
|
||||||
if( PM!=None && PM.CurrentPerk!=None && EPerkClass!=PM.CurrentPerk.Class )
|
if(PM!=None && PM.CurrentPerk!=None && EPerkClass!=PM.CurrentPerk.Class)
|
||||||
{
|
{
|
||||||
SetString("backpackGrenadeType", "img://"$PM.CurrentPerk.GrenadeWeaponDef.Static.GetImagePath());
|
SetString("backpackGrenadeType", "img://"$PM.CurrentPerk.GrenadeWeaponDef.Static.GetImagePath());
|
||||||
EPerkClass = PM.CurrentPerk.Class;
|
EPerkClass = PM.CurrentPerk.Class;
|
||||||
|
@ -16,7 +16,7 @@ function UpdatePerk()
|
|||||||
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;
|
||||||
|
|
||||||
CurrentPerk = ExPC.ActivePerkManager.CurrentPerk;
|
CurrentPerk = ExPC.ActivePerkManager.CurrentPerk;
|
||||||
@ -24,7 +24,7 @@ function UpdatePerk()
|
|||||||
CurrentPerkEXP = CurrentPerk.CurrentEXP;
|
CurrentPerkEXP = CurrentPerk.CurrentEXP;
|
||||||
|
|
||||||
// Update the perk class.
|
// Update the perk class.
|
||||||
if( ( ExLastPerkClass != CurrentPerk.Class ) || ( LastPerkLevel != CurrentPerkLevel ) )
|
if((ExLastPerkClass != CurrentPerk.Class) || (LastPerkLevel != CurrentPerkLevel))
|
||||||
{
|
{
|
||||||
CurPerkPath = CurrentPerk.GetPerkIconPath(CurrentPerkLevel);
|
CurPerkPath = CurrentPerk.GetPerkIconPath(CurrentPerkLevel);
|
||||||
|
|
||||||
@ -32,8 +32,8 @@ function UpdatePerk()
|
|||||||
PerkIconObject.SetString("perkIcon", CurPerkPath);
|
PerkIconObject.SetString("perkIcon", CurPerkPath);
|
||||||
SetObject("playerPerkIcon", PerkIconObject);
|
SetObject("playerPerkIcon", PerkIconObject);
|
||||||
|
|
||||||
SetInt("playerPerkXPPercent", CurrentPerk.GetProgressPercent() * 100.f );
|
SetInt("playerPerkXPPercent", CurrentPerk.GetProgressPercent() * 100.f);
|
||||||
if( LastPerkLevel != CurrentPerkLevel && ExLastPerkClass==CurrentPerk.Class )
|
if(LastPerkLevel != CurrentPerkLevel && ExLastPerkClass==CurrentPerk.Class)
|
||||||
{
|
{
|
||||||
SetBool("bLevelUp", true);
|
SetBool("bLevelUp", true);
|
||||||
ShowXPBark(CurrentPerkEXP-LastEXPValue,CurPerkPath,true);
|
ShowXPBark(CurrentPerkEXP-LastEXPValue,CurPerkPath,true);
|
||||||
@ -44,27 +44,27 @@ function UpdatePerk()
|
|||||||
LastPerkLevel = CurrentPerkLevel;
|
LastPerkLevel = CurrentPerkLevel;
|
||||||
LastEXPValue = CurrentPerkEXP;
|
LastEXPValue = CurrentPerkEXP;
|
||||||
}
|
}
|
||||||
else if( LastEXPValue!=CurrentPerkEXP )
|
else if(LastEXPValue!=CurrentPerkEXP)
|
||||||
{
|
{
|
||||||
SetBool("bLevelUp", false);
|
SetBool("bLevelUp", false);
|
||||||
SetInt("playerPerkXPPercent", CurrentPerk.GetProgressPercent() * 100.f );
|
SetInt("playerPerkXPPercent", CurrentPerk.GetProgressPercent() * 100.f);
|
||||||
ShowXPBark(CurrentPerkEXP-LastEXPValue,CurPerkPath,true);
|
ShowXPBark(CurrentPerkEXP-LastEXPValue,CurPerkPath,true);
|
||||||
LastEXPValue = CurrentPerkEXP;
|
LastEXPValue = CurrentPerkEXP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function ShowXPBark( int DeltaXP, string IconPath, bool bIsCurrentPerk )
|
function ShowXPBark(int DeltaXP, string IconPath, bool bIsCurrentPerk)
|
||||||
{
|
{
|
||||||
ActionScriptVoid("showXPBark");
|
ActionScriptVoid("showXPBark");
|
||||||
}
|
}
|
||||||
|
|
||||||
function UpdateHealth()
|
function UpdateHealth()
|
||||||
{
|
{
|
||||||
if( MyPC.Pawn == none )
|
if(MyPC.Pawn == none)
|
||||||
{
|
{
|
||||||
LastHealth = 0;
|
LastHealth = 0;
|
||||||
SetInt("playerHealth" , LastHealth);
|
SetInt("playerHealth" , LastHealth);
|
||||||
}
|
}
|
||||||
else if( LastHealth != MyPC.Pawn.Health )
|
else if(LastHealth != MyPC.Pawn.Health)
|
||||||
{
|
{
|
||||||
LastHealth = MyPC.Pawn.Health;
|
LastHealth = MyPC.Pawn.Health;
|
||||||
SetInt("playerHealth" , LastHealth);
|
SetInt("playerHealth" , LastHealth);
|
||||||
|
@ -15,30 +15,30 @@ function LocalizeText()
|
|||||||
SetObject("localizedText", TempObject);
|
SetObject("localizedText", TempObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
function UpdatePlayerInfo( optional bool bForceUpdate )
|
function UpdatePlayerInfo(optional bool bForceUpdate)
|
||||||
{
|
{
|
||||||
local GFxObject TempObject;
|
local GFxObject TempObject;
|
||||||
local ExtPlayerReplicationInfo E;
|
local ExtPlayerReplicationInfo E;
|
||||||
|
|
||||||
if( SpectatedKFPRI == None )
|
if(SpectatedKFPRI == None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
E = ExtPlayerReplicationInfo(SpectatedKFPRI);
|
E = ExtPlayerReplicationInfo(SpectatedKFPRI);
|
||||||
|
|
||||||
if( LastPerkLevel != E.ECurrentPerkLevel || LastPerkLevel != E.ECurrentPerkLevel || bForceUpdate )
|
if(LastPerkLevel != E.ECurrentPerkLevel || LastPerkLevel != E.ECurrentPerkLevel || bForceUpdate)
|
||||||
{
|
{
|
||||||
LastPerkLevel = E.ECurrentPerkLevel;
|
LastPerkLevel = E.ECurrentPerkLevel;
|
||||||
ExtLastPerkClass = E.ECurrentPerk;
|
ExtLastPerkClass = E.ECurrentPerk;
|
||||||
TempObject = CreateObject( "Object" );
|
TempObject = CreateObject("Object");
|
||||||
TempObject.SetString( "playerName", SpectatedKFPRI.GetHumanReadableName() );
|
TempObject.SetString("playerName", SpectatedKFPRI.GetHumanReadableName());
|
||||||
if( ExtLastPerkClass!=None && TempObject !=None )
|
if(ExtLastPerkClass!=None && TempObject !=None)
|
||||||
{
|
{
|
||||||
TempObject.SetString( "playerPerk", SpectatedKFPRI.CurrentPerkClass.default.LevelString @LastPerkLevel @ExtLastPerkClass.default.PerkName );
|
TempObject.SetString("playerPerk", SpectatedKFPRI.CurrentPerkClass.default.LevelString @LastPerkLevel @ExtLastPerkClass.default.PerkName);
|
||||||
TempObject.SetString( "iconPath", ExtLastPerkClass.Static.GetPerkIconPath(LastPerkLevel) );
|
TempObject.SetString("iconPath", ExtLastPerkClass.Static.GetPerkIconPath(LastPerkLevel));
|
||||||
SetObject( "playerData", TempObject );
|
SetObject("playerData", TempObject);
|
||||||
}
|
}
|
||||||
else TempObject.SetString( "playerPerk","No perk" );
|
else TempObject.SetString("playerPerk","No perk");
|
||||||
SetVisible( true );
|
SetVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,10 +35,10 @@ function TickHud(float DeltaTime)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Current wave we're on.
|
// Current wave we're on.
|
||||||
if( LastWave!=KFGRI.WaveNum )
|
if(LastWave!=KFGRI.WaveNum)
|
||||||
{
|
{
|
||||||
LastWave = KFGRI.WaveNum;
|
LastWave = KFGRI.WaveNum;
|
||||||
if( LastWave>LastWaveMax )
|
if(LastWave>LastWaveMax)
|
||||||
{
|
{
|
||||||
SetInt("currentWave",0); // Force text to refresh.
|
SetInt("currentWave",0); // Force text to refresh.
|
||||||
SetString("finalText", "END");
|
SetString("finalText", "END");
|
||||||
|
@ -2,7 +2,7 @@ class ExtHUD_WeaponSelectWidget extends KFGFxHUD_WeaponSelectWidget;
|
|||||||
|
|
||||||
var transient array< class<KFWeaponDefinition> > WeaponGroup;
|
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;
|
||||||
@ -14,22 +14,22 @@ simulated function UpdateWeaponGroupOnHUD( byte GroupIndex )
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,42 +45,42 @@ simulated function SetWeaponGroupList(out array<KFWeapon> WeaponList, byte Group
|
|||||||
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);
|
||||||
|
@ -18,17 +18,17 @@ var byte HealingShieldMod,HealingSpeedBoostMod,HealingDamageBoostMod;
|
|||||||
|
|
||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
if( true )
|
if(true)
|
||||||
bFeigningDeath,RepRegenHP,BackpackWeaponClass;
|
bFeigningDeath,RepRegenHP,BackpackWeaponClass;
|
||||||
if( bNetOwner )
|
if(bNetOwner)
|
||||||
bHasBunnyHop;
|
bHasBunnyHop;
|
||||||
if( bNetDirty )
|
if(bNetDirty)
|
||||||
HealingSpeedBoostMod, HealingDamageBoostMod, HealingShieldMod;
|
HealingSpeedBoostMod, HealingDamageBoostMod, HealingShieldMod;
|
||||||
}
|
}
|
||||||
|
|
||||||
function TakeDamage(int Damage, Controller InstigatedBy, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
|
function TakeDamage(int Damage, Controller InstigatedBy, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
|
||||||
{
|
{
|
||||||
if( KnockbackResist<1 )
|
if(KnockbackResist<1)
|
||||||
Momentum *= KnockbackResist;
|
Momentum *= KnockbackResist;
|
||||||
Super.TakeDamage(Damage,InstigatedBy,HitLocation,Momentum,DamageType,HitInfo,DamageCauser);
|
Super.TakeDamage(Damage,InstigatedBy,HitLocation,Momentum,DamageType,HitInfo,DamageCauser);
|
||||||
}
|
}
|
||||||
@ -40,9 +40,9 @@ simulated function bool Died(Controller Killer, class<DamageType> damageType, ve
|
|||||||
local PlayerReplicationInfo KillerPRI;
|
local PlayerReplicationInfo KillerPRI;
|
||||||
local SeqAct_Latent Action;
|
local SeqAct_Latent Action;
|
||||||
|
|
||||||
if( WorldInfo.NetMode!=NM_Client && PlayerReplicationInfo!=None )
|
if(WorldInfo.NetMode!=NM_Client && PlayerReplicationInfo!=None)
|
||||||
{
|
{
|
||||||
if( Killer==None || Killer==Controller )
|
if(Killer==None || Killer==Controller)
|
||||||
{
|
{
|
||||||
KillerPRI = PlayerReplicationInfo;
|
KillerPRI = PlayerReplicationInfo;
|
||||||
KillerPawn = None;
|
KillerPawn = None;
|
||||||
@ -50,10 +50,10 @@ simulated function bool Died(Controller Killer, class<DamageType> damageType, ve
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
KillerPRI = Killer.PlayerReplicationInfo;
|
KillerPRI = Killer.PlayerReplicationInfo;
|
||||||
if( KillerPRI==None || KillerPRI.Team!=PlayerReplicationInfo.Team )
|
if(KillerPRI==None || KillerPRI.Team!=PlayerReplicationInfo.Team)
|
||||||
{
|
{
|
||||||
KillerPawn = Killer.Pawn!=None ? Killer.Pawn.Class : None;
|
KillerPawn = Killer.Pawn!=None ? Killer.Pawn.Class : None;
|
||||||
if( PlayerController(Killer)==None ) // If was killed by a monster, don't broadcast PRI along with it.
|
if(PlayerController(Killer)==None) // If was killed by a monster, don't broadcast PRI along with it.
|
||||||
KillerPRI = None;
|
KillerPRI = None;
|
||||||
}
|
}
|
||||||
else KillerPawn = None;
|
else KillerPawn = None;
|
||||||
@ -62,12 +62,12 @@ simulated function bool Died(Controller Killer, class<DamageType> damageType, ve
|
|||||||
C.ClientKillMessage(damageType,PlayerReplicationInfo,KillerPRI,KillerPawn);
|
C.ClientKillMessage(damageType,PlayerReplicationInfo,KillerPRI,KillerPawn);
|
||||||
}
|
}
|
||||||
// If got killed by a zombie, turn player into a ragdoll and let em take control of a newly spawned ZED over the ragdoll.
|
// If got killed by a zombie, turn player into a ragdoll and let em take control of a newly spawned ZED over the ragdoll.
|
||||||
if( bRedeadMode && WorldInfo.NetMode!=NM_Client && damageType!=None && Killer!=None && Killer!=Controller && Killer.GetTeamNum()!=0 )
|
if(bRedeadMode && WorldInfo.NetMode!=NM_Client && damageType!=None && Killer!=None && Killer!=Controller && Killer.GetTeamNum()!=0)
|
||||||
{
|
{
|
||||||
if ( bDeleteMe || WorldInfo.Game == None || WorldInfo.Game.bLevelChange )
|
if (bDeleteMe || WorldInfo.Game == None || WorldInfo.Game.bLevelChange)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
bPendingRedead = true;
|
bPendingRedead = true;
|
||||||
if ( WorldInfo.Game.PreventDeath(self, Killer, damageType, HitLocation) )
|
if (WorldInfo.Game.PreventDeath(self, Killer, damageType, HitLocation))
|
||||||
{
|
{
|
||||||
bPendingRedead = false;
|
bPendingRedead = false;
|
||||||
Health = max(Health, 1);
|
Health = max(Health, 1);
|
||||||
@ -76,15 +76,15 @@ simulated function bool Died(Controller Killer, class<DamageType> damageType, ve
|
|||||||
Health = 0;
|
Health = 0;
|
||||||
foreach LatentActions(Action)
|
foreach LatentActions(Action)
|
||||||
Action.AbortFor(self);
|
Action.AbortFor(self);
|
||||||
if ( Controller != None )
|
if (Controller != None)
|
||||||
WorldInfo.Game.Killed(Killer, Controller, self, damageType);
|
WorldInfo.Game.Killed(Killer, Controller, self, damageType);
|
||||||
else WorldInfo.Game.Killed(Killer, Controller(Owner), self, damageType);
|
else WorldInfo.Game.Killed(Killer, Controller(Owner), self, damageType);
|
||||||
|
|
||||||
if ( InvManager != None )
|
if (InvManager != None)
|
||||||
InvManager.OwnerDied();
|
InvManager.OwnerDied();
|
||||||
|
|
||||||
Health = 1;
|
Health = 1;
|
||||||
if( !bFeigningDeath )
|
if(!bFeigningDeath)
|
||||||
PlayFeignDeath(true,,true);
|
PlayFeignDeath(true,,true);
|
||||||
Health = 0;
|
Health = 0;
|
||||||
ClearTimer('UnsetFeignDeath');
|
ClearTimer('UnsetFeignDeath');
|
||||||
@ -93,15 +93,15 @@ simulated function bool Died(Controller Killer, class<DamageType> damageType, ve
|
|||||||
}
|
}
|
||||||
return Super.Died(Killer, DamageType, HitLocation);
|
return Super.Died(Killer, DamageType, HitLocation);
|
||||||
}
|
}
|
||||||
simulated function BroadcastDeathMessage( Controller Killer );
|
simulated function BroadcastDeathMessage(Controller Killer);
|
||||||
|
|
||||||
function SetBatteryRate( float Rate )
|
function SetBatteryRate(float Rate)
|
||||||
{
|
{
|
||||||
BatteryDrainRate = Default.BatteryDrainRate*Rate;
|
BatteryDrainRate = Default.BatteryDrainRate*Rate;
|
||||||
NVGBatteryDrainRate = Default.NVGBatteryDrainRate*Rate;
|
NVGBatteryDrainRate = Default.NVGBatteryDrainRate*Rate;
|
||||||
ClientSetBatteryRate(Rate);
|
ClientSetBatteryRate(Rate);
|
||||||
}
|
}
|
||||||
simulated reliable client function ClientSetBatteryRate( float Rate )
|
simulated reliable client function ClientSetBatteryRate(float Rate)
|
||||||
{
|
{
|
||||||
BatteryDrainRate = Default.BatteryDrainRate*Rate;
|
BatteryDrainRate = Default.BatteryDrainRate*Rate;
|
||||||
NVGBatteryDrainRate = Default.NVGBatteryDrainRate*Rate;
|
NVGBatteryDrainRate = Default.NVGBatteryDrainRate*Rate;
|
||||||
@ -123,92 +123,92 @@ event bool HealDamage(int Amount, Controller Healer, class<DamageType> DamageTyp
|
|||||||
InstigatorPC = ExtPlayerController(Healer);
|
InstigatorPC = ExtPlayerController(Healer);
|
||||||
InstigatorPerk = InstigatorPC.GetPerk();
|
InstigatorPerk = InstigatorPC.GetPerk();
|
||||||
|
|
||||||
if( InstigatorPerk != None && bCanRepairArmor )
|
if(InstigatorPerk != None && bCanRepairArmor)
|
||||||
bRepairedArmor = InstigatorPC.GetPerk().RepairArmor( self );
|
bRepairedArmor = InstigatorPC.GetPerk().RepairArmor(self);
|
||||||
|
|
||||||
EPRI = ExtPlayerReplicationInfo(InstigatorPC.PlayerReplicationInfo);
|
EPRI = ExtPlayerReplicationInfo(InstigatorPC.PlayerReplicationInfo);
|
||||||
if( EPRI != none )
|
if(EPRI != none)
|
||||||
{
|
{
|
||||||
InstigatorExtPerk = ExtPlayerController(Controller).ActivePerkManager.CurrentPerk;
|
InstigatorExtPerk = ExtPlayerController(Controller).ActivePerkManager.CurrentPerk;
|
||||||
if( InstigatorExtPerk != none && Ext_PerkFieldMedic(InstigatorExtPerk) != none )
|
if(InstigatorExtPerk != none && Ext_PerkFieldMedic(InstigatorExtPerk) != none)
|
||||||
{
|
{
|
||||||
if( Ext_PerkFieldMedic(InstigatorExtPerk).bHealingBoost )
|
if(Ext_PerkFieldMedic(InstigatorExtPerk).bHealingBoost)
|
||||||
UpdateHealingSpeedBoostMod(InstigatorPC);
|
UpdateHealingSpeedBoostMod(InstigatorPC);
|
||||||
|
|
||||||
if( Ext_PerkFieldMedic(InstigatorExtPerk).bHealingDamageBoost )
|
if(Ext_PerkFieldMedic(InstigatorExtPerk).bHealingDamageBoost)
|
||||||
UpdateHealingDamageBoostMod(InstigatorPC);
|
UpdateHealingDamageBoostMod(InstigatorPC);
|
||||||
|
|
||||||
if( Ext_PerkFieldMedic(InstigatorExtPerk).bHealingShield )
|
if(Ext_PerkFieldMedic(InstigatorExtPerk).bHealingShield)
|
||||||
UpdateHealingShieldMod(InstigatorPC);
|
UpdateHealingShieldMod(InstigatorPC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
InstigatorPRI = KFPlayerReplicationInfo(Healer.PlayerReplicationInfo);
|
InstigatorPRI = KFPlayerReplicationInfo(Healer.PlayerReplicationInfo);
|
||||||
ScAmount = Amount;
|
ScAmount = Amount;
|
||||||
if( InstigatorPerk != none )
|
if(InstigatorPerk != none)
|
||||||
InstigatorPerk.ModifyHealAmount( ScAmount );
|
InstigatorPerk.ModifyHealAmount(ScAmount);
|
||||||
UsedHealAmount = ScAmount;
|
UsedHealAmount = ScAmount;
|
||||||
|
|
||||||
// You can never have a HealthToRegen value that's greater than HealthMax
|
// You can never have a HealthToRegen value that's greater than HealthMax
|
||||||
if( Health + HealthToRegen + UsedHealAmount > HealthMax )
|
if(Health + HealthToRegen + UsedHealAmount > HealthMax)
|
||||||
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)
|
||||||
InstigatorPC.AddHealPoints( UsedHealAmount );
|
InstigatorPC.AddHealPoints(UsedHealAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Healer.bIsPlayer )
|
if(Healer.bIsPlayer)
|
||||||
{
|
{
|
||||||
if( Healer != Controller )
|
if(Healer != Controller)
|
||||||
{
|
{
|
||||||
if( InstigatorPC!=None )
|
if(InstigatorPC!=None)
|
||||||
{
|
{
|
||||||
if( !InstigatorPC.bClientHideNumbers )
|
if(!InstigatorPC.bClientHideNumbers)
|
||||||
InstigatorPC.ClientNumberMsg(UsedHealAmount,Location,DMG_Heal);
|
InstigatorPC.ClientNumberMsg(UsedHealAmount,Location,DMG_Heal);
|
||||||
InstigatorPC.ReceiveLocalizedMessage( class'KFLocalMessage_Game', GMT_HealedPlayer, PlayerReplicationInfo );
|
InstigatorPC.ReceiveLocalizedMessage(class'KFLocalMessage_Game', GMT_HealedPlayer, PlayerReplicationInfo);
|
||||||
}
|
}
|
||||||
KFPC = ExtPlayerController(Controller);
|
KFPC = ExtPlayerController(Controller);
|
||||||
if( KFPC!=None )
|
if(KFPC!=None)
|
||||||
KFPC.ReceiveLocalizedMessage( class'KFLocalMessage_Game', GMT_HealedBy, Healer.PlayerReplicationInfo );
|
KFPC.ReceiveLocalizedMessage(class'KFLocalMessage_Game', GMT_HealedBy, Healer.PlayerReplicationInfo);
|
||||||
}
|
}
|
||||||
else if( bMessageHealer && InstigatorPC!=None )
|
else if(bMessageHealer && InstigatorPC!=None)
|
||||||
InstigatorPC.ReceiveLocalizedMessage( class'KFLocalMessage_Game', GMT_HealedSelf, PlayerReplicationInfo );
|
InstigatorPC.ReceiveLocalizedMessage(class'KFLocalMessage_Game', GMT_HealedSelf, PlayerReplicationInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't play dialog for healing done through perk skills (e.g. berserker vampire skill)
|
// don't play dialog for healing done through perk skills (e.g. berserker vampire skill)
|
||||||
if( bMessageHealer )
|
if(bMessageHealer)
|
||||||
{
|
{
|
||||||
`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;
|
||||||
@ -231,7 +231,7 @@ function GiveHealthOverTime()
|
|||||||
|
|
||||||
simulated event ReplicatedEvent(name VarName)
|
simulated event ReplicatedEvent(name VarName)
|
||||||
{
|
{
|
||||||
switch( VarName )
|
switch(VarName)
|
||||||
{
|
{
|
||||||
case 'bFeigningDeath':
|
case 'bFeigningDeath':
|
||||||
PlayFeignDeath(bFeigningDeath);
|
PlayFeignDeath(bFeigningDeath);
|
||||||
@ -248,11 +248,11 @@ simulated event ReplicatedEvent(name VarName)
|
|||||||
// Feign death triggers:
|
// Feign death triggers:
|
||||||
function PlayHit(float Damage, Controller InstigatedBy, vector HitLocation, class<DamageType> damageType, vector Momentum, TraceHitInfo HitInfo)
|
function PlayHit(float Damage, Controller InstigatedBy, vector HitLocation, class<DamageType> damageType, vector Momentum, TraceHitInfo HitInfo)
|
||||||
{
|
{
|
||||||
if( damageType!=class'DmgType_Fell' ) // Not from falling!
|
if(damageType!=class'DmgType_Fell') // Not from falling!
|
||||||
{
|
{
|
||||||
if( bRagdollFromMomentum && Damage>2 && VSizeSq(Momentum)>1000000.f && Rand(3)==0 ) // Square(1000)
|
if(bRagdollFromMomentum && Damage>2 && VSizeSq(Momentum)>1000000.f && Rand(3)==0) // Square(1000)
|
||||||
SetFeignDeath(3.f+FRand()*2.5f); // Randomly knockout a player if hit by a huge force.
|
SetFeignDeath(3.f+FRand()*2.5f); // Randomly knockout a player if hit by a huge force.
|
||||||
else if( bRagdollFromBackhit && Damage>20 && VSizeSq(Momentum)>40000.f && (vector(Rotation) Dot Momentum)>0.f && Rand(4)==0 )
|
else if(bRagdollFromBackhit && Damage>20 && VSizeSq(Momentum)>40000.f && (vector(Rotation) Dot Momentum)>0.f && Rand(4)==0)
|
||||||
SetFeignDeath(2.f+FRand()*3.f); // Randomly knockout a player if hit from behind.
|
SetFeignDeath(2.f+FRand()*3.f); // Randomly knockout a player if hit from behind.
|
||||||
}
|
}
|
||||||
Super.PlayHit(Damage,InstigatedBy,HitLocation,damageType,Momentum,HitInfo);
|
Super.PlayHit(Damage,InstigatedBy,HitLocation,damageType,Momentum,HitInfo);
|
||||||
@ -262,10 +262,10 @@ event Landed(vector HitNormal, actor FloorActor)
|
|||||||
local float ExcessSpeed;
|
local float ExcessSpeed;
|
||||||
|
|
||||||
Super.Landed(HitNormal, FloorActor);
|
Super.Landed(HitNormal, FloorActor);
|
||||||
if( bRagdollFromFalling )
|
if(bRagdollFromFalling)
|
||||||
{
|
{
|
||||||
ExcessSpeed = Velocity.Z / (-MaxFallSpeed);
|
ExcessSpeed = Velocity.Z / (-MaxFallSpeed);
|
||||||
if( ExcessSpeed>1.25 ) // Knockout a player after landed from too high.
|
if(ExcessSpeed>1.25) // Knockout a player after landed from too high.
|
||||||
{
|
{
|
||||||
Velocity.Z = 0; // Dont go clip through floor now...
|
Velocity.Z = 0; // Dont go clip through floor now...
|
||||||
Velocity.X*=0.5;
|
Velocity.X*=0.5;
|
||||||
@ -273,27 +273,27 @@ event Landed(vector HitNormal, actor FloorActor)
|
|||||||
SetFeignDeath((3.f+FRand())*ExcessSpeed);
|
SetFeignDeath((3.f+FRand())*ExcessSpeed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( BHopAccelSpeed>0 )
|
else if(BHopAccelSpeed>0)
|
||||||
SetTimer((IsLocallyControlled() ? 0.17 : 1.f),false,'ResetBHopAccel'); // Replicating from client to server here because Server Tickrate may screw clients over from executing bunny hopping.
|
SetTimer((IsLocallyControlled() ? 0.17 : 1.f),false,'ResetBHopAccel'); // Replicating from client to server here because Server Tickrate may screw clients over from executing bunny hopping.
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==================================================================
|
// ==================================================================
|
||||||
// Bunny hopping:
|
// Bunny hopping:
|
||||||
function bool DoJump( bool bUpdating )
|
function bool DoJump(bool bUpdating)
|
||||||
{
|
{
|
||||||
local float V;
|
local float V;
|
||||||
|
|
||||||
if ( Super.DoJump(bUpdating) )
|
if (Super.DoJump(bUpdating))
|
||||||
{
|
{
|
||||||
// Accelerate if bunnyhopping.
|
// Accelerate if bunnyhopping.
|
||||||
if( bHasBunnyHop && VSizeSq2D(Velocity)>Square(GroundSpeed*0.75) )
|
if(bHasBunnyHop && VSizeSq2D(Velocity)>Square(GroundSpeed*0.75))
|
||||||
{
|
{
|
||||||
if( BHopAccelSpeed<20 )
|
if(BHopAccelSpeed<20)
|
||||||
{
|
{
|
||||||
if( BHopAccelSpeed==0 )
|
if(BHopAccelSpeed==0)
|
||||||
BHopSpeedMod = 1.f;
|
BHopSpeedMod = 1.f;
|
||||||
|
|
||||||
if( BHopAccelSpeed<5 )
|
if(BHopAccelSpeed<5)
|
||||||
V = 1.15;
|
V = 1.15;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -313,15 +313,15 @@ function bool DoJump( bool bUpdating )
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
simulated function ResetBHopAccel( optional bool bSkipRep ) // Set on Landed, or Tick if falling 2D speed is too low.
|
simulated function ResetBHopAccel(optional bool bSkipRep) // Set on Landed, or Tick if falling 2D speed is too low.
|
||||||
{
|
{
|
||||||
if( BHopAccelSpeed>0 )
|
if(BHopAccelSpeed>0)
|
||||||
{
|
{
|
||||||
BHopAccelSpeed = 0;
|
BHopAccelSpeed = 0;
|
||||||
AirControl = Default.AirControl;
|
AirControl = Default.AirControl;
|
||||||
GroundSpeed /= BHopSpeedMod;
|
GroundSpeed /= BHopSpeedMod;
|
||||||
UpdateGroundSpeed();
|
UpdateGroundSpeed();
|
||||||
if( WorldInfo.NetMode==NM_Client && !bSkipRep )
|
if(WorldInfo.NetMode==NM_Client && !bSkipRep)
|
||||||
NotifyHasStopped();
|
NotifyHasStopped();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -330,12 +330,12 @@ function UpdateGroundSpeed()
|
|||||||
local KFInventoryManager InvM;
|
local KFInventoryManager InvM;
|
||||||
local float HealthMod;
|
local float HealthMod;
|
||||||
|
|
||||||
if ( Role < ROLE_Authority )
|
if (Role < ROLE_Authority)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
InvM = KFInventoryManager(InvManager);
|
InvM = KFInventoryManager(InvManager);
|
||||||
HealthMod = (InvM != None) ? InvM.GetEncumbranceSpeedMod() : 1.f * (1.f - LowHealthSpeedPenalty);
|
HealthMod = (InvM != None) ? InvM.GetEncumbranceSpeedMod() : 1.f * (1.f - LowHealthSpeedPenalty);
|
||||||
if( BHopAccelSpeed>0 )
|
if(BHopAccelSpeed>0)
|
||||||
HealthMod *= BHopSpeedMod;
|
HealthMod *= BHopSpeedMod;
|
||||||
|
|
||||||
// First reset to default so multipliers do not stack
|
// First reset to default so multipliers do not stack
|
||||||
@ -344,7 +344,7 @@ function UpdateGroundSpeed()
|
|||||||
SprintSpeed = default.SprintSpeed * HealthMod;
|
SprintSpeed = default.SprintSpeed * HealthMod;
|
||||||
|
|
||||||
// Ask our perk to set the new ground speed based on weapon type
|
// Ask our perk to set the new ground speed based on weapon type
|
||||||
if( GetPerk() != none )
|
if(GetPerk() != none)
|
||||||
{
|
{
|
||||||
GetPerk().ModifySpeed(GroundSpeed);
|
GetPerk().ModifySpeed(GroundSpeed);
|
||||||
GetPerk().ModifySpeed(SprintSpeed);
|
GetPerk().ModifySpeed(SprintSpeed);
|
||||||
@ -358,22 +358,22 @@ reliable server function NotifyHasStopped()
|
|||||||
|
|
||||||
// ==================================================================
|
// ==================================================================
|
||||||
// Feign death (UT3):
|
// Feign death (UT3):
|
||||||
simulated function Tick( float Delta )
|
simulated function Tick(float Delta)
|
||||||
{
|
{
|
||||||
Super.Tick(Delta);
|
Super.Tick(Delta);
|
||||||
if( bPlayingFeignDeathRecovery )
|
if(bPlayingFeignDeathRecovery)
|
||||||
{
|
{
|
||||||
// interpolate Controller yaw to our yaw so that we don't get our rotation snapped around when we get out of feign death
|
// interpolate Controller yaw to our yaw so that we don't get our rotation snapped around when we get out of feign death
|
||||||
Mesh.PhysicsWeight = FMax(Mesh.PhysicsWeight-(Delta*2.f),0.f);
|
Mesh.PhysicsWeight = FMax(Mesh.PhysicsWeight-(Delta*2.f),0.f);
|
||||||
if( Mesh.PhysicsWeight<=0 )
|
if(Mesh.PhysicsWeight<=0)
|
||||||
StartFeignDeathRecoveryAnim();
|
StartFeignDeathRecoveryAnim();
|
||||||
}
|
}
|
||||||
if( BHopAccelSpeed>0 )
|
if(BHopAccelSpeed>0)
|
||||||
{
|
{
|
||||||
if( Physics==PHYS_Falling && VSizeSq2D(Velocity)<Square(GroundSpeed*0.7) )
|
if(Physics==PHYS_Falling && VSizeSq2D(Velocity)<Square(GroundSpeed*0.7))
|
||||||
ResetBHopAccel(true);
|
ResetBHopAccel(true);
|
||||||
}
|
}
|
||||||
if( WorldInfo.NetMode!=NM_Client && BackpackWeaponClass!=none && (PlayerOldWeapon==None || PlayerOldWeapon.Instigator==None) )
|
if(WorldInfo.NetMode!=NM_Client && BackpackWeaponClass!=none && (PlayerOldWeapon==None || PlayerOldWeapon.Instigator==None))
|
||||||
{
|
{
|
||||||
PlayerOldWeapon = None;
|
PlayerOldWeapon = None;
|
||||||
SetBackpackWeapon(None);
|
SetBackpackWeapon(None);
|
||||||
@ -384,13 +384,13 @@ function DelayedRagdoll()
|
|||||||
{
|
{
|
||||||
SetFeignDeath(2.f+FRand()*3.f);
|
SetFeignDeath(2.f+FRand()*3.f);
|
||||||
}
|
}
|
||||||
exec function FeignDeath( float Time )
|
exec function FeignDeath(float Time)
|
||||||
{
|
{
|
||||||
SetFeignDeath(Time);
|
SetFeignDeath(Time);
|
||||||
}
|
}
|
||||||
function SetFeignDeath( float Time )
|
function SetFeignDeath(float Time)
|
||||||
{
|
{
|
||||||
if( WorldInfo.NetMode!=NM_Client && !bFeigningDeath && Health>0 && bCanBecomeRagdoll && NoRagdollChance<1.f && (NoRagdollChance==0.f || FRand()>NoRagdollChance) )
|
if(WorldInfo.NetMode!=NM_Client && !bFeigningDeath && Health>0 && bCanBecomeRagdoll && NoRagdollChance<1.f && (NoRagdollChance==0.f || FRand()>NoRagdollChance))
|
||||||
{
|
{
|
||||||
Time = FMax(1.f,Time);
|
Time = FMax(1.f,Time);
|
||||||
PlayFeignDeath(true);
|
PlayFeignDeath(true);
|
||||||
@ -399,25 +399,25 @@ function SetFeignDeath( float Time )
|
|||||||
}
|
}
|
||||||
function UnsetFeignDeath()
|
function UnsetFeignDeath()
|
||||||
{
|
{
|
||||||
if( bFeigningDeath )
|
if(bFeigningDeath)
|
||||||
PlayFeignDeath(false);
|
PlayFeignDeath(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function PlayFeignDeath( bool bEnable, optional bool bForce, optional bool bTransformMode )
|
simulated function PlayFeignDeath(bool bEnable, optional bool bForce, optional bool bTransformMode)
|
||||||
{
|
{
|
||||||
local vector FeignLocation, HitLocation, HitNormal, TraceEnd, Impulse;
|
local vector FeignLocation, HitLocation, HitNormal, TraceEnd, Impulse;
|
||||||
local rotator NewRotation;
|
local rotator NewRotation;
|
||||||
local float UnFeignZAdjust;
|
local float UnFeignZAdjust;
|
||||||
|
|
||||||
if( Health<=0 && WorldInfo.NetMode!=NM_Client )
|
if(Health<=0 && WorldInfo.NetMode!=NM_Client)
|
||||||
return; // If dead, don't do it.
|
return; // If dead, don't do it.
|
||||||
|
|
||||||
NotifyOutOfBattery(); // Stop nightvision on client.
|
NotifyOutOfBattery(); // Stop nightvision on client.
|
||||||
|
|
||||||
bFeigningDeath = bEnable;
|
bFeigningDeath = bEnable;
|
||||||
if ( bEnable )
|
if (bEnable)
|
||||||
{
|
{
|
||||||
if( bFPLegsAttached )
|
if(bFPLegsAttached)
|
||||||
{
|
{
|
||||||
bFPLegsAttached = false;
|
bFPLegsAttached = false;
|
||||||
DetachComponent(FPBodyMesh);
|
DetachComponent(FPBodyMesh);
|
||||||
@ -427,7 +427,7 @@ simulated function PlayFeignDeath( bool bEnable, optional bool bForce, optional
|
|||||||
|
|
||||||
bPlayingFeignDeathRecovery = false;
|
bPlayingFeignDeathRecovery = false;
|
||||||
ClearTimer('OnWakeUpFinished');
|
ClearTimer('OnWakeUpFinished');
|
||||||
if( !bTransformMode )
|
if(!bTransformMode)
|
||||||
GotoState('FeigningDeath');
|
GotoState('FeigningDeath');
|
||||||
|
|
||||||
// if we had some other rigid body thing going on, cancel it
|
// if we had some other rigid body thing going on, cancel it
|
||||||
@ -452,9 +452,9 @@ simulated function PlayFeignDeath( bool bEnable, optional bool bForce, optional
|
|||||||
|
|
||||||
Mesh.SetHasPhysicsAssetInstance(false);
|
Mesh.SetHasPhysicsAssetInstance(false);
|
||||||
|
|
||||||
if( !InitRagdoll() ) // Ragdoll error!
|
if(!InitRagdoll()) // Ragdoll error!
|
||||||
{
|
{
|
||||||
if( PlayerController(Controller)!=None )
|
if(PlayerController(Controller)!=None)
|
||||||
PlayerController(Controller).ClientMessage("Error: InitRagdoll() failed!");
|
PlayerController(Controller).ClientMessage("Error: InitRagdoll() failed!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -467,7 +467,7 @@ simulated function PlayFeignDeath( bool bEnable, optional bool bForce, optional
|
|||||||
// Set all kinematic bodies to the current root velocity, since they may not have been updated during normal animation
|
// Set all kinematic bodies to the current root velocity, since they may not have been updated during normal animation
|
||||||
// and therefore have zero derived velocity (this happens in 1st person camera mode).
|
// and therefore have zero derived velocity (this happens in 1st person camera mode).
|
||||||
UnFeignZAdjust = VSize(Velocity);
|
UnFeignZAdjust = VSize(Velocity);
|
||||||
if( UnFeignZAdjust>700.f ) // Limit by a maximum velocity force to prevent from going through walls.
|
if(UnFeignZAdjust>700.f) // Limit by a maximum velocity force to prevent from going through walls.
|
||||||
Mesh.SetRBLinearVelocity((Velocity/UnFeignZAdjust)*700.f, false);
|
Mesh.SetRBLinearVelocity((Velocity/UnFeignZAdjust)*700.f, false);
|
||||||
else Mesh.SetRBLinearVelocity(Velocity, false);
|
else Mesh.SetRBLinearVelocity(Velocity, false);
|
||||||
|
|
||||||
@ -485,14 +485,14 @@ simulated function PlayFeignDeath( bool bEnable, optional bool bForce, optional
|
|||||||
FeignLocation = Location;
|
FeignLocation = Location;
|
||||||
CollisionComponent = CylinderComponent;
|
CollisionComponent = CylinderComponent;
|
||||||
TraceEnd = Location + vect(0,0,1) * GetCollisionHeight();
|
TraceEnd = Location + vect(0,0,1) * GetCollisionHeight();
|
||||||
if (Trace(HitLocation, HitNormal, TraceEnd, Location, true, GetCollisionExtent()) == None )
|
if (Trace(HitLocation, HitNormal, TraceEnd, Location, true, GetCollisionExtent()) == None)
|
||||||
{
|
{
|
||||||
HitLocation = TraceEnd;
|
HitLocation = TraceEnd;
|
||||||
}
|
}
|
||||||
if ( !SetFeignEndLocation(HitLocation, FeignLocation) && WorldInfo.NetMode!=NM_Client )
|
if (!SetFeignEndLocation(HitLocation, FeignLocation) && WorldInfo.NetMode!=NM_Client)
|
||||||
{
|
{
|
||||||
UnfeignFailedCount++;
|
UnfeignFailedCount++;
|
||||||
if ( UnFeignfailedCount > 4 || bForce )
|
if (UnFeignfailedCount > 4 || bForce)
|
||||||
{
|
{
|
||||||
SetLocation(PickNearestNode()); // Just teleport to nearest pathnode.
|
SetLocation(PickNearestNode()); // Just teleport to nearest pathnode.
|
||||||
}
|
}
|
||||||
@ -552,7 +552,7 @@ simulated function PlayFeignDeath( bool bEnable, optional bool bForce, optional
|
|||||||
else FeignRecoverAnim = 'Getup_F_V1';
|
else FeignRecoverAnim = 'Getup_F_V1';
|
||||||
|
|
||||||
// Init wakeup anim.
|
// Init wakeup anim.
|
||||||
if( Mesh.AnimSets.Find(WakeUpAnimSet)==-1 )
|
if(Mesh.AnimSets.Find(WakeUpAnimSet)==-1)
|
||||||
Mesh.AnimSets.AddItem(WakeUpAnimSet);
|
Mesh.AnimSets.AddItem(WakeUpAnimSet);
|
||||||
BodyStanceNodes[EAS_FullBody].bNoNotifies = true;
|
BodyStanceNodes[EAS_FullBody].bNoNotifies = true;
|
||||||
BodyStanceNodes[EAS_FullBody].PlayCustomAnim(FeignRecoverAnim,0.025f,,,,true);
|
BodyStanceNodes[EAS_FullBody].PlayCustomAnim(FeignRecoverAnim,0.025f,,,,true);
|
||||||
@ -568,7 +568,7 @@ final function vector PickNearestNode()
|
|||||||
foreach WorldInfo.AllNavigationPoints(class'NavigationPoint',N)
|
foreach WorldInfo.AllNavigationPoints(class'NavigationPoint',N)
|
||||||
{
|
{
|
||||||
Dist = VSizeSq(N.Location-Location);
|
Dist = VSizeSq(N.Location-Location);
|
||||||
if( Best==None || Dist<BestDist )
|
if(Best==None || Dist<BestDist)
|
||||||
{
|
{
|
||||||
Best = N;
|
Best = N;
|
||||||
BestDist = Dist;
|
BestDist = Dist;
|
||||||
@ -580,29 +580,29 @@ simulated function bool SetFeignEndLocation(vector HitLocation, vector FeignLoca
|
|||||||
{
|
{
|
||||||
local vector NewDest;
|
local vector NewDest;
|
||||||
|
|
||||||
if ( SetLocation(HitLocation) && CheckValidLocation(FeignLocation) )
|
if (SetLocation(HitLocation) && CheckValidLocation(FeignLocation))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// try crouching
|
// try crouching
|
||||||
ForceCrouch();
|
ForceCrouch();
|
||||||
if ( SetLocation(HitLocation) && CheckValidLocation(FeignLocation) )
|
if (SetLocation(HitLocation) && CheckValidLocation(FeignLocation))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
newdest = HitLocation + GetCollisionRadius() * vect(1,1,0);
|
newdest = HitLocation + GetCollisionRadius() * vect(1,1,0);
|
||||||
if ( SetLocation(newdest) && CheckValidLocation(FeignLocation) )
|
if (SetLocation(newdest) && CheckValidLocation(FeignLocation))
|
||||||
return true;
|
return true;
|
||||||
newdest = HitLocation + GetCollisionRadius() * vect(1,-1,0);
|
newdest = HitLocation + GetCollisionRadius() * vect(1,-1,0);
|
||||||
if ( SetLocation(newdest) && CheckValidLocation(FeignLocation) )
|
if (SetLocation(newdest) && CheckValidLocation(FeignLocation))
|
||||||
return true;
|
return true;
|
||||||
newdest = HitLocation + GetCollisionRadius() * vect(-1,1,0);
|
newdest = HitLocation + GetCollisionRadius() * vect(-1,1,0);
|
||||||
if ( SetLocation(newdest) && CheckValidLocation(FeignLocation) )
|
if (SetLocation(newdest) && CheckValidLocation(FeignLocation))
|
||||||
return true;
|
return true;
|
||||||
newdest = HitLocation + GetCollisionRadius() * vect(-1,-1,0);
|
newdest = HitLocation + GetCollisionRadius() * vect(-1,-1,0);
|
||||||
if ( SetLocation(newdest) && CheckValidLocation(FeignLocation) )
|
if (SetLocation(newdest) && CheckValidLocation(FeignLocation))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -620,8 +620,8 @@ simulated function bool CheckValidLocation(vector FeignLocation)
|
|||||||
// try trace straight up, then sideways to final location
|
// try trace straight up, then sideways to final location
|
||||||
DestFinalZ = FeignLocation;
|
DestFinalZ = FeignLocation;
|
||||||
FeignLocation.Z = Location.Z;
|
FeignLocation.Z = Location.Z;
|
||||||
if ( Trace(HitLocation, HitNormal, DestFinalZ, FeignLocation, false, vect(10,10,10)) == None &&
|
if (Trace(HitLocation, HitNormal, DestFinalZ, FeignLocation, false, vect(10,10,10)) == None &&
|
||||||
Trace(HitLocation, HitNormal, Location, DestFinalZ, false, vect(10,10,10),, TRACEFLAG_Bullet) == None )
|
Trace(HitLocation, HitNormal, Location, DestFinalZ, false, vect(10,10,10),, TRACEFLAG_Bullet) == None)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -656,7 +656,7 @@ simulated function PlayRagdollDeath(class<DamageType> DamageType, vector HitLoc)
|
|||||||
|
|
||||||
Mesh.SetHasPhysicsAssetInstance(false);
|
Mesh.SetHasPhysicsAssetInstance(false);
|
||||||
Mesh.SetHasPhysicsAssetInstance(true);
|
Mesh.SetHasPhysicsAssetInstance(true);
|
||||||
if( bFPLegsAttached )
|
if(bFPLegsAttached)
|
||||||
{
|
{
|
||||||
bFPLegsAttached = false;
|
bFPLegsAttached = false;
|
||||||
DetachComponent(FPBodyMesh);
|
DetachComponent(FPBodyMesh);
|
||||||
@ -667,7 +667,7 @@ simulated function PlayRagdollDeath(class<DamageType> DamageType, vector HitLoc)
|
|||||||
|
|
||||||
PrepareRagdoll();
|
PrepareRagdoll();
|
||||||
|
|
||||||
if ( InitRagdoll() )
|
if (InitRagdoll())
|
||||||
{
|
{
|
||||||
// Switch to a good RigidBody TickGroup to fix projectiles passing through the mesh
|
// Switch to a good RigidBody TickGroup to fix projectiles passing through the mesh
|
||||||
// https://udn.unrealengine.com/questions/190581/projectile-touch-not-called.html
|
// https://udn.unrealengine.com/questions/190581/projectile-touch-not-called.html
|
||||||
@ -682,7 +682,7 @@ simulated function PlayRagdollDeath(class<DamageType> DamageType, vector HitLoc)
|
|||||||
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'))
|
||||||
{
|
{
|
||||||
DoSpecialMove(SM_DeathAnim, TRUE,,,TRUE);
|
DoSpecialMove(SM_DeathAnim, TRUE,,,TRUE);
|
||||||
KFSM_DeathAnim(SpecialMoves[SM_DeathAnim]).PlayDeathAnimation(DamageType, HitDirection, HitInfo.BoneName);
|
KFSM_DeathAnim(SpecialMoves[SM_DeathAnim]).PlayDeathAnimation(DamageType, HitDirection, HitInfo.BoneName);
|
||||||
@ -695,7 +695,7 @@ simulated function PlayRagdollDeath(class<DamageType> DamageType, vector HitLoc)
|
|||||||
}
|
}
|
||||||
simulated function StartFeignDeathRecoveryAnim()
|
simulated function StartFeignDeathRecoveryAnim()
|
||||||
{
|
{
|
||||||
if( FPBodyMesh!=None && !bFPLegsAttached && bOnFirstPerson && Class'ExtPlayerController'.Default.bShowFPLegs )
|
if(FPBodyMesh!=None && !bFPLegsAttached && bOnFirstPerson && Class'ExtPlayerController'.Default.bShowFPLegs)
|
||||||
{
|
{
|
||||||
bFPLegsAttached = true;
|
bFPLegsAttached = true;
|
||||||
AttachComponent(FPBodyMesh);
|
AttachComponent(FPBodyMesh);
|
||||||
@ -729,7 +729,7 @@ 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();
|
||||||
@ -737,34 +737,34 @@ function AddDefaultInventory()
|
|||||||
|
|
||||||
simulated event FellOutOfWorld(class<DamageType> dmgType)
|
simulated event FellOutOfWorld(class<DamageType> dmgType)
|
||||||
{
|
{
|
||||||
if ( Role==ROLE_Authority && NextRedeemTimer<WorldInfo.TimeSeconds ) // Make sure to not to spam deathmessages while ghosting.
|
if (Role==ROLE_Authority && NextRedeemTimer<WorldInfo.TimeSeconds) // Make sure to not to spam deathmessages while ghosting.
|
||||||
Super.FellOutOfWorld(dmgType);
|
Super.FellOutOfWorld(dmgType);
|
||||||
}
|
}
|
||||||
simulated event OutsideWorldBounds()
|
simulated event OutsideWorldBounds()
|
||||||
{
|
{
|
||||||
if ( Role==ROLE_Authority && NextRedeemTimer<WorldInfo.TimeSeconds )
|
if (Role==ROLE_Authority && NextRedeemTimer<WorldInfo.TimeSeconds)
|
||||||
Super.OutsideWorldBounds();
|
Super.OutsideWorldBounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function KFCharacterInfoBase GetCharacterInfo()
|
simulated function KFCharacterInfoBase GetCharacterInfo()
|
||||||
{
|
{
|
||||||
if( ExtPlayerReplicationInfo(PlayerReplicationInfo)!=None )
|
if(ExtPlayerReplicationInfo(PlayerReplicationInfo)!=None)
|
||||||
return ExtPlayerReplicationInfo(PlayerReplicationInfo).GetSelectedArch();
|
return ExtPlayerReplicationInfo(PlayerReplicationInfo).GetSelectedArch();
|
||||||
return Super.GetCharacterInfo();
|
return Super.GetCharacterInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function SetCharacterArch(KFCharacterInfoBase Info, optional bool bForce )
|
simulated function SetCharacterArch(KFCharacterInfoBase Info, optional bool bForce)
|
||||||
{
|
{
|
||||||
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
|
||||||
CharacterArch = Info;
|
CharacterArch = Info;
|
||||||
CharacterArch.SetCharacterFromArch( self, KFPRI );
|
CharacterArch.SetCharacterFromArch(self, KFPRI);
|
||||||
class'ExtCharacterInfo'.Static.SetCharacterMeshFromArch( KFCharacterInfo_Human(CharacterArch), self, KFPRI );
|
class'ExtCharacterInfo'.Static.SetCharacterMeshFromArch(KFCharacterInfo_Human(CharacterArch), self, KFPRI);
|
||||||
class'ExtCharacterInfo'.Static.SetFirstPersonArmsFromArch( KFCharacterInfo_Human(CharacterArch), self, KFPRI );
|
class'ExtCharacterInfo'.Static.SetFirstPersonArmsFromArch(KFCharacterInfo_Human(CharacterArch), self, KFPRI);
|
||||||
|
|
||||||
SetCharacterAnimationInfo();
|
SetCharacterAnimationInfo();
|
||||||
|
|
||||||
@ -779,21 +779,21 @@ simulated function SetCharacterArch(KFCharacterInfoBase Info, optional bool bFor
|
|||||||
WeaponAttachmentChanged(true);
|
WeaponAttachmentChanged(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( WorldInfo.NetMode != NM_DedicatedServer )
|
if(WorldInfo.NetMode != NM_DedicatedServer)
|
||||||
{
|
{
|
||||||
// Attach/Reattach flashlight components when mesh is set
|
// Attach/Reattach flashlight components when mesh is set
|
||||||
if ( Flashlight == None && FlashLightTemplate != None )
|
if (Flashlight == None && FlashLightTemplate != None)
|
||||||
{
|
{
|
||||||
Flashlight = new(self) Class'KFFlashlightAttachment' (FlashLightTemplate);
|
Flashlight = new(self) Class'KFFlashlightAttachment' (FlashLightTemplate);
|
||||||
}
|
}
|
||||||
if ( FlashLight != None )
|
if (FlashLight != None)
|
||||||
{
|
{
|
||||||
Flashlight.AttachFlashlight(Mesh);
|
Flashlight.AttachFlashlight(Mesh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( CharacterArch != none )
|
if(CharacterArch != none)
|
||||||
{
|
{
|
||||||
if( CharacterArch.VoiceGroupArchName != "" )
|
if(CharacterArch.VoiceGroupArchName != "")
|
||||||
VoiceGroupArch = class<KFPawnVoiceGroup>(class'ExtCharacterInfo'.Static.SafeLoadObject(CharacterArch.VoiceGroupArchName, class'Class'));
|
VoiceGroupArch = class<KFPawnVoiceGroup>(class'ExtCharacterInfo'.Static.SafeLoadObject(CharacterArch.VoiceGroupArchName, class'Class'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -807,7 +807,7 @@ ignores FaceRotation, SetMovementPhysics;
|
|||||||
{
|
{
|
||||||
bIsSprinting = false;
|
bIsSprinting = false;
|
||||||
}
|
}
|
||||||
simulated event RigidBodyCollision( PrimitiveComponent HitComponent, PrimitiveComponent OtherComponent, const out CollisionImpactData RigidCollisionData, int ContactIndex )
|
simulated event RigidBodyCollision(PrimitiveComponent HitComponent, PrimitiveComponent OtherComponent, const out CollisionImpactData RigidCollisionData, int ContactIndex)
|
||||||
{
|
{
|
||||||
// only check fall damage for Z axis collisions
|
// only check fall damage for Z axis collisions
|
||||||
if (Abs(RigidCollisionData.ContactInfos[0].ContactNormal.Z) > 0.5)
|
if (Abs(RigidCollisionData.ContactInfos[0].ContactNormal.Z) > 0.5)
|
||||||
@ -852,9 +852,9 @@ ignores FaceRotation, SetMovementPhysics;
|
|||||||
{
|
{
|
||||||
local rotator NewRotation;
|
local rotator NewRotation;
|
||||||
|
|
||||||
if( bPlayingFeignDeathRecovery )
|
if(bPlayingFeignDeathRecovery)
|
||||||
{
|
{
|
||||||
if( PlayerController(Controller) != None )
|
if(PlayerController(Controller) != None)
|
||||||
{
|
{
|
||||||
// interpolate Controller yaw to our yaw so that we don't get our rotation snapped around when we get out of feign death
|
// interpolate Controller yaw to our yaw so that we don't get our rotation snapped around when we get out of feign death
|
||||||
NewRotation = Controller.Rotation;
|
NewRotation = Controller.Rotation;
|
||||||
@ -862,7 +862,7 @@ ignores FaceRotation, SetMovementPhysics;
|
|||||||
Controller.SetRotation(NewRotation);
|
Controller.SetRotation(NewRotation);
|
||||||
}
|
}
|
||||||
Mesh.PhysicsWeight = FMax(Mesh.PhysicsWeight-(DeltaTime*2.f),0.f);
|
Mesh.PhysicsWeight = FMax(Mesh.PhysicsWeight-(DeltaTime*2.f),0.f);
|
||||||
if( Mesh.PhysicsWeight<=0 )
|
if(Mesh.PhysicsWeight<=0)
|
||||||
StartFeignDeathRecoveryAnim();
|
StartFeignDeathRecoveryAnim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -872,7 +872,7 @@ ignores FaceRotation, SetMovementPhysics;
|
|||||||
local KFWeapon UTWeap;
|
local KFWeapon UTWeap;
|
||||||
|
|
||||||
// Abort current special move
|
// Abort current special move
|
||||||
if( IsDoingSpecialMove() )
|
if(IsDoingSpecialMove())
|
||||||
SpecialMoveHandler.EndSpecialMove();
|
SpecialMoveHandler.EndSpecialMove();
|
||||||
|
|
||||||
bCanPickupInventory = false;
|
bCanPickupInventory = false;
|
||||||
@ -885,11 +885,11 @@ ignores FaceRotation, SetMovementPhysics;
|
|||||||
UTWeap.SetIronSights(false);
|
UTWeap.SetIronSights(false);
|
||||||
UTWeap.PlayWeaponPutDown(0.5f);
|
UTWeap.PlayWeaponPutDown(0.5f);
|
||||||
}
|
}
|
||||||
if( WorldInfo.NetMode!=NM_Client )
|
if(WorldInfo.NetMode!=NM_Client)
|
||||||
{
|
{
|
||||||
if( ExtPlayerController(Controller)!=None )
|
if(ExtPlayerController(Controller)!=None)
|
||||||
ExtPlayerController(Controller).EnterRagdollMode(true);
|
ExtPlayerController(Controller).EnterRagdollMode(true);
|
||||||
else if( Controller!=None )
|
else if(Controller!=None)
|
||||||
Controller.ReplicatedEvent('RagdollMove');
|
Controller.ReplicatedEvent('RagdollMove');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -905,7 +905,7 @@ ignores FaceRotation, SetMovementPhysics;
|
|||||||
}
|
}
|
||||||
function bool CanBeRedeemed()
|
function bool CanBeRedeemed()
|
||||||
{
|
{
|
||||||
if( bFeigningDeath )
|
if(bFeigningDeath)
|
||||||
PlayFeignDeath(false,true);
|
PlayFeignDeath(false,true);
|
||||||
NextRedeemTimer = WorldInfo.TimeSeconds+0.25;
|
NextRedeemTimer = WorldInfo.TimeSeconds+0.25;
|
||||||
return false;
|
return false;
|
||||||
@ -916,13 +916,13 @@ ignores FaceRotation, SetMovementPhysics;
|
|||||||
|
|
||||||
Mesh.AnimSets.RemoveItem(WakeUpAnimSet);
|
Mesh.AnimSets.RemoveItem(WakeUpAnimSet);
|
||||||
BodyStanceNodes[EAS_FullBody].bNoNotifies = false;
|
BodyStanceNodes[EAS_FullBody].bNoNotifies = false;
|
||||||
if (NextStateName != 'Dying' )
|
if (NextStateName != 'Dying')
|
||||||
{
|
{
|
||||||
bNoWeaponFiring = default.bNoWeaponFiring;
|
bNoWeaponFiring = default.bNoWeaponFiring;
|
||||||
bCanPickupInventory = default.bCanPickupInventory;
|
bCanPickupInventory = default.bCanPickupInventory;
|
||||||
|
|
||||||
UTWeap = KFWeapon(Weapon);
|
UTWeap = KFWeapon(Weapon);
|
||||||
if ( UTWeap != None )
|
if (UTWeap != None)
|
||||||
{
|
{
|
||||||
WeaponAttachmentTemplate = UTWeap.AttachmentArchetype;
|
WeaponAttachmentTemplate = UTWeap.AttachmentArchetype;
|
||||||
UTWeap.PlayWeaponEquip(0.5f);
|
UTWeap.PlayWeaponEquip(0.5f);
|
||||||
@ -930,11 +930,11 @@ ignores FaceRotation, SetMovementPhysics;
|
|||||||
|
|
||||||
Global.SetMovementPhysics();
|
Global.SetMovementPhysics();
|
||||||
bPlayingFeignDeathRecovery = false;
|
bPlayingFeignDeathRecovery = false;
|
||||||
if( WorldInfo.NetMode!=NM_Client )
|
if(WorldInfo.NetMode!=NM_Client)
|
||||||
{
|
{
|
||||||
if( ExtPlayerController(Controller)!=None )
|
if(ExtPlayerController(Controller)!=None)
|
||||||
ExtPlayerController(Controller).EnterRagdollMode(false);
|
ExtPlayerController(Controller).EnterRagdollMode(false);
|
||||||
else if( Controller!=None )
|
else if(Controller!=None)
|
||||||
Controller.ReplicatedEvent('EndRagdollMove');
|
Controller.ReplicatedEvent('EndRagdollMove');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -952,9 +952,9 @@ Ignores FaceRotation, SetMovementPhysics, UnsetFeignDeath, Tick, TakeDamage, Die
|
|||||||
{
|
{
|
||||||
bCanPickupInventory = false;
|
bCanPickupInventory = false;
|
||||||
bNoWeaponFiring = true;
|
bNoWeaponFiring = true;
|
||||||
if( ExtPlayerController(Controller)!=None )
|
if(ExtPlayerController(Controller)!=None)
|
||||||
ExtPlayerController(Controller).EnterRagdollMode(true);
|
ExtPlayerController(Controller).EnterRagdollMode(true);
|
||||||
else if( Controller!=None )
|
else if(Controller!=None)
|
||||||
Controller.ReplicatedEvent('RagdollMove');
|
Controller.ReplicatedEvent('RagdollMove');
|
||||||
|
|
||||||
SetTimer(2,false,'TransformToZed');
|
SetTimer(2,false,'TransformToZed');
|
||||||
@ -970,7 +970,7 @@ Ignores FaceRotation, SetMovementPhysics, UnsetFeignDeath, Tick, TakeDamage, Die
|
|||||||
{
|
{
|
||||||
local VS_ZedRecentZed Z;
|
local VS_ZedRecentZed Z;
|
||||||
|
|
||||||
if( Controller==None )
|
if(Controller==None)
|
||||||
{
|
{
|
||||||
Destroy();
|
Destroy();
|
||||||
return;
|
return;
|
||||||
@ -978,7 +978,7 @@ Ignores FaceRotation, SetMovementPhysics, UnsetFeignDeath, Tick, TakeDamage, Die
|
|||||||
PlayFeignDeath(false);
|
PlayFeignDeath(false);
|
||||||
SetCollision(false,false);
|
SetCollision(false,false);
|
||||||
Z = Spawn(class'VS_ZedRecentZed',,,Location,Rotation,,true);
|
Z = Spawn(class'VS_ZedRecentZed',,,Location,Rotation,,true);
|
||||||
if( Z==None )
|
if(Z==None)
|
||||||
{
|
{
|
||||||
Super.Died(None,Class'DamageType',Location);
|
Super.Died(None,Class'DamageType',Location);
|
||||||
return;
|
return;
|
||||||
@ -991,15 +991,15 @@ Ignores FaceRotation, SetMovementPhysics, UnsetFeignDeath, Tick, TakeDamage, Die
|
|||||||
Controller.Possess(Z,false);
|
Controller.Possess(Z,false);
|
||||||
WorldInfo.Game.ChangeTeam(Controller,255,true);
|
WorldInfo.Game.ChangeTeam(Controller,255,true);
|
||||||
WorldInfo.Game.SetPlayerDefaults(Z);
|
WorldInfo.Game.SetPlayerDefaults(Z);
|
||||||
if( ExtPlayerController(Controller)!=None )
|
if(ExtPlayerController(Controller)!=None)
|
||||||
Controller.GoToState('RagdollMove');
|
Controller.GoToState('RagdollMove');
|
||||||
else if( Controller!=None )
|
else if(Controller!=None)
|
||||||
Controller.ReplicatedEvent('RagdollMove');
|
Controller.ReplicatedEvent('RagdollMove');
|
||||||
Z.WakeUp();
|
Z.WakeUp();
|
||||||
if( ExtPlayerReplicationInfo(Controller.PlayerReplicationInfo)!=None )
|
if(ExtPlayerReplicationInfo(Controller.PlayerReplicationInfo)!=None)
|
||||||
{
|
{
|
||||||
ExtPlayerReplicationInfo(Controller.PlayerReplicationInfo).PlayerHealth = Min(Z.Health,255);
|
ExtPlayerReplicationInfo(Controller.PlayerReplicationInfo).PlayerHealth = Min(Z.Health,255);
|
||||||
ExtPlayerReplicationInfo(Controller.PlayerReplicationInfo).PlayerHealthPercent = FloatToByte( float(Z.Health) / float(Z.HealthMax) );
|
ExtPlayerReplicationInfo(Controller.PlayerReplicationInfo).PlayerHealthPercent = FloatToByte(float(Z.Health) / float(Z.HealthMax));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controller = None;
|
Controller = None;
|
||||||
@ -1021,7 +1021,7 @@ simulated final function InitFPLegs()
|
|||||||
FPBodyMesh.SetNotifyRigidBodyCollision(false);
|
FPBodyMesh.SetNotifyRigidBodyCollision(false);
|
||||||
FPBodyMesh.SetTraceBlocking(false, false);
|
FPBodyMesh.SetTraceBlocking(false, false);
|
||||||
|
|
||||||
for( i=0; i<Mesh.Materials.length; i++ )
|
for(i=0; i<Mesh.Materials.length; i++)
|
||||||
FPBodyMesh.SetMaterial(i, Mesh.Materials[i]);
|
FPBodyMesh.SetMaterial(i, Mesh.Materials[i]);
|
||||||
|
|
||||||
FPBodyMesh.HideBoneByName('neck', PBO_None);
|
FPBodyMesh.HideBoneByName('neck', PBO_None);
|
||||||
@ -1035,10 +1035,10 @@ simulated function SetMeshVisibility(bool bVisible)
|
|||||||
{
|
{
|
||||||
Super.SetMeshVisibility(bVisible);
|
Super.SetMeshVisibility(bVisible);
|
||||||
|
|
||||||
if( Health>0 )
|
if(Health>0)
|
||||||
{
|
{
|
||||||
bOnFirstPerson = !bVisible;
|
bOnFirstPerson = !bVisible;
|
||||||
if( AttachedBackItem!=None )
|
if(AttachedBackItem!=None)
|
||||||
AttachedBackItem.SetHidden(bOnFirstPerson);
|
AttachedBackItem.SetHidden(bOnFirstPerson);
|
||||||
UpdateFPLegs();
|
UpdateFPLegs();
|
||||||
}
|
}
|
||||||
@ -1046,14 +1046,14 @@ simulated function SetMeshVisibility(bool bVisible)
|
|||||||
|
|
||||||
simulated final function UpdateFPLegs()
|
simulated final function UpdateFPLegs()
|
||||||
{
|
{
|
||||||
if( FPBodyMesh!=None )
|
if(FPBodyMesh!=None)
|
||||||
{
|
{
|
||||||
if( !bFPLegsAttached && Physics!=PHYS_RigidBody && bOnFirstPerson && Class'ExtPlayerController'.Default.bShowFPLegs )
|
if(!bFPLegsAttached && Physics!=PHYS_RigidBody && bOnFirstPerson && Class'ExtPlayerController'.Default.bShowFPLegs)
|
||||||
{
|
{
|
||||||
bFPLegsAttached = true;
|
bFPLegsAttached = true;
|
||||||
AttachComponent(FPBodyMesh);
|
AttachComponent(FPBodyMesh);
|
||||||
|
|
||||||
if( !bFPLegsInit && CharacterArch!=None )
|
if(!bFPLegsInit && CharacterArch!=None)
|
||||||
InitFPLegs();
|
InitFPLegs();
|
||||||
}
|
}
|
||||||
FPBodyMesh.SetHidden(!bOnFirstPerson || !Class'ExtPlayerController'.Default.bShowFPLegs);
|
FPBodyMesh.SetHidden(!bOnFirstPerson || !Class'ExtPlayerController'.Default.bShowFPLegs);
|
||||||
@ -1062,11 +1062,11 @@ simulated final function UpdateFPLegs()
|
|||||||
|
|
||||||
simulated event PostInitAnimTree(SkeletalMeshComponent SkelComp)
|
simulated event PostInitAnimTree(SkeletalMeshComponent SkelComp)
|
||||||
{
|
{
|
||||||
if( SkelComp==Mesh ) // Do not allow first person legs eat up animation slots.
|
if(SkelComp==Mesh) // Do not allow first person legs eat up animation slots.
|
||||||
Super.PostInitAnimTree(SkelComp);
|
Super.PostInitAnimTree(SkelComp);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated final function SetBackpackWeapon( class<KFWeapon> WC )
|
simulated final function SetBackpackWeapon(class<KFWeapon> WC)
|
||||||
{
|
{
|
||||||
local KFCharacterInfo_Human MyCharacter;
|
local KFCharacterInfo_Human MyCharacter;
|
||||||
local Rotator MyRot;
|
local Rotator MyRot;
|
||||||
@ -1075,19 +1075,19 @@ simulated final function SetBackpackWeapon( class<KFWeapon> WC )
|
|||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
BackpackWeaponClass = WC;
|
BackpackWeaponClass = WC;
|
||||||
if( WorldInfo.NetMode==NM_DedicatedServer )
|
if(WorldInfo.NetMode==NM_DedicatedServer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( WC!=None )
|
if(WC!=None)
|
||||||
{
|
{
|
||||||
if( AttachedBackItem==None )
|
if(AttachedBackItem==None)
|
||||||
{
|
{
|
||||||
AttachedBackItem = new(Self) class'SkeletalMeshComponent';
|
AttachedBackItem = new(Self) class'SkeletalMeshComponent';
|
||||||
AttachedBackItem.SetHidden(false);
|
AttachedBackItem.SetHidden(false);
|
||||||
AttachedBackItem.SetLightingChannels(PawnLightingChannel);
|
AttachedBackItem.SetLightingChannels(PawnLightingChannel);
|
||||||
}
|
}
|
||||||
AttachedBackItem.SetSkeletalMesh(WC.Default.AttachmentArchetype.SkelMesh);
|
AttachedBackItem.SetSkeletalMesh(WC.Default.AttachmentArchetype.SkelMesh);
|
||||||
for( i=0; i<WC.Default.AttachmentArchetype.SkelMesh.Materials.length; i++ )
|
for(i=0; i<WC.Default.AttachmentArchetype.SkelMesh.Materials.length; i++)
|
||||||
{
|
{
|
||||||
AttachedBackItem.SetMaterial(i, WC.Default.AttachmentArchetype.SkelMesh.Materials[i]);
|
AttachedBackItem.SetMaterial(i, WC.Default.AttachmentArchetype.SkelMesh.Materials[i]);
|
||||||
}
|
}
|
||||||
@ -1097,25 +1097,25 @@ simulated final function SetBackpackWeapon( class<KFWeapon> WC )
|
|||||||
MyCharacter = KFPlayerReplicationInfo(PlayerReplicationInfo).CharacterArchetypes[KFPlayerReplicationInfo(PlayerReplicationInfo).RepCustomizationInfo.CharacterIndex];
|
MyCharacter = KFPlayerReplicationInfo(PlayerReplicationInfo).CharacterArchetypes[KFPlayerReplicationInfo(PlayerReplicationInfo).RepCustomizationInfo.CharacterIndex];
|
||||||
WM = WC.Default.AttachmentArchetype.SkelMesh.Name;
|
WM = WC.Default.AttachmentArchetype.SkelMesh.Name;
|
||||||
|
|
||||||
if( ClassIsChildOf(WC, class'KFWeap_Edged_Knife') )
|
if(ClassIsChildOf(WC, class'KFWeap_Edged_Knife'))
|
||||||
{
|
{
|
||||||
MyPos = vect(0,0,10);
|
MyPos = vect(0,0,10);
|
||||||
MyRot = rot(-16384,-8192,0);
|
MyRot = rot(-16384,-8192,0);
|
||||||
B = 'LeftUpLeg';
|
B = 'LeftUpLeg';
|
||||||
}
|
}
|
||||||
else if( class<KFWeap_Welder>(WC) != none || class<KFWeap_Healer_Syringe>(WC) != none || class<KFWeap_Pistol_Medic>(WC) != none || class<KFWeap_SMG_Medic>(WC) != none || ClassIsChildOf(WC, class'KFWeap_PistolBase') || ClassIsChildOf(WC, class'KFWeap_SMGBase') || ClassIsChildOf(WC, class'KFWeap_ThrownBase') )
|
else if(class<KFWeap_Welder>(WC) != none || class<KFWeap_Healer_Syringe>(WC) != none || class<KFWeap_Pistol_Medic>(WC) != none || class<KFWeap_SMG_Medic>(WC) != none || ClassIsChildOf(WC, class'KFWeap_PistolBase') || ClassIsChildOf(WC, class'KFWeap_SMGBase') || ClassIsChildOf(WC, class'KFWeap_ThrownBase'))
|
||||||
{
|
{
|
||||||
MyPos = vect(0,0,10);
|
MyPos = vect(0,0,10);
|
||||||
MyRot = rot(0,0,16384);
|
MyRot = rot(0,0,16384);
|
||||||
|
|
||||||
B = 'LeftUpLeg';
|
B = 'LeftUpLeg';
|
||||||
}
|
}
|
||||||
else if( ClassIsChildOf(WC, class'KFWeap_MeleeBase') )
|
else if(ClassIsChildOf(WC, class'KFWeap_MeleeBase'))
|
||||||
{
|
{
|
||||||
MyPos = vect(-5,15,0);
|
MyPos = vect(-5,15,0);
|
||||||
MyRot = rot(0,0,0);
|
MyRot = rot(0,0,0);
|
||||||
|
|
||||||
if( class<KFWeap_Edged_Katana>(WC) != none || class<KFWeap_Edged_Zweihander>(WC) != none )
|
if(class<KFWeap_Edged_Katana>(WC) != none || class<KFWeap_Edged_Zweihander>(WC) != none)
|
||||||
MyPos.Z = -20;
|
MyPos.Z = -20;
|
||||||
|
|
||||||
B = 'Spine';
|
B = 'Spine';
|
||||||
@ -1125,10 +1125,10 @@ simulated final function SetBackpackWeapon( class<KFWeapon> WC )
|
|||||||
MyPos = vect(-18.5,16.5,-18);
|
MyPos = vect(-18.5,16.5,-18);
|
||||||
MyRot = rot(0,0,0);
|
MyRot = rot(0,0,0);
|
||||||
|
|
||||||
if( MyCharacter == KFCharacterInfo_Human'CHR_Playable_ARCH.chr_DJSkully_archetype' )
|
if(MyCharacter == KFCharacterInfo_Human'CHR_Playable_ARCH.chr_DJSkully_archetype')
|
||||||
MyRot.Roll = 8192;
|
MyRot.Roll = 8192;
|
||||||
|
|
||||||
switch( WM )
|
switch(WM)
|
||||||
{
|
{
|
||||||
case 'Wep_3rdP_MB500_Rig':
|
case 'Wep_3rdP_MB500_Rig':
|
||||||
MyPos.X = -45;
|
MyPos.X = -45;
|
||||||
@ -1153,14 +1153,14 @@ simulated final function SetBackpackWeapon( class<KFWeapon> WC )
|
|||||||
Mesh.AttachComponent(AttachedBackItem, B);
|
Mesh.AttachComponent(AttachedBackItem, B);
|
||||||
AttachedBackItem.SetHidden(bOnFirstPerson);
|
AttachedBackItem.SetHidden(bOnFirstPerson);
|
||||||
}
|
}
|
||||||
else if( AttachedBackItem!=None )
|
else if(AttachedBackItem!=None)
|
||||||
AttachedBackItem.SetHidden(true);
|
AttachedBackItem.SetHidden(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function PlayDying(class<DamageType> DamageType, vector HitLoc)
|
simulated function PlayDying(class<DamageType> DamageType, vector HitLoc)
|
||||||
{
|
{
|
||||||
FPBodyMesh.SetHidden(true);
|
FPBodyMesh.SetHidden(true);
|
||||||
if( AttachedBackItem!=None )
|
if(AttachedBackItem!=None)
|
||||||
AttachedBackItem.SetHidden(true);
|
AttachedBackItem.SetHidden(true);
|
||||||
Super.PlayDying(DamageType,HitLoc);
|
Super.PlayDying(DamageType,HitLoc);
|
||||||
}
|
}
|
||||||
@ -1169,7 +1169,7 @@ simulated function SetCharacterAnimationInfo()
|
|||||||
{
|
{
|
||||||
Super.SetCharacterAnimationInfo();
|
Super.SetCharacterAnimationInfo();
|
||||||
|
|
||||||
if( !bFPLegsInit && bFPLegsAttached )
|
if(!bFPLegsInit && bFPLegsAttached)
|
||||||
InitFPLegs();
|
InitFPLegs();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1186,7 +1186,7 @@ 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)
|
||||||
{
|
{
|
||||||
PlayerOldWeapon = KFWeapon(OldWeapon);
|
PlayerOldWeapon = KFWeapon(OldWeapon);
|
||||||
SetBackpackWeapon(PlayerOldWeapon!=None ? PlayerOldWeapon.Class : None);
|
SetBackpackWeapon(PlayerOldWeapon!=None ? PlayerOldWeapon.Class : None);
|
||||||
@ -1198,11 +1198,11 @@ simulated function UpdateHealingSpeedBoostMod(ExtPlayerController Healer)
|
|||||||
local Ext_PerkFieldMedic MedPerk;
|
local Ext_PerkFieldMedic MedPerk;
|
||||||
|
|
||||||
MedPerk = GetMedicPerk(Healer);
|
MedPerk = GetMedicPerk(Healer);
|
||||||
if( MedPerk == None )
|
if(MedPerk == None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
HealingSpeedBoostMod = Min( HealingSpeedBoostMod + MedPerk.GetHealingSpeedBoost(), MedPerk.GetMaxHealingSpeedBoost() );
|
HealingSpeedBoostMod = Min(HealingSpeedBoostMod + MedPerk.GetHealingSpeedBoost(), MedPerk.GetMaxHealingSpeedBoost());
|
||||||
SetTimer( MedPerk.GetHealingSpeedBoostDuration(),, nameOf(ResetHealingSpeedBoost) );
|
SetTimer(MedPerk.GetHealingSpeedBoostDuration(),, nameOf(ResetHealingSpeedBoost));
|
||||||
|
|
||||||
UpdateGroundSpeed();
|
UpdateGroundSpeed();
|
||||||
}
|
}
|
||||||
@ -1217,8 +1217,8 @@ simulated function ResetHealingSpeedBoost()
|
|||||||
HealingSpeedBoostMod = 0;
|
HealingSpeedBoostMod = 0;
|
||||||
UpdateGroundSpeed();
|
UpdateGroundSpeed();
|
||||||
|
|
||||||
if( IsTimerActive( nameOf( ResetHealingSpeedBoost ) ) )
|
if(IsTimerActive(nameOf(ResetHealingSpeedBoost)))
|
||||||
ClearTimer( nameOf( ResetHealingSpeedBoost ) );
|
ClearTimer(nameOf(ResetHealingSpeedBoost));
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function UpdateHealingDamageBoostMod(ExtPlayerController Healer)
|
simulated function UpdateHealingDamageBoostMod(ExtPlayerController Healer)
|
||||||
@ -1226,11 +1226,11 @@ simulated function UpdateHealingDamageBoostMod(ExtPlayerController Healer)
|
|||||||
local Ext_PerkFieldMedic MedPerk;
|
local Ext_PerkFieldMedic MedPerk;
|
||||||
|
|
||||||
MedPerk = GetMedicPerk(Healer);
|
MedPerk = GetMedicPerk(Healer);
|
||||||
if( MedPerk == None )
|
if(MedPerk == None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
HealingDamageBoostMod = Min( HealingDamageBoostMod + MedPerk.GetHealingDamageBoost(), MedPerk.GetMaxHealingDamageBoost() );
|
HealingDamageBoostMod = Min(HealingDamageBoostMod + MedPerk.GetHealingDamageBoost(), MedPerk.GetMaxHealingDamageBoost());
|
||||||
SetTimer( MedPerk.GetHealingDamageBoostDuration(),, nameOf(ResetHealingDamageBoost) );
|
SetTimer(MedPerk.GetHealingDamageBoostDuration(),, nameOf(ResetHealingDamageBoost));
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function float GetHealingDamageBoostModifier()
|
simulated function float GetHealingDamageBoostModifier()
|
||||||
@ -1241,8 +1241,8 @@ simulated function float GetHealingDamageBoostModifier()
|
|||||||
simulated function ResetHealingDamageBoost()
|
simulated function ResetHealingDamageBoost()
|
||||||
{
|
{
|
||||||
HealingDamageBoostMod = 0;
|
HealingDamageBoostMod = 0;
|
||||||
if( IsTimerActive( nameOf( ResetHealingDamageBoost ) ) )
|
if(IsTimerActive(nameOf(ResetHealingDamageBoost)))
|
||||||
ClearTimer( nameOf( ResetHealingDamageBoost ) );
|
ClearTimer(nameOf(ResetHealingDamageBoost));
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function UpdateHealingShieldMod(ExtPlayerController Healer)
|
simulated function UpdateHealingShieldMod(ExtPlayerController Healer)
|
||||||
@ -1250,11 +1250,11 @@ simulated function UpdateHealingShieldMod(ExtPlayerController Healer)
|
|||||||
local Ext_PerkFieldMedic MedPerk;
|
local Ext_PerkFieldMedic MedPerk;
|
||||||
|
|
||||||
MedPerk = GetMedicPerk(Healer);
|
MedPerk = GetMedicPerk(Healer);
|
||||||
if( MedPerk == None )
|
if(MedPerk == None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
HealingShieldMod = Min( HealingShieldMod + MedPerk.GetHealingShield(), MedPerk.GetMaxHealingShield() );
|
HealingShieldMod = Min(HealingShieldMod + MedPerk.GetHealingShield(), MedPerk.GetMaxHealingShield());
|
||||||
SetTimer( MedPerk.GetHealingShieldDuration(),, nameOf(ResetHealingShield) );
|
SetTimer(MedPerk.GetHealingShieldDuration(),, nameOf(ResetHealingShield));
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function float GetHealingShieldModifier()
|
simulated function float GetHealingShieldModifier()
|
||||||
@ -1265,8 +1265,8 @@ simulated function float GetHealingShieldModifier()
|
|||||||
simulated function ResetHealingShield()
|
simulated function ResetHealingShield()
|
||||||
{
|
{
|
||||||
HealingShieldMod = 0;
|
HealingShieldMod = 0;
|
||||||
if( IsTimerActive( nameOf( ResetHealingShield ) ) )
|
if(IsTimerActive(nameOf(ResetHealingShield)))
|
||||||
ClearTimer( nameOf( ResetHealingShield ) );
|
ClearTimer(nameOf(ResetHealingShield));
|
||||||
}
|
}
|
||||||
|
|
||||||
function SacrificeExplode()
|
function SacrificeExplode()
|
||||||
@ -1276,7 +1276,7 @@ function SacrificeExplode()
|
|||||||
Super.SacrificeExplode();
|
Super.SacrificeExplode();
|
||||||
|
|
||||||
DemoPerk = Ext_PerkDemolition(ExtPlayerController(Controller).ActivePerkManager.CurrentPerk);
|
DemoPerk = Ext_PerkDemolition(ExtPlayerController(Controller).ActivePerkManager.CurrentPerk);
|
||||||
if( DemoPerk != none )
|
if(DemoPerk != none)
|
||||||
DemoPerk.bUsedSacrifice = true;
|
DemoPerk.bUsedSacrifice = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1285,7 +1285,7 @@ simulated function Ext_PerkFieldMedic GetMedicPerk(ExtPlayerController Healer)
|
|||||||
local Ext_PerkFieldMedic MedPerk;
|
local Ext_PerkFieldMedic MedPerk;
|
||||||
|
|
||||||
MedPerk = Ext_PerkFieldMedic(ExtPlayerController(Controller).ActivePerkManager.CurrentPerk);
|
MedPerk = Ext_PerkFieldMedic(ExtPlayerController(Controller).ActivePerkManager.CurrentPerk);
|
||||||
if( MedPerk != None )
|
if(MedPerk != None)
|
||||||
return MedPerk;
|
return MedPerk;
|
||||||
|
|
||||||
return None;
|
return None;
|
||||||
|
@ -6,9 +6,9 @@ var transient byte MoneyTossCount;
|
|||||||
|
|
||||||
reliable server function ServerThrowMoney()
|
reliable server function ServerThrowMoney()
|
||||||
{
|
{
|
||||||
if( MoneyTossTime>WorldInfo.TimeSeconds )
|
if(MoneyTossTime>WorldInfo.TimeSeconds)
|
||||||
{
|
{
|
||||||
if( MoneyTossCount>=10 )
|
if(MoneyTossCount>=10)
|
||||||
return;
|
return;
|
||||||
++MoneyTossCount;
|
++MoneyTossCount;
|
||||||
MoneyTossTime = FMax(MoneyTossTime,WorldInfo.TimeSeconds+0.5);
|
MoneyTossTime = FMax(MoneyTossTime,WorldInfo.TimeSeconds+0.5);
|
||||||
@ -29,9 +29,9 @@ simulated function Inventory CreateInventory(class<Inventory> NewInventoryItemCl
|
|||||||
SupClass = Super.CreateInventory(NewInventoryItemClass, bDoNotActivate);
|
SupClass = Super.CreateInventory(NewInventoryItemClass, bDoNotActivate);
|
||||||
Wep = KFWeapon(SupClass);
|
Wep = KFWeapon(SupClass);
|
||||||
|
|
||||||
if( Wep != none )
|
if(Wep != none)
|
||||||
{
|
{
|
||||||
if( KFWeap_Pistol_Dual9mm(Wep) != None && ExtWeap_Pistol_Dual9mm(Wep) == None )
|
if(KFWeap_Pistol_Dual9mm(Wep) != None && ExtWeap_Pistol_Dual9mm(Wep) == None)
|
||||||
{
|
{
|
||||||
Wep.Destroy();
|
Wep.Destroy();
|
||||||
return Super.CreateInventory(class'ExtWeap_Pistol_Dual9mm', bDoNotActivate);
|
return Super.CreateInventory(class'ExtWeap_Pistol_Dual9mm', bDoNotActivate);
|
||||||
@ -47,7 +47,7 @@ simulated function CheckForExcessRemoval(KFWeapon NewWeap)
|
|||||||
{
|
{
|
||||||
local Inventory RemoveInv, Inv;
|
local Inventory RemoveInv, Inv;
|
||||||
|
|
||||||
if( KFWeap_Pistol_Dual9mm(NewWeap) != None )
|
if(KFWeap_Pistol_Dual9mm(NewWeap) != None)
|
||||||
{
|
{
|
||||||
for (Inv = InventoryChain; Inv != None; Inv = Inv.Inventory)
|
for (Inv = InventoryChain; Inv != None; Inv = Inv.Inventory)
|
||||||
{
|
{
|
||||||
|
@ -12,24 +12,24 @@ var array<Emote> EmoteList;
|
|||||||
|
|
||||||
var bool bWaitingCharList,bIsCustomChar;
|
var bool bWaitingCharList,bIsCustomChar;
|
||||||
|
|
||||||
function InitializeMenu( KFGFxMoviePlayer_Manager InManager )
|
function InitializeMenu(KFGFxMoviePlayer_Manager InManager)
|
||||||
{
|
{
|
||||||
super(KFGFxObject_Menu).InitializeMenu(InManager);
|
super(KFGFxObject_Menu).InitializeMenu(InManager);
|
||||||
CheckForCustomizationPawn( GetPC() );
|
CheckForCustomizationPawn(GetPC());
|
||||||
LocalizeText();
|
LocalizeText();
|
||||||
EmoteList = class'ExtEmoteList'.static.GetEmoteArray();
|
EmoteList = class'ExtEmoteList'.static.GetEmoteArray();
|
||||||
InitCharacterMenu();
|
InitCharacterMenu();
|
||||||
// TraderItems = KFGameReplicationInfo( GetPC().WorldInfo.GRI ).TraderItems;
|
// TraderItems = KFGameReplicationInfo(GetPC().WorldInfo.GRI).TraderItems;
|
||||||
}
|
}
|
||||||
function InitCharacterMenu()
|
function InitCharacterMenu()
|
||||||
{
|
{
|
||||||
ExtPRI = ExtPlayerReplicationInfo(GetPC().PlayerReplicationInfo);
|
ExtPRI = ExtPlayerReplicationInfo(GetPC().PlayerReplicationInfo);
|
||||||
|
|
||||||
if( ExtPRI!=None && ExtPRI.bClientInitChars )
|
if(ExtPRI!=None && ExtPRI.bClientInitChars)
|
||||||
CharListRecieved();
|
CharListRecieved();
|
||||||
else if( ExtPRI==None )
|
else if(ExtPRI==None)
|
||||||
{
|
{
|
||||||
if( GetPC().PlayerReplicationInfo!=None ) // Faulty mod setup.
|
if(GetPC().PlayerReplicationInfo!=None) // Faulty mod setup.
|
||||||
{
|
{
|
||||||
bWaitingCharList = true;
|
bWaitingCharList = true;
|
||||||
return;
|
return;
|
||||||
@ -48,9 +48,9 @@ event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
|
|||||||
switch(WidgetName)
|
switch(WidgetName)
|
||||||
{
|
{
|
||||||
case 'perkSelectionContainer':
|
case 'perkSelectionContainer':
|
||||||
if ( PerkSelectionContainer == none )
|
if (PerkSelectionContainer == none)
|
||||||
{
|
{
|
||||||
PerkSelectionContainer = KFGFxGearContainer_PerksSelection( Widget );
|
PerkSelectionContainer = KFGFxGearContainer_PerksSelection(Widget);
|
||||||
PerkSelectionContainer.Initialize(self);
|
PerkSelectionContainer.Initialize(self);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -64,13 +64,13 @@ function OnOpen()
|
|||||||
local PlayerController PC;
|
local PlayerController PC;
|
||||||
|
|
||||||
PC = GetPC();
|
PC = GetPC();
|
||||||
if( PC == none )
|
if(PC == none)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CheckForCustomizationPawn( PC );
|
CheckForCustomizationPawn(PC);
|
||||||
//GetGameViewportClient().HandleInputAxis = OnAxisModified;
|
//GetGameViewportClient().HandleInputAxis = OnAxisModified;
|
||||||
|
|
||||||
if ( PC.PlayerReplicationInfo.bReadyToPlay && PC.WorldInfo.GRI.bMatchHasBegun )
|
if (PC.PlayerReplicationInfo.bReadyToPlay && PC.WorldInfo.GRI.bMatchHasBegun)
|
||||||
{
|
{
|
||||||
// Players cannot change characters if they are in a game
|
// Players cannot change characters if they are in a game
|
||||||
SetBool("characterButtonEnabled", false);
|
SetBool("characterButtonEnabled", false);
|
||||||
@ -78,14 +78,14 @@ function OnOpen()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** The customization pawn won't exist if this menu was opened mid-match */
|
/** The customization pawn won't exist if this menu was opened mid-match */
|
||||||
function CheckForCustomizationPawn( PlayerController PC )
|
function CheckForCustomizationPawn(PlayerController PC)
|
||||||
{
|
{
|
||||||
local KFPlayerController KFPC;
|
local KFPlayerController KFPC;
|
||||||
|
|
||||||
if( PC.Pawn == None || (!PC.Pawn.IsAliveAndWell() && KFPawn_Customization(PC.Pawn) == None) )
|
if(PC.Pawn == None || (!PC.Pawn.IsAliveAndWell() && KFPawn_Customization(PC.Pawn) == None))
|
||||||
{
|
{
|
||||||
KFPC = KFPlayerController( PC );
|
KFPC = KFPlayerController(PC);
|
||||||
if( KFPC != None )
|
if(KFPC != None)
|
||||||
{
|
{
|
||||||
KFPC.SpawnMidGameCustomizationPawn();
|
KFPC.SpawnMidGameCustomizationPawn();
|
||||||
}
|
}
|
||||||
@ -128,9 +128,9 @@ function UpdateEmoteList()
|
|||||||
|
|
||||||
for (i = 0; i < EmoteList.length; i++)
|
for (i = 0; i < EmoteList.length; i++)
|
||||||
{
|
{
|
||||||
if ( class'ExtEmoteList'.static.GetUnlockedEmote(EmoteList[i].Id, ExtPlayerController(GetPC())) != 'NONE')
|
if (class'ExtEmoteList'.static.GetUnlockedEmote(EmoteList[i].Id, ExtPlayerController(GetPC())) != 'NONE')
|
||||||
{
|
{
|
||||||
SlotObject = CreateObject( "Object" );
|
SlotObject = CreateObject("Object");
|
||||||
SlotObject.SetInt("ItemIndex", i);
|
SlotObject.SetInt("ItemIndex", i);
|
||||||
SlotObject.SetString("label", Localize(EmoteList[i].ItemName, "EmoteName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString));
|
SlotObject.SetString("label", Localize(EmoteList[i].ItemName, "EmoteName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString));
|
||||||
TexturePath = "img://"$EmoteList[i].IconPath;
|
TexturePath = "img://"$EmoteList[i].IconPath;
|
||||||
@ -157,9 +157,9 @@ function UpdateCharacterList()
|
|||||||
bWaitingCharList = false;
|
bWaitingCharList = false;
|
||||||
ItemIndex = 0;
|
ItemIndex = 0;
|
||||||
DataProvider = CreateArray();
|
DataProvider = CreateArray();
|
||||||
for( i=0; i<ExtPRI.CharacterArchetypes.length; i++)
|
for(i=0; i<ExtPRI.CharacterArchetypes.length; i++)
|
||||||
{
|
{
|
||||||
SlotObject = CreateObject( "Object" );
|
SlotObject = CreateObject("Object");
|
||||||
SlotObject.SetInt("ItemIndex", i);
|
SlotObject.SetInt("ItemIndex", i);
|
||||||
SlotObject.SetString("label", Localize(String(ExtPRI.CharacterArchetypes[i].Name), "CharacterName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString));
|
SlotObject.SetString("label", Localize(String(ExtPRI.CharacterArchetypes[i].Name), "CharacterName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString));
|
||||||
SlotObject.SetBool("enabled", true);
|
SlotObject.SetBool("enabled", true);
|
||||||
@ -168,11 +168,11 @@ function UpdateCharacterList()
|
|||||||
DataProvider.SetElementObject(ItemIndex, SlotObject);
|
DataProvider.SetElementObject(ItemIndex, SlotObject);
|
||||||
ItemIndex++;
|
ItemIndex++;
|
||||||
}
|
}
|
||||||
for( i=0; i<ExtPRI.CustomCharList.length; i++)
|
for(i=0; i<ExtPRI.CustomCharList.length; i++)
|
||||||
{
|
{
|
||||||
if( !ExtPRI.IsClientCharLocked(ExtPRI.CharacterArchetypes.length+i) )
|
if(!ExtPRI.IsClientCharLocked(ExtPRI.CharacterArchetypes.length+i))
|
||||||
{
|
{
|
||||||
SlotObject = CreateObject( "Object" );
|
SlotObject = CreateObject("Object");
|
||||||
SlotObject.SetInt("ItemIndex", (ExtPRI.CharacterArchetypes.length+i));
|
SlotObject.SetInt("ItemIndex", (ExtPRI.CharacterArchetypes.length+i));
|
||||||
SlotObject.SetString("label", Repl(string(ExtPRI.CustomCharList[i].Char.Name),"_"," "));
|
SlotObject.SetString("label", Repl(string(ExtPRI.CustomCharList[i].Char.Name),"_"," "));
|
||||||
SlotObject.SetBool("enabled", true);
|
SlotObject.SetBool("enabled", true);
|
||||||
@ -188,7 +188,7 @@ function UpdateCharacterList()
|
|||||||
|
|
||||||
function UpdateGear()
|
function UpdateGear()
|
||||||
{
|
{
|
||||||
if( bWaitingCharList )
|
if(bWaitingCharList)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CurrentCharInfo = ExtPRI.GetSelectedArch();
|
CurrentCharInfo = ExtPRI.GetSelectedArch();
|
||||||
@ -207,16 +207,16 @@ function UpdateGear()
|
|||||||
SetCurrentCharacterButtons();
|
SetCurrentCharacterButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
final function string GetMenuName( Object Obj )
|
final function string GetMenuName(Object Obj)
|
||||||
{
|
{
|
||||||
return Obj==None ? "Empty" : Repl(string(Obj.Name),"_"," ");
|
return Obj==None ? "Empty" : Repl(string(Obj.Name),"_"," ");
|
||||||
}
|
}
|
||||||
final function string GetMenuNameStr( string ObjName )
|
final function string GetMenuNameStr(string ObjName)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
i = InStr(ObjName,".",true);
|
i = InStr(ObjName,".",true);
|
||||||
if( i!=-1 )
|
if(i!=-1)
|
||||||
ObjName = Mid(ObjName,i+1);
|
ObjName = Mid(ObjName,i+1);
|
||||||
return Repl(ObjName,"_"," ");
|
return Repl(ObjName,"_"," ");
|
||||||
}
|
}
|
||||||
@ -236,18 +236,18 @@ function UpdateMeshList(string OutfitKey, string SkinKey, array<OutfitVariants>
|
|||||||
Outfit = Outfits[i];
|
Outfit = Outfits[i];
|
||||||
|
|
||||||
OutfitName = Localize(CharInfoPath, OutfitKey$i, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString);
|
OutfitName = Localize(CharInfoPath, OutfitKey$i, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString);
|
||||||
if( bIsCustomChar )
|
if(bIsCustomChar)
|
||||||
OutfitName = GetMenuNameStr(Outfit.MeshName);
|
OutfitName = GetMenuNameStr(Outfit.MeshName);
|
||||||
|
|
||||||
if ( InStr(OutfitName, "?INT?") != -1 )
|
if (InStr(OutfitName, "?INT?") != -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SlotObject = CreateObject( "Object" );
|
SlotObject = CreateObject("Object");
|
||||||
SlotObject.SetInt("ItemIndex", i);
|
SlotObject.SetInt("ItemIndex", i);
|
||||||
SlotObject.SetString("label", OutfitName);
|
SlotObject.SetString("label", OutfitName);
|
||||||
SlotObject.SetBool("enabled", true);
|
SlotObject.SetBool("enabled", true);
|
||||||
FirstSkin = UpdateOutfitVariants( OutfitKey, SkinKey, Outfit.SkinVariations, i, SlotObject );
|
FirstSkin = UpdateOutfitVariants(OutfitKey, SkinKey, Outfit.SkinVariations, i, SlotObject);
|
||||||
if( string(FirstSkin.UITexture) == "Bad" )
|
if(string(FirstSkin.UITexture) == "Bad")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
TexturePath = "img://"$PathName(FirstSkin.UITexture);
|
TexturePath = "img://"$PathName(FirstSkin.UITexture);
|
||||||
@ -282,7 +282,7 @@ function SkinVariant UpdateOutfitVariants(string OutfitKey, string KeyName, out
|
|||||||
FirstSkin = Skin;
|
FirstSkin = Skin;
|
||||||
bFoundFirst = true;
|
bFoundFirst = true;
|
||||||
}
|
}
|
||||||
SlotObject = CreateObject( "Object" );
|
SlotObject = CreateObject("Object");
|
||||||
SlotObject.SetInt("ItemIndex", i);
|
SlotObject.SetInt("ItemIndex", i);
|
||||||
SlotObject.SetString("label", Localize(SectionPath, KeyName$i, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString));
|
SlotObject.SetString("label", Localize(SectionPath, KeyName$i, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString));
|
||||||
TexturePath = "img://"$PathName(Skin.UITexture);
|
TexturePath = "img://"$PathName(Skin.UITexture);
|
||||||
@ -312,7 +312,7 @@ function UpdateAttachmentsList(array<AttachmentVariants> Attachments)
|
|||||||
MyPawn = GetPC().Pawn;
|
MyPawn = GetPC().Pawn;
|
||||||
|
|
||||||
// Insert blank object
|
// Insert blank object
|
||||||
SlotObject = CreateObject( "Object" );
|
SlotObject = CreateObject("Object");
|
||||||
SlotObject.SetString("label", class'KFGFxMenu_Gear'.default.NoneString);
|
SlotObject.SetString("label", class'KFGFxMenu_Gear'.default.NoneString);
|
||||||
SlotObject.SetString("source", "img://"$class'KFGFxMenu_Gear'.default.ClearImagePath);
|
SlotObject.SetString("source", "img://"$class'KFGFxMenu_Gear'.default.ClearImagePath);
|
||||||
SlotObject.SetInt("ItemIndex", INDEX_NONE);
|
SlotObject.SetInt("ItemIndex", INDEX_NONE);
|
||||||
@ -323,11 +323,11 @@ function UpdateAttachmentsList(array<AttachmentVariants> Attachments)
|
|||||||
for (i = 0; i < Attachments.Length; i++)
|
for (i = 0; i < Attachments.Length; i++)
|
||||||
{
|
{
|
||||||
Variant = Attachments[i];
|
Variant = Attachments[i];
|
||||||
if ( class'ExtCharacterInfo'.static.IsAttachmentAvailable(CurrentCharInfo, Variant, MyPawn) )
|
if (class'ExtCharacterInfo'.static.IsAttachmentAvailable(CurrentCharInfo, Variant, MyPawn))
|
||||||
{
|
{
|
||||||
SlotObject = CreateObject( "Object" );
|
SlotObject = CreateObject("Object");
|
||||||
SlotObject.SetInt("ItemIndex", i);
|
SlotObject.SetInt("ItemIndex", i);
|
||||||
FirstSkin = UpdateCosmeticVariants( class'KFGFxMenu_Gear'.default.AttachmentKey, class'KFGFxMenu_Gear'.default.AttachmentSkinKey, Variant.AttachmentItem, i, SlotObject );
|
FirstSkin = UpdateCosmeticVariants(class'KFGFxMenu_Gear'.default.AttachmentKey, class'KFGFxMenu_Gear'.default.AttachmentSkinKey, Variant.AttachmentItem, i, SlotObject);
|
||||||
AttachmentName = bIsCustomChar ? GetMenuNameStr(Variant.MeshName) : Localize(string(Variant.AttachmentItem.Name), class'KFGFxMenu_Gear'.default.AttachmentKey, class'KFGFxMenu_Gear'.default.KFCharacterInfoString);
|
AttachmentName = bIsCustomChar ? GetMenuNameStr(Variant.MeshName) : Localize(string(Variant.AttachmentItem.Name), class'KFGFxMenu_Gear'.default.AttachmentKey, class'KFGFxMenu_Gear'.default.KFCharacterInfoString);
|
||||||
SlotObject.SetString("label", AttachmentName);
|
SlotObject.SetString("label", AttachmentName);
|
||||||
SlotObject.SetBool("enabled", true);
|
SlotObject.SetBool("enabled", true);
|
||||||
@ -363,7 +363,7 @@ function SkinVariant UpdateCosmeticVariants(string OutfitKey, string KeyName, KF
|
|||||||
FirstSkin = Skin;
|
FirstSkin = Skin;
|
||||||
bFoundFirst = true;
|
bFoundFirst = true;
|
||||||
}
|
}
|
||||||
SlotObject = CreateObject( "Object" );
|
SlotObject = CreateObject("Object");
|
||||||
SlotObject.SetInt("ItemIndex", i);
|
SlotObject.SetInt("ItemIndex", i);
|
||||||
SkinName = Localize(string(Attachment.Name), KeyName$i, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString);
|
SkinName = Localize(string(Attachment.Name), KeyName$i, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString);
|
||||||
SlotObject.SetString("label", SkinName);
|
SlotObject.SetString("label", SkinName);
|
||||||
@ -393,7 +393,7 @@ function SetCurrentCharacterButtons()
|
|||||||
HeadSkinIndex = ExtPRI.RepCustomizationInfo.HeadSkinIndex;
|
HeadSkinIndex = ExtPRI.RepCustomizationInfo.HeadSkinIndex;
|
||||||
BodyMeshIndex = ExtPRI.RepCustomizationInfo.BodyMeshIndex;
|
BodyMeshIndex = ExtPRI.RepCustomizationInfo.BodyMeshIndex;
|
||||||
BodySkinIndex = ExtPRI.RepCustomizationInfo.BodySkinIndex;
|
BodySkinIndex = ExtPRI.RepCustomizationInfo.BodySkinIndex;
|
||||||
if( bCustom )
|
if(bCustom)
|
||||||
{
|
{
|
||||||
CharacterIndex = ExtPRI.CustomCharacter.CharacterIndex;
|
CharacterIndex = ExtPRI.CustomCharacter.CharacterIndex;
|
||||||
HeadMeshIndex = ExtPRI.CustomCharacter.HeadMeshIndex;
|
HeadMeshIndex = ExtPRI.CustomCharacter.HeadMeshIndex;
|
||||||
@ -402,11 +402,11 @@ function SetCurrentCharacterButtons()
|
|||||||
BodySkinIndex = ExtPRI.CustomCharacter.BodySkinIndex;
|
BodySkinIndex = ExtPRI.CustomCharacter.BodySkinIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
DataObject.SetString( "selectedCharacter", (bIsCustomChar ? Repl(string(CurrentCharInfo.Name),"_"," ") : Localize(CharInfoPath, "CharacterName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)) );
|
DataObject.SetString("selectedCharacter", (bIsCustomChar ? Repl(string(CurrentCharInfo.Name),"_"," ") : Localize(CharInfoPath, "CharacterName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)));
|
||||||
DataObject.SetString( "characterBio", (bIsCustomChar ? Repl(CurrentCharInfo.ArmMeshPackageName,"|","\n") : Localize(CharInfoPath, "Description", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)) );
|
DataObject.SetString("characterBio", (bIsCustomChar ? Repl(CurrentCharInfo.ArmMeshPackageName,"|","\n") : Localize(CharInfoPath, "Description", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)));
|
||||||
DataObject.SetInt( "selectedCharacterIndex", CharacterIndex );
|
DataObject.SetInt("selectedCharacterIndex", CharacterIndex);
|
||||||
|
|
||||||
SetObject( "selectedCharacter", DataObject);
|
SetObject("selectedCharacter", DataObject);
|
||||||
|
|
||||||
//set head
|
//set head
|
||||||
SetGearButtons(HeadMeshIndex, HeadSkinIndex, class'KFGFxMenu_Gear'.Default.HeadMeshKey, class'KFGFxMenu_Gear'.Default.HeadSkinKey, class'KFGFxMenu_Gear'.Default.HeadFunctionKey);
|
SetGearButtons(HeadMeshIndex, HeadSkinIndex, class'KFGFxMenu_Gear'.Default.HeadMeshKey, class'KFGFxMenu_Gear'.Default.HeadSkinKey, class'KFGFxMenu_Gear'.Default.HeadFunctionKey);
|
||||||
@ -423,18 +423,18 @@ function SetEmoteButton()
|
|||||||
local GFxObject DataObject;
|
local GFxObject DataObject;
|
||||||
local int EmoteIndex;
|
local int EmoteIndex;
|
||||||
|
|
||||||
EmoteIndex = class'ExtEmoteList'.static.GetEmoteIndex( class'ExtEmoteList'.static.GetEquippedEmoteId(ExtPlayerController(GetPC())));
|
EmoteIndex = class'ExtEmoteList'.static.GetEmoteIndex(class'ExtEmoteList'.static.GetEquippedEmoteId(ExtPlayerController(GetPC())));
|
||||||
|
|
||||||
DataObject = CreateObject("Object");
|
DataObject = CreateObject("Object");
|
||||||
if(EmoteIndex == 255)
|
if(EmoteIndex == 255)
|
||||||
{
|
{
|
||||||
DataObject.SetString( "selectedEmote", "");
|
DataObject.SetString("selectedEmote", "");
|
||||||
DataObject.SetInt( "selectedEmoteIndex", 0 );
|
DataObject.SetInt("selectedEmoteIndex", 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DataObject.SetString( "selectedEmote", Localize(EmoteList[EmoteIndex].ItemName, "EmoteName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString));
|
DataObject.SetString("selectedEmote", Localize(EmoteList[EmoteIndex].ItemName, "EmoteName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString));
|
||||||
DataObject.SetInt( "selectedEmoteIndex", 0 );
|
DataObject.SetInt("selectedEmoteIndex", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -449,18 +449,18 @@ function SetGearButtons(int MeshIndex, int SkinIndex, string MeshKey, string Ski
|
|||||||
local string SkinName, MeshName;
|
local string SkinName, MeshName;
|
||||||
local GFxObject DataObject;
|
local GFxObject DataObject;
|
||||||
|
|
||||||
if( bWaitingCharList )
|
if(bWaitingCharList)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DataObject = CreateObject("Object");
|
DataObject = CreateObject("Object");
|
||||||
|
|
||||||
if(MeshIndex == `CLEARED_ATTACHMENT_INDEX)
|
if(MeshIndex == `CLEARED_ATTACHMENT_INDEX)
|
||||||
{
|
{
|
||||||
DataObject.SetString( sectionFunctionName, class'KFGFxMenu_Gear'.Default.NoneString );
|
DataObject.SetString(sectionFunctionName, class'KFGFxMenu_Gear'.Default.NoneString);
|
||||||
}
|
}
|
||||||
else if( bIsCustomChar )
|
else if(bIsCustomChar)
|
||||||
{
|
{
|
||||||
if( MeshKey==class'KFGFxMenu_Gear'.Default.HeadMeshKey )
|
if(MeshKey==class'KFGFxMenu_Gear'.Default.HeadMeshKey)
|
||||||
{
|
{
|
||||||
SkinName = GetMenuName(CurrentCharInfo.HeadVariants[MeshIndex].SkinVariations[SkinIndex].Skin);
|
SkinName = GetMenuName(CurrentCharInfo.HeadVariants[MeshIndex].SkinVariations[SkinIndex].Skin);
|
||||||
MeshName = GetMenuNameStr(CurrentCharInfo.HeadVariants[MeshIndex].MeshName);
|
MeshName = GetMenuNameStr(CurrentCharInfo.HeadVariants[MeshIndex].MeshName);
|
||||||
@ -471,7 +471,7 @@ function SetGearButtons(int MeshIndex, int SkinIndex, string MeshKey, string Ski
|
|||||||
MeshName = GetMenuNameStr(CurrentCharInfo.BodyVariants[MeshIndex].MeshName);
|
MeshName = GetMenuNameStr(CurrentCharInfo.BodyVariants[MeshIndex].MeshName);
|
||||||
}
|
}
|
||||||
|
|
||||||
DataObject.SetString( sectionFunctionName, MeshName @"\n" @SkinName );
|
DataObject.SetString(sectionFunctionName, MeshName @"\n" @SkinName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -480,13 +480,13 @@ function SetGearButtons(int MeshIndex, int SkinIndex, string MeshKey, string Ski
|
|||||||
|
|
||||||
SkinName = Localize(SectionPath, SkinKey$SkinIndex, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString);
|
SkinName = Localize(SectionPath, SkinKey$SkinIndex, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString);
|
||||||
MeshName = Localize(CharInfoPath, CurrentMesh, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString);
|
MeshName = Localize(CharInfoPath, CurrentMesh, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString);
|
||||||
DataObject.SetString( sectionFunctionName, MeshName @"\n" @SkinName );
|
DataObject.SetString(sectionFunctionName, MeshName @"\n" @SkinName);
|
||||||
}
|
}
|
||||||
|
|
||||||
DataObject.SetInt( (sectionFunctionName$"Index"), MeshIndex);
|
DataObject.SetInt((sectionFunctionName$"Index"), MeshIndex);
|
||||||
DataObject.SetInt( (sectionFunctionName$"SkinIndex"), SkinIndex);
|
DataObject.SetInt((sectionFunctionName$"SkinIndex"), SkinIndex);
|
||||||
|
|
||||||
SetObject( sectionFunctionName, DataObject);
|
SetObject(sectionFunctionName, DataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Update the labels for our currently equipped attachments */
|
/** Update the labels for our currently equipped attachments */
|
||||||
@ -496,7 +496,7 @@ function SetAttachmentButtons(string AttachmentMeshKey, string sectionFunctionNa
|
|||||||
local int i, AttachmentIndex;
|
local int i, AttachmentIndex;
|
||||||
local bool bCustom;
|
local bool bCustom;
|
||||||
|
|
||||||
if( bWaitingCharList )
|
if(bWaitingCharList)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bCustom = ExtPRI.UsesCustomChar();
|
bCustom = ExtPRI.UsesCustomChar();
|
||||||
@ -505,7 +505,7 @@ function SetAttachmentButtons(string AttachmentMeshKey, string sectionFunctionNa
|
|||||||
for(i = 0; i < `MAX_COSMETIC_ATTACHMENTS; i++)
|
for(i = 0; i < `MAX_COSMETIC_ATTACHMENTS; i++)
|
||||||
{
|
{
|
||||||
AttachmentIndex = bCustom ? ExtPRI.CustomCharacter.AttachmentMeshIndices[i] : ExtPRI.RepCustomizationInfo.AttachmentMeshIndices[i];
|
AttachmentIndex = bCustom ? ExtPRI.CustomCharacter.AttachmentMeshIndices[i] : ExtPRI.RepCustomizationInfo.AttachmentMeshIndices[i];
|
||||||
if( AttachmentIndex == `CLEARED_ATTACHMENT_INDEX )
|
if(AttachmentIndex == `CLEARED_ATTACHMENT_INDEX)
|
||||||
{
|
{
|
||||||
DataObject.SetString("selectedAttachment_"$i, "----");
|
DataObject.SetString("selectedAttachment_"$i, "----");
|
||||||
}
|
}
|
||||||
@ -515,7 +515,7 @@ function SetAttachmentButtons(string AttachmentMeshKey, string sectionFunctionNa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetObject( sectionFunctionName, DataObject);
|
SetObject(sectionFunctionName, DataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
event OnClose()
|
event OnClose()
|
||||||
@ -526,24 +526,24 @@ event OnClose()
|
|||||||
|
|
||||||
//GetGameViewportClient().HandleInputAxis = none;
|
//GetGameViewportClient().HandleInputAxis = none;
|
||||||
|
|
||||||
if ( class'WorldInfo'.static.IsMenuLevel() )
|
if (class'WorldInfo'.static.IsMenuLevel())
|
||||||
{
|
{
|
||||||
Manager.ManagerObject.SetBool("backgroundVisible", true);
|
Manager.ManagerObject.SetBool("backgroundVisible", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are alive, in game, with a playable pawn. switch back to first person view when leaving this menu
|
// If we are alive, in game, with a playable pawn. switch back to first person view when leaving this menu
|
||||||
PC = GetPC();
|
PC = GetPC();
|
||||||
if( PC != none && PC.WorldInfo.GRI.bMatchHasBegun && PC.Pawn != none && !PC.Pawn.IsA('KFPawn_Customization') )
|
if(PC != none && PC.WorldInfo.GRI.bMatchHasBegun && PC.Pawn != none && !PC.Pawn.IsA('KFPawn_Customization'))
|
||||||
{
|
{
|
||||||
PC.ServerCamera( 'FirstPerson' );
|
PC.ServerCamera('FirstPerson');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
event bool OnAxisModified( int ControllerId, name Key, float Delta, float DeltaTime, bool bGamepad )
|
event bool OnAxisModified(int ControllerId, name Key, float Delta, float DeltaTime, bool bGamepad)
|
||||||
{
|
{
|
||||||
if ( GetPC().PlayerInput.bUsingGamepad )
|
if (GetPC().PlayerInput.bUsingGamepad)
|
||||||
{
|
{
|
||||||
if ( Key == 'XboxTypeS_RightX' && Abs(Delta) > class'KFGFxMenu_Gear'.Default.ControllerRotationThreshold)
|
if (Key == 'XboxTypeS_RightX' && Abs(Delta) > class'KFGFxMenu_Gear'.Default.ControllerRotationThreshold)
|
||||||
{
|
{
|
||||||
Callback_RotateCamera(Delta * class'KFGFxMenu_Gear'.Default.ControllerRotationRate);
|
Callback_RotateCamera(Delta * class'KFGFxMenu_Gear'.Default.ControllerRotationRate);
|
||||||
}
|
}
|
||||||
@ -560,11 +560,11 @@ function Callback_Emote(int Index)
|
|||||||
local KFPlayerController KFPC;
|
local KFPlayerController KFPC;
|
||||||
|
|
||||||
KFPC = KFPlayerController(GetPC());
|
KFPC = KFPlayerController(GetPC());
|
||||||
if( KFPC != none )
|
if(KFPC != none)
|
||||||
{
|
{
|
||||||
class'ExtEmoteList'.static.SaveEquippedEmote(EmoteList[Index].ID, ExtPlayerController(KFPC));
|
class'ExtEmoteList'.static.SaveEquippedEmote(EmoteList[Index].ID, ExtPlayerController(KFPC));
|
||||||
|
|
||||||
if ( ExtPawn_Customization(KFPC.Pawn) != none )
|
if (ExtPawn_Customization(KFPC.Pawn) != none)
|
||||||
{
|
{
|
||||||
ExtPawn_Customization(KFPC.Pawn).PlayEmoteAnimation();
|
ExtPawn_Customization(KFPC.Pawn).PlayEmoteAnimation();
|
||||||
}
|
}
|
||||||
@ -573,25 +573,25 @@ function Callback_Emote(int Index)
|
|||||||
SetEmoteButton();
|
SetEmoteButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
function Callback_RotateCamera( int RotationDirection )
|
function Callback_RotateCamera(int RotationDirection)
|
||||||
{
|
{
|
||||||
local KFPlayerCamera PlayerCamera;
|
local KFPlayerCamera PlayerCamera;
|
||||||
|
|
||||||
PlayerCamera = KFPlayerCamera( GetPC().PlayerCamera );
|
PlayerCamera = KFPlayerCamera(GetPC().PlayerCamera);
|
||||||
if ( PlayerCamera != none )
|
if (PlayerCamera != none)
|
||||||
PlayerCamera.CustomizationCam.RotatedCamera( RotationDirection );
|
PlayerCamera.CustomizationCam.RotatedCamera(RotationDirection);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Callback_EndRotateCamera()
|
function Callback_EndRotateCamera()
|
||||||
{
|
{
|
||||||
local KFPlayerCamera PlayerCamera;
|
local KFPlayerCamera PlayerCamera;
|
||||||
|
|
||||||
PlayerCamera = KFPlayerCamera( GetPC().PlayerCamera );
|
PlayerCamera = KFPlayerCamera(GetPC().PlayerCamera);
|
||||||
if ( PlayerCamera != none )
|
if (PlayerCamera != none)
|
||||||
PlayerCamera.CustomizationCam.StartFadeRotation();
|
PlayerCamera.CustomizationCam.StartFadeRotation();
|
||||||
}
|
}
|
||||||
|
|
||||||
function Callback_Weapon( int ItemIndex, int SkinIndex )
|
function Callback_Weapon(int ItemIndex, int SkinIndex)
|
||||||
{
|
{
|
||||||
local KFPawn_Customization KFP;
|
local KFPawn_Customization KFP;
|
||||||
|
|
||||||
@ -602,14 +602,14 @@ function Callback_Weapon( int ItemIndex, int SkinIndex )
|
|||||||
|
|
||||||
function Callback_BodyCamera()
|
function Callback_BodyCamera()
|
||||||
{
|
{
|
||||||
if ( KFPlayerCamera( GetPC().PlayerCamera ) != none )
|
if (KFPlayerCamera(GetPC().PlayerCamera) != none)
|
||||||
KFPlayerCamera( GetPC().PlayerCamera ).CustomizationCam.SetBodyView( 0 );
|
KFPlayerCamera(GetPC().PlayerCamera).CustomizationCam.SetBodyView(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Callback_HeadCamera()
|
function Callback_HeadCamera()
|
||||||
{
|
{
|
||||||
if ( KFPlayerCamera( GetPC().PlayerCamera ) != none )
|
if (KFPlayerCamera(GetPC().PlayerCamera) != none)
|
||||||
KFPlayerCamera( GetPC().PlayerCamera ).CustomizationCam.SetBodyView( 1 );
|
KFPlayerCamera(GetPC().PlayerCamera).CustomizationCam.SetBodyView(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Callback_Character(int Index)
|
function Callback_Character(int Index)
|
||||||
@ -618,17 +618,17 @@ function Callback_Character(int Index)
|
|||||||
UpdateGear();
|
UpdateGear();
|
||||||
}
|
}
|
||||||
|
|
||||||
function Callback_Head( int MeshIndex, int SkinIndex )
|
function Callback_Head(int MeshIndex, int SkinIndex)
|
||||||
{
|
{
|
||||||
if( !ExtPRI.UsesCustomChar() ) // Force client to setup custom character now for this server.
|
if(!ExtPRI.UsesCustomChar()) // Force client to setup custom character now for this server.
|
||||||
ExtPRI.ChangeCharacter(ExtPRI.RepCustomizationInfo.CharacterIndex,true);
|
ExtPRI.ChangeCharacter(ExtPRI.RepCustomizationInfo.CharacterIndex,true);
|
||||||
ExtPRI.UpdateCustomization(CO_Head, MeshIndex, SkinIndex);
|
ExtPRI.UpdateCustomization(CO_Head, MeshIndex, SkinIndex);
|
||||||
SetGearButtons(MeshIndex, SkinIndex, class'KFGFxMenu_Gear'.Default.HeadMeshKey, class'KFGFxMenu_Gear'.Default.HeadSkinKey, class'KFGFxMenu_Gear'.Default.HeadFunctionKey);
|
SetGearButtons(MeshIndex, SkinIndex, class'KFGFxMenu_Gear'.Default.HeadMeshKey, class'KFGFxMenu_Gear'.Default.HeadSkinKey, class'KFGFxMenu_Gear'.Default.HeadFunctionKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Callback_Body( int MeshIndex, int SkinIndex )
|
function Callback_Body(int MeshIndex, int SkinIndex)
|
||||||
{
|
{
|
||||||
if( !ExtPRI.UsesCustomChar() ) // Force client to setup custom character now for this server.
|
if(!ExtPRI.UsesCustomChar()) // Force client to setup custom character now for this server.
|
||||||
ExtPRI.ChangeCharacter(ExtPRI.RepCustomizationInfo.CharacterIndex,true);
|
ExtPRI.ChangeCharacter(ExtPRI.RepCustomizationInfo.CharacterIndex,true);
|
||||||
|
|
||||||
ExtPRI.UpdateCustomization(CO_Body, MeshIndex, SkinIndex);
|
ExtPRI.UpdateCustomization(CO_Body, MeshIndex, SkinIndex);
|
||||||
@ -641,18 +641,18 @@ function Callback_Body( int MeshIndex, int SkinIndex )
|
|||||||
SetGearButtons(MeshIndex, SkinIndex, class'KFGFxMenu_Gear'.Default.BodyMeshKey, class'KFGFxMenu_Gear'.Default.BodySkinKey, class'KFGFxMenu_Gear'.Default.BodyFunctionKey);
|
SetGearButtons(MeshIndex, SkinIndex, class'KFGFxMenu_Gear'.Default.BodyMeshKey, class'KFGFxMenu_Gear'.Default.BodySkinKey, class'KFGFxMenu_Gear'.Default.BodyFunctionKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Callback_Attachment( int MeshIndex, int SkinIndex )
|
function Callback_Attachment(int MeshIndex, int SkinIndex)
|
||||||
{
|
{
|
||||||
local int SlotIndex;
|
local int SlotIndex;
|
||||||
local KFPawn KFP;
|
local KFPawn KFP;
|
||||||
|
|
||||||
if( !ExtPRI.UsesCustomChar() ) // Force client to setup custom character now for this server.
|
if(!ExtPRI.UsesCustomChar()) // Force client to setup custom character now for this server.
|
||||||
ExtPRI.ChangeCharacter(ExtPRI.RepCustomizationInfo.CharacterIndex,true);
|
ExtPRI.ChangeCharacter(ExtPRI.RepCustomizationInfo.CharacterIndex,true);
|
||||||
|
|
||||||
KFP = KFPawn(GetPC().Pawn);
|
KFP = KFPawn(GetPC().Pawn);
|
||||||
if( KFP!=None && ExtPRI!=None )
|
if(KFP!=None && ExtPRI!=None)
|
||||||
{
|
{
|
||||||
if( MeshIndex==`CLEARED_ATTACHMENT_INDEX )
|
if(MeshIndex==`CLEARED_ATTACHMENT_INDEX)
|
||||||
ExtPRI.RemoveAttachments();
|
ExtPRI.RemoveAttachments();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ function bool IsItemActive(int ItemDefinition)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Callback_Equip( int ItemDefinition )
|
function Callback_Equip(int ItemDefinition)
|
||||||
{
|
{
|
||||||
local class<KFWeaponDefinition> WeaponDef;
|
local class<KFWeaponDefinition> WeaponDef;
|
||||||
local int ItemIndex;
|
local int ItemIndex;
|
||||||
@ -42,7 +42,7 @@ function Callback_Equip( int ItemDefinition )
|
|||||||
{
|
{
|
||||||
class'ExtWeaponSkinList'.Static.SaveWeaponSkin(WeaponDef, 0, ExtPlayerController(KFPC));
|
class'ExtWeaponSkinList'.Static.SaveWeaponSkin(WeaponDef, 0, ExtPlayerController(KFPC));
|
||||||
|
|
||||||
if(class'WorldInfo'.static.IsConsoleBuild( ))
|
if(class'WorldInfo'.static.IsConsoleBuild())
|
||||||
{
|
{
|
||||||
Manager.CachedProfile.ClearWeaponSkin(WeaponDef.default.WeaponClassPath);
|
Manager.CachedProfile.ClearWeaponSkin(WeaponDef.default.WeaponClassPath);
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ function Callback_Equip( int ItemDefinition )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
class'ExtWeaponSkinList'.Static.SaveWeaponSkin(WeaponDef, ItemDefinition, ExtPlayerController(KFPC));
|
class'ExtWeaponSkinList'.Static.SaveWeaponSkin(WeaponDef, ItemDefinition, ExtPlayerController(KFPC));
|
||||||
if(class'WorldInfo'.static.IsConsoleBuild( ))
|
if(class'WorldInfo'.static.IsConsoleBuild())
|
||||||
{
|
{
|
||||||
Manager.CachedProfile.SaveWeaponSkin(WeaponDef.default.WeaponClassPath, ItemDefinition);
|
Manager.CachedProfile.SaveWeaponSkin(WeaponDef.default.WeaponClassPath, ItemDefinition);
|
||||||
}
|
}
|
||||||
|
@ -5,34 +5,34 @@ var Ext_PerkBase ExtPrevPerk;
|
|||||||
|
|
||||||
function OnOpen()
|
function OnOpen()
|
||||||
{
|
{
|
||||||
KFPC = KFPlayerController( GetPC() );
|
KFPC = KFPlayerController(GetPC());
|
||||||
if( ExtKFPC == none )
|
if(ExtKFPC == none)
|
||||||
ExtKFPC = ExtPlayerController(KFPC);
|
ExtKFPC = ExtPlayerController(KFPC);
|
||||||
|
|
||||||
if( ExtKFPC.ActivePerkManager==None )
|
if(ExtKFPC.ActivePerkManager==None)
|
||||||
{
|
{
|
||||||
ExtKFPC.SetTimer(0.25,true,'OnOpen',Self);
|
ExtKFPC.SetTimer(0.25,true,'OnOpen',Self);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ExtKFPC.ClearTimer('OnOpen',Self);
|
ExtKFPC.ClearTimer('OnOpen',Self);
|
||||||
|
|
||||||
if( ExtPrevPerk==None )
|
if(ExtPrevPerk==None)
|
||||||
ExtPrevPerk = ExtKFPC.ActivePerkManager.CurrentPerk;
|
ExtPrevPerk = ExtKFPC.ActivePerkManager.CurrentPerk;
|
||||||
|
|
||||||
ExUpdateContainers(ExtPrevPerk);
|
ExUpdateContainers(ExtPrevPerk);
|
||||||
SetBool( "locked", true);
|
SetBool("locked", true);
|
||||||
}
|
}
|
||||||
final function ExUpdateContainers( Ext_PerkBase PerkClass )
|
final function ExUpdateContainers(Ext_PerkBase PerkClass)
|
||||||
{
|
{
|
||||||
LastPerkLevel = PerkClass.CurrentLevel;
|
LastPerkLevel = PerkClass.CurrentLevel;
|
||||||
if ( ExtPerksContainer_Header(HeaderContainer)!=none )
|
if (ExtPerksContainer_Header(HeaderContainer)!=none)
|
||||||
ExtPerksContainer_Header(HeaderContainer).ExUpdatePerkHeader( PerkClass );
|
ExtPerksContainer_Header(HeaderContainer).ExUpdatePerkHeader(PerkClass);
|
||||||
if ( ExtPerksContainer_Details(DetailsContainer)!=none )
|
if (ExtPerksContainer_Details(DetailsContainer)!=none)
|
||||||
{
|
{
|
||||||
ExtPerksContainer_Details(DetailsContainer).ExUpdateDetails( PerkClass );
|
ExtPerksContainer_Details(DetailsContainer).ExUpdateDetails(PerkClass);
|
||||||
ExtPerksContainer_Details(DetailsContainer).ExUpdatePassives( PerkClass );
|
ExtPerksContainer_Details(DetailsContainer).ExUpdatePassives(PerkClass);
|
||||||
}
|
}
|
||||||
if ( SelectionContainer != none )
|
if (SelectionContainer != none)
|
||||||
SelectionContainer.UpdatePerkSelection(ExtKFPC.ActivePerkManager.UserPerks.Find(PerkClass));
|
SelectionContainer.UpdatePerkSelection(ExtKFPC.ActivePerkManager.UserPerks.Find(PerkClass));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,19 +41,19 @@ function CheckTiersForPopup();
|
|||||||
event OnClose()
|
event OnClose()
|
||||||
{
|
{
|
||||||
ExtPrevPerk = None;
|
ExtPrevPerk = None;
|
||||||
if ( ExtKFPC != none )
|
if (ExtKFPC != none)
|
||||||
ExtKFPC.ClearTimer('OnOpen',Self);
|
ExtKFPC.ClearTimer('OnOpen',Self);
|
||||||
super.OnClose();
|
super.OnClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
function PerkChanged( byte NewPerkIndex, bool bClickedIndex)
|
function PerkChanged(byte NewPerkIndex, bool bClickedIndex)
|
||||||
{
|
{
|
||||||
ExUpdateContainers(ExtPrevPerk);
|
ExUpdateContainers(ExtPrevPerk);
|
||||||
}
|
}
|
||||||
|
|
||||||
function OneSecondLoop()
|
function OneSecondLoop()
|
||||||
{
|
{
|
||||||
if( ExtPrevPerk!=None && LastPerkLevel!=ExtPrevPerk.CurrentLevel )
|
if(ExtPrevPerk!=None && LastPerkLevel!=ExtPrevPerk.CurrentLevel)
|
||||||
ExUpdateContainers(ExtPrevPerk);
|
ExUpdateContainers(ExtPrevPerk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,10 +3,10 @@ class ExtMenu_Trader extends KFGFxMenu_Trader;
|
|||||||
var ExtPlayerController ExtKFPC;
|
var ExtPlayerController ExtKFPC;
|
||||||
var Ext_PerkBase ExLastPerkClass;
|
var Ext_PerkBase ExLastPerkClass;
|
||||||
|
|
||||||
function InitializeMenu( KFGFxMoviePlayer_Manager InManager )
|
function InitializeMenu(KFGFxMoviePlayer_Manager InManager)
|
||||||
{
|
{
|
||||||
Super.InitializeMenu(InManager);
|
Super.InitializeMenu(InManager);
|
||||||
ExtKFPC = ExtPlayerController ( GetPC() );
|
ExtKFPC = ExtPlayerController (GetPC());
|
||||||
}
|
}
|
||||||
function int GetPerkIndex()
|
function int GetPerkIndex()
|
||||||
{
|
{
|
||||||
@ -14,11 +14,11 @@ function int GetPerkIndex()
|
|||||||
}
|
}
|
||||||
function UpdatePlayerInfo()
|
function UpdatePlayerInfo()
|
||||||
{
|
{
|
||||||
if( ExtKFPC != none && PlayerInfoContainer != none )
|
if(ExtKFPC != none && PlayerInfoContainer != none)
|
||||||
{
|
{
|
||||||
PlayerInfoContainer.SetPerkInfo();
|
PlayerInfoContainer.SetPerkInfo();
|
||||||
PlayerInfoContainer.SetPerkList();
|
PlayerInfoContainer.SetPerkList();
|
||||||
if( ExtKFPC.ActivePerkManager!=None && ExtKFPC.ActivePerkManager.CurrentPerk!=ExLastPerkClass)
|
if(ExtKFPC.ActivePerkManager!=None && ExtKFPC.ActivePerkManager.CurrentPerk!=ExLastPerkClass)
|
||||||
{
|
{
|
||||||
ExLastPerkClass = ExtKFPC.ActivePerkManager.CurrentPerk;
|
ExLastPerkClass = ExtKFPC.ActivePerkManager.CurrentPerk;
|
||||||
OnPerkChanged(GetPerkIndex());
|
OnPerkChanged(GetPerkIndex());
|
||||||
@ -33,7 +33,7 @@ function Callback_PerkChanged(int PerkIndex)
|
|||||||
ExtKFPC.PendingPerkClass = ExtKFPC.ActivePerkManager.UserPerks[PerkIndex].Class;
|
ExtKFPC.PendingPerkClass = ExtKFPC.ActivePerkManager.UserPerks[PerkIndex].Class;
|
||||||
ExtKFPC.SwitchToPerk(ExtKFPC.PendingPerkClass);
|
ExtKFPC.SwitchToPerk(ExtKFPC.PendingPerkClass);
|
||||||
|
|
||||||
if( PlayerInventoryContainer != none )
|
if(PlayerInventoryContainer != none)
|
||||||
{
|
{
|
||||||
PlayerInventoryContainer.UpdateLock();
|
PlayerInventoryContainer.UpdateLock();
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,11 @@ function TickHud(float DeltaTime)
|
|||||||
local PlayerController PC;
|
local PlayerController PC;
|
||||||
|
|
||||||
PC = GetPC();
|
PC = GetPC();
|
||||||
if( PC!=none && PC.PlayerInput!=None )
|
if(PC!=none && PC.PlayerInput!=None)
|
||||||
Super.TickHud(DeltaTime);
|
Super.TickHud(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;
|
||||||
@ -19,11 +19,11 @@ final function ShowKillMessageX(PlayerReplicationInfo PRI1, PlayerReplicationInf
|
|||||||
if(KFPC == none)
|
if(KFPC == none)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( KFGXHUDManager != none )
|
if(KFGXHUDManager != none)
|
||||||
{
|
{
|
||||||
if(PawnOther != none)
|
if(PawnOther != none)
|
||||||
{
|
{
|
||||||
if( bDeathMessage )
|
if(bDeathMessage)
|
||||||
{
|
{
|
||||||
KillerTextColor = ZEDTeamTextColor;
|
KillerTextColor = ZEDTeamTextColor;
|
||||||
KillerName = class'KFExtendedHUD'.Static.GetNameOf(PawnOther);
|
KillerName = class'KFExtendedHUD'.Static.GetNameOf(PawnOther);
|
||||||
@ -34,7 +34,7 @@ final function ShowKillMessageX(PlayerReplicationInfo PRI1, PlayerReplicationInf
|
|||||||
bHumanDeath = false;
|
bHumanDeath = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( (PawnOther==None || !bDeathMessage) && PRI1 != none)
|
if((PawnOther==None || !bDeathMessage) && PRI1 != none)
|
||||||
{
|
{
|
||||||
if(PRI1.GetTeamNum() == 255)
|
if(PRI1.GetTeamNum() == 255)
|
||||||
{
|
{
|
||||||
@ -44,7 +44,7 @@ final function ShowKillMessageX(PlayerReplicationInfo PRI1, PlayerReplicationInf
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
KillerTextColor = HumanTeamTextColor;
|
KillerTextColor = HumanTeamTextColor;
|
||||||
if( ExtPlayerReplicationInfo(PRI1)!=None && ExtPlayerReplicationInfo(PRI1).ECurrentPerk!=None )
|
if(ExtPlayerReplicationInfo(PRI1)!=None && ExtPlayerReplicationInfo(PRI1).ECurrentPerk!=None)
|
||||||
KillerIconpath = ExtPlayerReplicationInfo(PRI1).ECurrentPerk.static.GetPerkIconPath(0);
|
KillerIconpath = ExtPlayerReplicationInfo(PRI1).ECurrentPerk.static.GetPerkIconPath(0);
|
||||||
}
|
}
|
||||||
KillerName = PRI1.PlayerName;
|
KillerName = PRI1.PlayerName;
|
||||||
@ -63,10 +63,10 @@ final function ShowKillMessageX(PlayerReplicationInfo PRI1, PlayerReplicationInf
|
|||||||
bHumanDeath = false;
|
bHumanDeath = false;
|
||||||
}
|
}
|
||||||
KilledName = PRI2.PlayerName;
|
KilledName = PRI2.PlayerName;
|
||||||
if( ExtPlayerReplicationInfo(PRI2)!=None && ExtPlayerReplicationInfo(PRI2).ECurrentPerk!=None )
|
if(ExtPlayerReplicationInfo(PRI2)!=None && ExtPlayerReplicationInfo(PRI2).ECurrentPerk!=None)
|
||||||
KilledIconpath = ExtPlayerReplicationInfo(PRI2).ECurrentPerk.static.GetPerkIconPath(0);
|
KilledIconpath = ExtPlayerReplicationInfo(PRI2).ECurrentPerk.static.GetPerkIconPath(0);
|
||||||
}
|
}
|
||||||
else if( VictimStr!="" )
|
else if(VictimStr!="")
|
||||||
{
|
{
|
||||||
KilledTextColor = HumanTeamTextColor;
|
KilledTextColor = HumanTeamTextColor;
|
||||||
KilledIconpath = "img://"$class'KFPerk_Monster'.static.GetPerkIconPath();
|
KilledIconpath = "img://"$class'KFPerk_Monster'.static.GetPerkIconPath();
|
||||||
|
@ -7,24 +7,24 @@ event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
|
|||||||
{
|
{
|
||||||
local PlayerController PC;
|
local PlayerController PC;
|
||||||
|
|
||||||
switch ( WidgetName )
|
switch (WidgetName)
|
||||||
{
|
{
|
||||||
case 'gearMenu':
|
case 'gearMenu':
|
||||||
PC = GetPC();
|
PC = GetPC();
|
||||||
if( PC.PlayerReplicationInfo.bReadyToPlay && PC.WorldInfo.GRI.bMatchHasBegun )
|
if(PC.PlayerReplicationInfo.bReadyToPlay && PC.WorldInfo.GRI.bMatchHasBegun)
|
||||||
return true;
|
return true;
|
||||||
if (EGearMenu == none)
|
if (EGearMenu == none)
|
||||||
{
|
{
|
||||||
EGearMenu = ExtMenu_Gear(Widget);
|
EGearMenu = ExtMenu_Gear(Widget);
|
||||||
EGearMenu.InitializeMenu(self);
|
EGearMenu.InitializeMenu(self);
|
||||||
}
|
}
|
||||||
OnMenuOpen( WidgetPath, EGearMenu );
|
OnMenuOpen(WidgetPath, EGearMenu);
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return Super.WidgetInitialized(WidgetName,WidgetPath,Widget);
|
return Super.WidgetInitialized(WidgetName,WidgetPath,Widget);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function LaunchMenus( optional bool bForceSkipLobby )
|
function LaunchMenus(optional bool bForceSkipLobby)
|
||||||
{
|
{
|
||||||
local GFxWidgetBinding WidgetBinding;
|
local GFxWidgetBinding WidgetBinding;
|
||||||
local bool bSkippedLobby;
|
local bool bSkippedLobby;
|
||||||
@ -41,7 +41,7 @@ function LaunchMenus( optional bool bForceSkipLobby )
|
|||||||
WidgetBindings.AddItem(WidgetBinding);
|
WidgetBindings.AddItem(WidgetBinding);
|
||||||
|
|
||||||
// Load the platform-specific graphics options menu
|
// Load the platform-specific graphics options menu
|
||||||
switch( class'KFGameEngine'.static.GetPlatform() )
|
switch(class'KFGameEngine'.static.GetPlatform())
|
||||||
{
|
{
|
||||||
case PLATFORM_PC_DX10:
|
case PLATFORM_PC_DX10:
|
||||||
WidgetBinding.WidgetName = 'optionsGraphicsMenu';
|
WidgetBinding.WidgetName = 'optionsGraphicsMenu';
|
||||||
@ -62,14 +62,14 @@ function LaunchMenus( optional bool bForceSkipLobby )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// do this stuff in case CheckSkipLobby failed
|
// do this stuff in case CheckSkipLobby failed
|
||||||
if( bForceSkipLobby )
|
if(bForceSkipLobby)
|
||||||
{
|
{
|
||||||
bAfterLobby = true;
|
bAfterLobby = true;
|
||||||
CloseMenus(true);
|
CloseMenus(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function OpenMenu( byte NewMenuIndex, optional bool bShowWidgets = true )
|
function OpenMenu(byte NewMenuIndex, optional bool bShowWidgets = true)
|
||||||
{
|
{
|
||||||
local KF2GUIController GUIController;
|
local KF2GUIController GUIController;
|
||||||
|
|
||||||
@ -77,10 +77,10 @@ function OpenMenu( byte NewMenuIndex, optional bool bShowWidgets = true )
|
|||||||
|
|
||||||
Super.OpenMenu(NewMenuIndex, bShowWidgets);
|
Super.OpenMenu(NewMenuIndex, bShowWidgets);
|
||||||
|
|
||||||
if( bAfterLobby )
|
if(bAfterLobby)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( NewMenuIndex == UI_Perks )
|
if(NewMenuIndex == UI_Perks)
|
||||||
{
|
{
|
||||||
PerksPage = GUIController.OpenMenu(class'ExtGUI_PerkSelectionPage');
|
PerksPage = GUIController.OpenMenu(class'ExtGUI_PerkSelectionPage');
|
||||||
SetMovieCanReceiveInput(false);
|
SetMovieCanReceiveInput(false);
|
||||||
@ -93,7 +93,7 @@ function CloseMenus(optional bool bForceClose=false)
|
|||||||
{
|
{
|
||||||
local KF2GUIController GUIController;
|
local KF2GUIController GUIController;
|
||||||
|
|
||||||
if( PerksPage != None )
|
if(PerksPage != None)
|
||||||
{
|
{
|
||||||
GUIController = class'KF2GUIController'.Static.GetGUIController(GetPC());
|
GUIController = class'KF2GUIController'.Static.GetGUIController(GetPC());
|
||||||
GUIController.CloseMenu(class'ExtGUI_PerkSelectionPage');
|
GUIController.CloseMenu(class'ExtGUI_PerkSelectionPage');
|
||||||
@ -102,11 +102,11 @@ function CloseMenus(optional bool bForceClose=false)
|
|||||||
Super.CloseMenus(bForceClose);
|
Super.CloseMenus(bForceClose);
|
||||||
}
|
}
|
||||||
|
|
||||||
function OnMenuOpen( name WidgetPath, KFGFxObject_Menu Widget )
|
function OnMenuOpen(name WidgetPath, KFGFxObject_Menu Widget)
|
||||||
{
|
{
|
||||||
Super.OnMenuOpen(WidgetPath, Widget);
|
Super.OnMenuOpen(WidgetPath, Widget);
|
||||||
|
|
||||||
if( !bAfterLobby && Widget == PerksMenu )
|
if(!bAfterLobby && Widget == PerksMenu)
|
||||||
PerksMenu.ActionScriptVoid("closeContainer");
|
PerksMenu.ActionScriptVoid("closeContainer");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,23 +2,23 @@ class ExtPawn_Customization extends KFPawn_Customization;
|
|||||||
|
|
||||||
simulated function KFCharacterInfoBase GetCharacterInfo()
|
simulated function KFCharacterInfoBase GetCharacterInfo()
|
||||||
{
|
{
|
||||||
if( ExtPlayerReplicationInfo(PlayerReplicationInfo)!=None )
|
if(ExtPlayerReplicationInfo(PlayerReplicationInfo)!=None)
|
||||||
return ExtPlayerReplicationInfo(PlayerReplicationInfo).GetSelectedArch();
|
return ExtPlayerReplicationInfo(PlayerReplicationInfo).GetSelectedArch();
|
||||||
return Super.GetCharacterInfo();
|
return Super.GetCharacterInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function SetCharacterArch( KFCharacterInfoBase Info, optional bool bForce )
|
simulated function SetCharacterArch(KFCharacterInfoBase Info, optional bool bForce)
|
||||||
{
|
{
|
||||||
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
|
||||||
CharacterArch = Info;
|
CharacterArch = Info;
|
||||||
CharacterArch.SetCharacterFromArch( self, KFPRI );
|
CharacterArch.SetCharacterFromArch(self, KFPRI);
|
||||||
class'ExtCharacterInfo'.Static.SetCharacterMeshFromArch( KFCharacterInfo_Human(CharacterArch), self, KFPRI );
|
class'ExtCharacterInfo'.Static.SetCharacterMeshFromArch(KFCharacterInfo_Human(CharacterArch), self, KFPRI);
|
||||||
class'ExtCharacterInfo'.Static.SetFirstPersonArmsFromArch( KFCharacterInfo_Human(CharacterArch), self, KFPRI );
|
class'ExtCharacterInfo'.Static.SetFirstPersonArmsFromArch(KFCharacterInfo_Human(CharacterArch), self, KFPRI);
|
||||||
|
|
||||||
SetCharacterAnimationInfo();
|
SetCharacterAnimationInfo();
|
||||||
|
|
||||||
@ -35,9 +35,9 @@ simulated function SetCharacterArch( KFCharacterInfoBase Info, optional bool bFo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( CharacterArch != none )
|
if(CharacterArch != none)
|
||||||
{
|
{
|
||||||
if( CharacterArch.VoiceGroupArchName != "" )
|
if(CharacterArch.VoiceGroupArchName != "")
|
||||||
VoiceGroupArch = class<KFPawnVoiceGroup>(class'ExtCharacterInfo'.Static.SafeLoadObject(CharacterArch.VoiceGroupArchName, class'Class'));
|
VoiceGroupArch = class<KFPawnVoiceGroup>(class'ExtCharacterInfo'.Static.SafeLoadObject(CharacterArch.VoiceGroupArchName, class'Class'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -54,18 +54,18 @@ simulated function PlayEmoteAnimation(optional bool bNewCharacter)
|
|||||||
local name AnimName;
|
local name AnimName;
|
||||||
local float BlendInTime;
|
local float BlendInTime;
|
||||||
|
|
||||||
AnimName = class'ExtEmoteList'.static.GetUnlockedEmote( class'ExtEmoteList'.static.GetEquippedEmoteId(ExtPlayerController(Controller)), ExtPlayerController(Controller) );
|
AnimName = class'ExtEmoteList'.static.GetUnlockedEmote(class'ExtEmoteList'.static.GetEquippedEmoteId(ExtPlayerController(Controller)), ExtPlayerController(Controller));
|
||||||
|
|
||||||
BlendInTime = (bNewCharacter) ? 0.f : 0.4;
|
BlendInTime = (bNewCharacter) ? 0.f : 0.4;
|
||||||
|
|
||||||
// Briefly turn off notify so that PlayCustomAnim won't call OnAnimEnd (e.g. character swap)
|
// Briefly turn off notify so that PlayCustomAnim won't call OnAnimEnd (e.g. character swap)
|
||||||
BodyStanceNodes[EAS_FullBody].SetActorAnimEndNotification( FALSE );
|
BodyStanceNodes[EAS_FullBody].SetActorAnimEndNotification(FALSE);
|
||||||
|
|
||||||
BodyStanceNodes[EAS_FullBody].PlayCustomAnim(AnimName, 1.f, BlendInTime, 0.4, false, true);
|
BodyStanceNodes[EAS_FullBody].PlayCustomAnim(AnimName, 1.f, BlendInTime, 0.4, false, true);
|
||||||
BodyStanceNodes[EAS_FullBody].SetActorAnimEndNotification( TRUE );
|
BodyStanceNodes[EAS_FullBody].SetActorAnimEndNotification(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
function AttachWeaponByItemDefinition( int ItemDefinition )
|
function AttachWeaponByItemDefinition(int ItemDefinition)
|
||||||
{
|
{
|
||||||
local class<KFWeaponDefinition> WeaponDef;
|
local class<KFWeaponDefinition> WeaponDef;
|
||||||
local int ItemINdex;
|
local int ItemINdex;
|
||||||
@ -89,7 +89,7 @@ function AttachWeaponByItemDefinition( int ItemDefinition )
|
|||||||
}
|
}
|
||||||
|
|
||||||
//load in and add object .
|
//load in and add object .
|
||||||
WeaponPreview = KFWeaponAttachment ( DynamicLoadObject( WeaponDef.default.AttachmentArchtypePath, class'KFWeaponAttachment' ) );
|
WeaponPreview = KFWeaponAttachment (DynamicLoadObject(WeaponDef.default.AttachmentArchtypePath, class'KFWeaponAttachment'));
|
||||||
|
|
||||||
//attatch it to player
|
//attatch it to player
|
||||||
WeaponAttachmentTemplate = WeaponPreview;
|
WeaponAttachmentTemplate = WeaponPreview;
|
||||||
|
@ -36,59 +36,59 @@ var bool bStatsDirty,bServerReady,bUserStatsBroken,bCurrentlyHealing;
|
|||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
// Things the server should send to the client.
|
// Things the server should send to the client.
|
||||||
if ( bNetDirty )
|
if (bNetDirty)
|
||||||
CurrentPerk;
|
CurrentPerk;
|
||||||
}
|
}
|
||||||
|
|
||||||
final function SetGrenadeCap( byte AddedCap )
|
final function SetGrenadeCap(byte AddedCap)
|
||||||
{
|
{
|
||||||
MaxGrenadeCount = Default.MaxGrenadeCount + AddedCap;
|
MaxGrenadeCount = Default.MaxGrenadeCount + AddedCap;
|
||||||
if( RepState==REP_Done )
|
if(RepState==REP_Done)
|
||||||
ClientSetGrenadeCap(MaxGrenadeCount);
|
ClientSetGrenadeCap(MaxGrenadeCount);
|
||||||
}
|
}
|
||||||
simulated reliable client function ClientSetGrenadeCap( byte NewCap )
|
simulated reliable client function ClientSetGrenadeCap(byte NewCap)
|
||||||
{
|
{
|
||||||
MaxGrenadeCount = NewCap;
|
MaxGrenadeCount = NewCap;
|
||||||
}
|
}
|
||||||
|
|
||||||
function bool ApplyPerkClass( class<Ext_PerkBase> P )
|
function bool ApplyPerkClass(class<Ext_PerkBase> P)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
for( i=0; i<UserPerks.Length; ++i )
|
for(i=0; i<UserPerks.Length; ++i)
|
||||||
if( UserPerks[i].Class==P )
|
if(UserPerks[i].Class==P)
|
||||||
{
|
{
|
||||||
ApplyPerk(UserPerks[i]);
|
ApplyPerk(UserPerks[i]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function bool ApplyPerkName( string S )
|
function bool ApplyPerkName(string S)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
for( i=0; i<UserPerks.Length; ++i )
|
for(i=0; i<UserPerks.Length; ++i)
|
||||||
if( string(UserPerks[i].Class.Name)~=S )
|
if(string(UserPerks[i].Class.Name)~=S)
|
||||||
{
|
{
|
||||||
ApplyPerk(UserPerks[i]);
|
ApplyPerk(UserPerks[i]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function ApplyPerk( Ext_PerkBase P )
|
function ApplyPerk(Ext_PerkBase P)
|
||||||
{
|
{
|
||||||
local KFPawn_Human HP;
|
local KFPawn_Human HP;
|
||||||
local KFInventoryManager InvMan;
|
local KFInventoryManager InvMan;
|
||||||
local Ext_T_ZEDHelper H;
|
local Ext_T_ZEDHelper H;
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
if( P==None )
|
if(P==None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( PlayerOwner.Pawn != None )
|
if(PlayerOwner.Pawn != None)
|
||||||
{
|
{
|
||||||
InvMan = KFInventoryManager(PlayerOwner.Pawn.InvManager);
|
InvMan = KFInventoryManager(PlayerOwner.Pawn.InvManager);
|
||||||
if( InvMan != None )
|
if(InvMan != None)
|
||||||
InvMan.MaxCarryBlocks = InvMan.Default.MaxCarryBlocks;
|
InvMan.MaxCarryBlocks = InvMan.Default.MaxCarryBlocks;
|
||||||
|
|
||||||
foreach PlayerOwner.Pawn.ChildActors(class'Ext_T_ZEDHelper',H)
|
foreach PlayerOwner.Pawn.ChildActors(class'Ext_T_ZEDHelper',H)
|
||||||
@ -97,15 +97,15 @@ function ApplyPerk( Ext_PerkBase P )
|
|||||||
}
|
}
|
||||||
|
|
||||||
HP = KFPawn_Human(PlayerOwner.Pawn);
|
HP = KFPawn_Human(PlayerOwner.Pawn);
|
||||||
if( HP != None )
|
if(HP != None)
|
||||||
HP.DefaultInventory = HP.Default.DefaultInventory;
|
HP.DefaultInventory = HP.Default.DefaultInventory;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( CurrentPerk != None )
|
if(CurrentPerk != None)
|
||||||
{
|
{
|
||||||
CurrentPerk.DeactivateTraits();
|
CurrentPerk.DeactivateTraits();
|
||||||
|
|
||||||
for( i=0; i<CurrentPerk.PerkTraits.Length; ++i )
|
for(i=0; i<CurrentPerk.PerkTraits.Length; ++i)
|
||||||
{
|
{
|
||||||
CurrentPerk.PerkTraits[i].TraitType.Static.CancelEffectOn(KFPawn_Human(PlayerOwner.Pawn),CurrentPerk,CurrentPerk.PerkTraits[i].CurrentLevel,CurrentPerk.PerkTraits[i].Data);
|
CurrentPerk.PerkTraits[i].TraitType.Static.CancelEffectOn(KFPawn_Human(PlayerOwner.Pawn),CurrentPerk,CurrentPerk.PerkTraits[i].CurrentLevel,CurrentPerk.PerkTraits[i].Data);
|
||||||
}
|
}
|
||||||
@ -114,21 +114,21 @@ function ApplyPerk( Ext_PerkBase P )
|
|||||||
bStatsDirty = true;
|
bStatsDirty = true;
|
||||||
CurrentPerk = P;
|
CurrentPerk = P;
|
||||||
|
|
||||||
if( PRIOwner!=None )
|
if(PRIOwner!=None)
|
||||||
{
|
{
|
||||||
PRIOwner.ECurrentPerk = P.Class;
|
PRIOwner.ECurrentPerk = P.Class;
|
||||||
PRIOwner.FCurrentPerk = P;
|
PRIOwner.FCurrentPerk = P;
|
||||||
P.UpdatePRILevel();
|
P.UpdatePRILevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
{
|
{
|
||||||
CurrentPerk.ActivateTraits();
|
CurrentPerk.ActivateTraits();
|
||||||
|
|
||||||
if( PlayerOwner.Pawn != None )
|
if(PlayerOwner.Pawn != None)
|
||||||
{
|
{
|
||||||
HP = KFPawn_Human(PlayerOwner.Pawn);
|
HP = KFPawn_Human(PlayerOwner.Pawn);
|
||||||
if( HP != None )
|
if(HP != None)
|
||||||
{
|
{
|
||||||
HP.HealthMax = HP.default.Health;
|
HP.HealthMax = HP.default.Health;
|
||||||
HP.MaxArmor = HP.default.MaxArmor;
|
HP.MaxArmor = HP.default.MaxArmor;
|
||||||
@ -136,18 +136,18 @@ function ApplyPerk( Ext_PerkBase P )
|
|||||||
ModifyHealth(HP.HealthMax);
|
ModifyHealth(HP.HealthMax);
|
||||||
ModifyArmor(HP.MaxArmor);
|
ModifyArmor(HP.MaxArmor);
|
||||||
|
|
||||||
if( HP.Health > HP.HealthMax ) HP.Health = HP.HealthMax;
|
if(HP.Health > HP.HealthMax) HP.Health = HP.HealthMax;
|
||||||
if( HP.Armor > HP.MaxArmor ) HP.Armor = HP.MaxArmor;
|
if(HP.Armor > HP.MaxArmor) HP.Armor = HP.MaxArmor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
simulated final function Ext_PerkBase FindPerk( class<Ext_PerkBase> P )
|
simulated final function Ext_PerkBase FindPerk(class<Ext_PerkBase> P)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
for( i=0; i<UserPerks.Length; ++i )
|
for(i=0; i<UserPerks.Length; ++i)
|
||||||
if( UserPerks[i].Class==P )
|
if(UserPerks[i].Class==P)
|
||||||
return UserPerks[i];
|
return UserPerks[i];
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
@ -155,7 +155,7 @@ simulated final function Ext_PerkBase FindPerk( class<Ext_PerkBase> P )
|
|||||||
simulated function PostBeginPlay()
|
simulated function PostBeginPlay()
|
||||||
{
|
{
|
||||||
SetTimer(0.01,false,'InitPerks');
|
SetTimer(0.01,false,'InitPerks');
|
||||||
if( WorldInfo.NetMode!=NM_Client )
|
if(WorldInfo.NetMode!=NM_Client)
|
||||||
SetTimer(1,true,'CheckPlayTime');
|
SetTimer(1,true,'CheckPlayTime');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,18 +163,18 @@ simulated function InitPerks()
|
|||||||
{
|
{
|
||||||
local Ext_PerkBase P;
|
local Ext_PerkBase P;
|
||||||
|
|
||||||
if( WorldInfo.NetMode==NM_Client )
|
if(WorldInfo.NetMode==NM_Client)
|
||||||
{
|
{
|
||||||
foreach DynamicActors(class'Ext_PerkBase',P)
|
foreach DynamicActors(class'Ext_PerkBase',P)
|
||||||
if( P.PerkManager!=Self )
|
if(P.PerkManager!=Self)
|
||||||
RegisterPerk(P);
|
RegisterPerk(P);
|
||||||
}
|
}
|
||||||
else if( PRIOwner!=PlayerOwner.PlayerReplicationInfo ) // See if was assigned an inactive PRI.
|
else if(PRIOwner!=PlayerOwner.PlayerReplicationInfo) // See if was assigned an inactive PRI.
|
||||||
{
|
{
|
||||||
PRIOwner = ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo);
|
PRIOwner = ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo);
|
||||||
if( PRIOwner!=None )
|
if(PRIOwner!=None)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
{
|
{
|
||||||
PRIOwner.ECurrentPerk = CurrentPerk.Class;
|
PRIOwner.ECurrentPerk = CurrentPerk.Class;
|
||||||
CurrentPerk.UpdatePRILevel();
|
CurrentPerk.UpdatePRILevel();
|
||||||
@ -194,22 +194,22 @@ function ServerInitPerks()
|
|||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
for( i=0; i<UserPerks.Length; ++i )
|
for(i=0; i<UserPerks.Length; ++i)
|
||||||
UserPerks[i].SetInitialLevel();
|
UserPerks[i].SetInitialLevel();
|
||||||
bServerReady = true;
|
bServerReady = true;
|
||||||
CurrentPerk = None;
|
CurrentPerk = None;
|
||||||
if( StrPerkName!="" )
|
if(StrPerkName!="")
|
||||||
ApplyPerkName(StrPerkName);
|
ApplyPerkName(StrPerkName);
|
||||||
if( CurrentPerk==None )
|
if(CurrentPerk==None)
|
||||||
ApplyPerk(UserPerks[Rand(UserPerks.Length)]);
|
ApplyPerk(UserPerks[Rand(UserPerks.Length)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function RegisterPerk( Ext_PerkBase P )
|
simulated function RegisterPerk(Ext_PerkBase P)
|
||||||
{
|
{
|
||||||
UserPerks[UserPerks.Length] = P;
|
UserPerks[UserPerks.Length] = P;
|
||||||
P.PerkManager = Self;
|
P.PerkManager = Self;
|
||||||
}
|
}
|
||||||
simulated function UnregisterPerk( Ext_PerkBase P )
|
simulated function UnregisterPerk(Ext_PerkBase P)
|
||||||
{
|
{
|
||||||
UserPerks.RemoveItem(P);
|
UserPerks.RemoveItem(P);
|
||||||
P.PerkManager = None;
|
P.PerkManager = None;
|
||||||
@ -219,35 +219,35 @@ function Destroyed()
|
|||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
for( i=(UserPerks.Length-1); i>=0; --i )
|
for(i=(UserPerks.Length-1); i>=0; --i)
|
||||||
{
|
{
|
||||||
UserPerks[i].PerkManager = None;
|
UserPerks[i].PerkManager = None;
|
||||||
UserPerks[i].Destroy();
|
UserPerks[i].Destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function EarnedEXP( int EXP, optional byte Mode )
|
function EarnedEXP(int EXP, optional byte Mode)
|
||||||
{
|
{
|
||||||
// `log("EarnedEXP" @ GetScriptTrace());
|
// `log("EarnedEXP" @ GetScriptTrace());
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
{
|
{
|
||||||
// Limit how much EXP we got for healing and welding.
|
// Limit how much EXP we got for healing and welding.
|
||||||
switch( Mode )
|
switch(Mode)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
ExpUpStatus[0]+=EXP;
|
ExpUpStatus[0]+=EXP;
|
||||||
EXP = ExpUpStatus[0]/CurrentPerk.WeldExpUpNum;
|
EXP = ExpUpStatus[0]/CurrentPerk.WeldExpUpNum;
|
||||||
if( EXP>0 )
|
if(EXP>0)
|
||||||
ExpUpStatus[0]-=(EXP*CurrentPerk.WeldExpUpNum);
|
ExpUpStatus[0]-=(EXP*CurrentPerk.WeldExpUpNum);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
ExpUpStatus[1]+=EXP;
|
ExpUpStatus[1]+=EXP;
|
||||||
EXP = ExpUpStatus[1]/CurrentPerk.HealExpUpNum;
|
EXP = ExpUpStatus[1]/CurrentPerk.HealExpUpNum;
|
||||||
if( EXP>0 )
|
if(EXP>0)
|
||||||
ExpUpStatus[1]-=(EXP*CurrentPerk.HealExpUpNum);
|
ExpUpStatus[1]-=(EXP*CurrentPerk.HealExpUpNum);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if( EXP>0 && CurrentPerk.EarnedEXP(EXP) )
|
if(EXP>0 && CurrentPerk.EarnedEXP(EXP))
|
||||||
{
|
{
|
||||||
TotalEXP+=EXP;
|
TotalEXP+=EXP;
|
||||||
PRIOwner.RepEXP+=EXP;
|
PRIOwner.RepEXP+=EXP;
|
||||||
@ -257,7 +257,7 @@ function EarnedEXP( int EXP, optional byte Mode )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// XML stat writing
|
// XML stat writing
|
||||||
function OutputXML( ExtStatWriter Data )
|
function OutputXML(ExtStatWriter Data)
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
local int i;
|
local int i;
|
||||||
@ -268,20 +268,20 @@ function OutputXML( ExtStatWriter Data )
|
|||||||
Data.WriteValue("exp",string(TotalEXP));
|
Data.WriteValue("exp",string(TotalEXP));
|
||||||
Data.WriteValue("kills",string(TotalKills));
|
Data.WriteValue("kills",string(TotalKills));
|
||||||
Data.WriteValue("time",string(TotalPlayTime));
|
Data.WriteValue("time",string(TotalPlayTime));
|
||||||
if( ExtPlayerController(Owner)!=None && ExtPlayerController(Owner).PendingPerkClass!=None )
|
if(ExtPlayerController(Owner)!=None && ExtPlayerController(Owner).PendingPerkClass!=None)
|
||||||
S = string(ExtPlayerController(Owner).PendingPerkClass.Name);
|
S = string(ExtPlayerController(Owner).PendingPerkClass.Name);
|
||||||
else S = (CurrentPerk!=None ? string(CurrentPerk.Class.Name) : "None");
|
else S = (CurrentPerk!=None ? string(CurrentPerk.Class.Name) : "None");
|
||||||
Data.WriteValue("activeperk",S);
|
Data.WriteValue("activeperk",S);
|
||||||
|
|
||||||
for( i=0; i<UserPerks.Length; ++i )
|
for(i=0; i<UserPerks.Length; ++i)
|
||||||
if( UserPerks[i].HasAnyProgress() )
|
if(UserPerks[i].HasAnyProgress())
|
||||||
UserPerks[i].OutputXML(Data);
|
UserPerks[i].OutputXML(Data);
|
||||||
|
|
||||||
Data.EndIntendent();
|
Data.EndIntendent();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Data saving.
|
// Data saving.
|
||||||
function SaveData( ExtSaveDataBase Data )
|
function SaveData(ExtSaveDataBase Data)
|
||||||
{
|
{
|
||||||
local int i,o;
|
local int i,o;
|
||||||
|
|
||||||
@ -295,28 +295,28 @@ function SaveData( ExtSaveDataBase Data )
|
|||||||
Data.SaveInt(TotalPlayTime,3);
|
Data.SaveInt(TotalPlayTime,3);
|
||||||
|
|
||||||
// Write character.
|
// Write character.
|
||||||
if( PRIOwner!=None )
|
if(PRIOwner!=None)
|
||||||
PRIOwner.SaveCustomCharacter(Data);
|
PRIOwner.SaveCustomCharacter(Data);
|
||||||
else class'ExtPlayerReplicationInfo'.Static.DummySaveChar(Data);
|
else class'ExtPlayerReplicationInfo'.Static.DummySaveChar(Data);
|
||||||
|
|
||||||
// Write selected perk.
|
// Write selected perk.
|
||||||
if( ExtPlayerController(Owner)!=None && ExtPlayerController(Owner).PendingPerkClass!=None )
|
if(ExtPlayerController(Owner)!=None && ExtPlayerController(Owner).PendingPerkClass!=None)
|
||||||
Data.SaveStr(string(ExtPlayerController(Owner).PendingPerkClass.Name));
|
Data.SaveStr(string(ExtPlayerController(Owner).PendingPerkClass.Name));
|
||||||
else Data.SaveStr(CurrentPerk!=None ? string(CurrentPerk.Class.Name) : "");
|
else Data.SaveStr(CurrentPerk!=None ? string(CurrentPerk.Class.Name) : "");
|
||||||
|
|
||||||
// Count how many progressed perks we have.
|
// Count how many progressed perks we have.
|
||||||
o = 0;
|
o = 0;
|
||||||
for( i=0; i<UserPerks.Length; ++i )
|
for(i=0; i<UserPerks.Length; ++i)
|
||||||
if( UserPerks[i].HasAnyProgress() )
|
if(UserPerks[i].HasAnyProgress())
|
||||||
++o;
|
++o;
|
||||||
|
|
||||||
// Then write count we have.
|
// Then write count we have.
|
||||||
Data.SaveInt(o);
|
Data.SaveInt(o);
|
||||||
|
|
||||||
// Then perk stats.
|
// Then perk stats.
|
||||||
for( i=0; i<UserPerks.Length; ++i )
|
for(i=0; i<UserPerks.Length; ++i)
|
||||||
{
|
{
|
||||||
if( !UserPerks[i].HasAnyProgress() ) // Skip this perk.
|
if(!UserPerks[i].HasAnyProgress()) // Skip this perk.
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Data.SaveStr(string(UserPerks[i].Class.Name));
|
Data.SaveStr(string(UserPerks[i].Class.Name));
|
||||||
@ -332,7 +332,7 @@ function SaveData( ExtSaveDataBase Data )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Data loading.
|
// Data loading.
|
||||||
function LoadData( ExtSaveDataBase Data )
|
function LoadData(ExtSaveDataBase Data)
|
||||||
{
|
{
|
||||||
local int i,j,l,o;
|
local int i,j,l,o;
|
||||||
local string S;
|
local string S;
|
||||||
@ -346,7 +346,7 @@ function LoadData( ExtSaveDataBase Data )
|
|||||||
TotalPlayTime = Data.ReadInt(3);
|
TotalPlayTime = Data.ReadInt(3);
|
||||||
|
|
||||||
// Read character.
|
// Read character.
|
||||||
if( PRIOwner!=None )
|
if(PRIOwner!=None)
|
||||||
{
|
{
|
||||||
PRIOwner.RepKills = TotalKills;
|
PRIOwner.RepKills = TotalKills;
|
||||||
PRIOwner.RepEXP = TotalEXP;
|
PRIOwner.RepEXP = TotalEXP;
|
||||||
@ -360,13 +360,13 @@ function LoadData( ExtSaveDataBase Data )
|
|||||||
StrPerkName = Data.ReadStr();
|
StrPerkName = Data.ReadStr();
|
||||||
|
|
||||||
l = Data.ReadInt(); // Perk stats length.
|
l = Data.ReadInt(); // Perk stats length.
|
||||||
for( i=0; i<l; ++i )
|
for(i=0; i<l; ++i)
|
||||||
{
|
{
|
||||||
S = Data.ReadStr();
|
S = Data.ReadStr();
|
||||||
o = Data.ReadInt(1); // Read skip offset.
|
o = Data.ReadInt(1); // Read skip offset.
|
||||||
Data.PushEOFLimit(o);
|
Data.PushEOFLimit(o);
|
||||||
for( j=0; j<UserPerks.Length; ++j )
|
for(j=0; j<UserPerks.Length; ++j)
|
||||||
if( S~=string(UserPerks[j].Class.Name) )
|
if(S~=string(UserPerks[j].Class.Name))
|
||||||
{
|
{
|
||||||
UserPerks[j].LoadData(Data);
|
UserPerks[j].LoadData(Data);
|
||||||
break;
|
break;
|
||||||
@ -377,33 +377,33 @@ function LoadData( ExtSaveDataBase Data )
|
|||||||
bStatsDirty = false;
|
bStatsDirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function AddDefaultInventory( KFPawn P )
|
function AddDefaultInventory(KFPawn P)
|
||||||
{
|
{
|
||||||
local KFInventoryManager KFIM;
|
local KFInventoryManager KFIM;
|
||||||
|
|
||||||
if( P != none && P.InvManager != none )
|
if(P != none && P.InvManager != none)
|
||||||
{
|
{
|
||||||
KFIM = KFInventoryManager(P.InvManager);
|
KFIM = KFInventoryManager(P.InvManager);
|
||||||
if( KFIM != none )
|
if(KFIM != none)
|
||||||
{
|
{
|
||||||
//Grenades added on spawn
|
//Grenades added on spawn
|
||||||
KFIM.GiveInitialGrenadeCount();
|
KFIM.GiveInitialGrenadeCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.AddDefaultInventory(P);
|
CurrentPerk.AddDefaultInventory(P);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function PlayerDied()
|
simulated function PlayerDied()
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.PlayerDied();
|
CurrentPerk.PlayerDied();
|
||||||
}
|
}
|
||||||
|
|
||||||
function PreNotifyPlayerLeave()
|
function PreNotifyPlayerLeave()
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.DeactivateTraits();
|
CurrentPerk.DeactivateTraits();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,10 +417,10 @@ function InitiateClientRep()
|
|||||||
}
|
}
|
||||||
function ReplicateTimer()
|
function ReplicateTimer()
|
||||||
{
|
{
|
||||||
switch( RepState )
|
switch(RepState)
|
||||||
{
|
{
|
||||||
case REP_CustomCharacters: // Replicate custom characters.
|
case REP_CustomCharacters: // Replicate custom characters.
|
||||||
if( RepIndex>=PRIOwner.CustomCharList.Length )
|
if(RepIndex>=PRIOwner.CustomCharList.Length)
|
||||||
{
|
{
|
||||||
PRIOwner.AllCharReceived();
|
PRIOwner.AllCharReceived();
|
||||||
RepIndex = 0;
|
RepIndex = 0;
|
||||||
@ -433,7 +433,7 @@ function ReplicateTimer()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case REP_CustomInventory: // Replicate custom trader inventory
|
case REP_CustomInventory: // Replicate custom trader inventory
|
||||||
if( !PRIOwner.OnRepNextItem(PRIOwner,RepIndex) )
|
if(!PRIOwner.OnRepNextItem(PRIOwner,RepIndex))
|
||||||
{
|
{
|
||||||
RepIndex = 0;
|
RepIndex = 0;
|
||||||
++RepState;
|
++RepState;
|
||||||
@ -441,20 +441,20 @@ function ReplicateTimer()
|
|||||||
else ++RepIndex;
|
else ++RepIndex;
|
||||||
break;
|
break;
|
||||||
case REP_PerkClasses: // Open up all actor channel connections.
|
case REP_PerkClasses: // Open up all actor channel connections.
|
||||||
if( RepIndex>=UserPerks.Length )
|
if(RepIndex>=UserPerks.Length)
|
||||||
{
|
{
|
||||||
RepIndex = 0;
|
RepIndex = 0;
|
||||||
++RepState;
|
++RepState;
|
||||||
}
|
}
|
||||||
else if( UserPerks[RepIndex].bClientAuthorized )
|
else if(UserPerks[RepIndex].bClientAuthorized)
|
||||||
{
|
{
|
||||||
if( UserPerks[RepIndex].bPerkNetReady )
|
if(UserPerks[RepIndex].bPerkNetReady)
|
||||||
++RepIndex;
|
++RepIndex;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UserPerks[RepIndex].RemoteRole = ROLE_SimulatedProxy;
|
UserPerks[RepIndex].RemoteRole = ROLE_SimulatedProxy;
|
||||||
if( UserPerks[RepIndex].NextAuthTime<WorldInfo.RealTimeSeconds )
|
if(UserPerks[RepIndex].NextAuthTime<WorldInfo.RealTimeSeconds)
|
||||||
{
|
{
|
||||||
UserPerks[RepIndex].NextAuthTime = WorldInfo.RealTimeSeconds+0.5;
|
UserPerks[RepIndex].NextAuthTime = WorldInfo.RealTimeSeconds+0.5;
|
||||||
UserPerks[RepIndex].ClientAuth();
|
UserPerks[RepIndex].ClientAuth();
|
||||||
@ -462,100 +462,100 @@ function ReplicateTimer()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if( MaxGrenadeCount!=Default.MaxGrenadeCount )
|
if(MaxGrenadeCount!=Default.MaxGrenadeCount)
|
||||||
ClientSetGrenadeCap(MaxGrenadeCount);
|
ClientSetGrenadeCap(MaxGrenadeCount);
|
||||||
ClearTimer('ReplicateTimer');
|
ClearTimer('ReplicateTimer');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function bool CanEarnSmallRadiusKillXP( class<DamageType> DT )
|
function bool CanEarnSmallRadiusKillXP(class<DamageType> DT)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ModifySpeed( out float Speed )
|
simulated function ModifySpeed(out float Speed)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
Speed *= CurrentPerk.Modifiers[0];
|
Speed *= CurrentPerk.Modifiers[0];
|
||||||
}
|
}
|
||||||
function ModifyDamageGiven( out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx )
|
function ModifyDamageGiven(out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifyDamageGiven(InDamage,DamageCauser,MyKFPM,DamageInstigator,DamageType,HitZoneIdx);
|
CurrentPerk.ModifyDamageGiven(InDamage,DamageCauser,MyKFPM,DamageInstigator,DamageType,HitZoneIdx);
|
||||||
}
|
}
|
||||||
simulated function ModifyDamageTaken( out int InDamage, optional class<DamageType> DamageType, optional Controller InstigatedBy )
|
simulated function ModifyDamageTaken(out int InDamage, optional class<DamageType> DamageType, optional Controller InstigatedBy)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifyDamageTaken(InDamage,DamageType,InstigatedBy);
|
CurrentPerk.ModifyDamageTaken(InDamage,DamageType,InstigatedBy);
|
||||||
}
|
}
|
||||||
simulated function ModifyRecoil( out float CurrentRecoilModifier, KFWeapon KFW )
|
simulated function ModifyRecoil(out float CurrentRecoilModifier, KFWeapon KFW)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifyRecoil(CurrentRecoilModifier,KFW);
|
CurrentPerk.ModifyRecoil(CurrentRecoilModifier,KFW);
|
||||||
}
|
}
|
||||||
simulated function ModifySpread( out float InSpread )
|
simulated function ModifySpread(out float InSpread)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifySpread(InSpread);
|
CurrentPerk.ModifySpread(InSpread);
|
||||||
}
|
}
|
||||||
simulated function ModifyRateOfFire( out float InRate, KFWeapon KFW )
|
simulated function ModifyRateOfFire(out float InRate, KFWeapon KFW)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifyRateOfFire(InRate,KFW);
|
CurrentPerk.ModifyRateOfFire(InRate,KFW);
|
||||||
}
|
}
|
||||||
simulated function float GetReloadRateScale(KFWeapon KFW)
|
simulated function float GetReloadRateScale(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.GetReloadRateScale(KFW) : 1.f);
|
return (CurrentPerk!=None ? CurrentPerk.GetReloadRateScale(KFW) : 1.f);
|
||||||
}
|
}
|
||||||
simulated function bool GetUsingTactialReload( KFWeapon KFW )
|
simulated function bool GetUsingTactialReload(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.GetUsingTactialReload(KFW) : false);
|
return (CurrentPerk!=None ? CurrentPerk.GetUsingTactialReload(KFW) : false);
|
||||||
}
|
}
|
||||||
function ModifyHealth( out int InHealth )
|
function ModifyHealth(out int InHealth)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifyHealth(InHealth);
|
CurrentPerk.ModifyHealth(InHealth);
|
||||||
}
|
}
|
||||||
function ModifyArmor( out byte MaxArmor )
|
function ModifyArmor(out byte MaxArmor)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifyArmor(MaxArmor);
|
CurrentPerk.ModifyArmor(MaxArmor);
|
||||||
}
|
}
|
||||||
function float GetKnockdownPowerModifier( optional class<DamageType> DamageType, optional byte BodyPart, optional bool bIsSprinting=false )
|
function float GetKnockdownPowerModifier(optional class<DamageType> DamageType, optional byte BodyPart, optional bool bIsSprinting=false)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.GetKnockdownPowerModifier() : 1.f);
|
return (CurrentPerk!=None ? CurrentPerk.GetKnockdownPowerModifier() : 1.f);
|
||||||
}
|
}
|
||||||
function float GetStumblePowerModifier( optional KFPawn KFP, optional class<KFDamageType> DamageType, optional out float CooldownModifier, optional byte BodyPart )
|
function float GetStumblePowerModifier(optional KFPawn KFP, optional class<KFDamageType> DamageType, optional out float CooldownModifier, optional byte BodyPart)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.GetKnockdownPowerModifier() : 1.f);
|
return (CurrentPerk!=None ? CurrentPerk.GetKnockdownPowerModifier() : 1.f);
|
||||||
}
|
}
|
||||||
function float GetStunPowerModifier( optional class<DamageType> DamageType, optional byte HitZoneIdx )
|
function float GetStunPowerModifier(optional class<DamageType> DamageType, optional byte HitZoneIdx)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.GetStunPowerModifier(DamageType,HitZoneIdx) : 1.f);
|
return (CurrentPerk!=None ? CurrentPerk.GetStunPowerModifier(DamageType,HitZoneIdx) : 1.f);
|
||||||
}
|
}
|
||||||
simulated function ModifyMeleeAttackSpeed( out float InDuration, KFWeapon KFW )
|
simulated function ModifyMeleeAttackSpeed(out float InDuration, KFWeapon KFW)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifyMeleeAttackSpeed(InDuration);
|
CurrentPerk.ModifyMeleeAttackSpeed(InDuration);
|
||||||
}
|
}
|
||||||
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)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifyWeldingRate(FastenRate,UnfastenRate);
|
CurrentPerk.ModifyWeldingRate(FastenRate,UnfastenRate);
|
||||||
}
|
}
|
||||||
simulated function bool HasNightVision()
|
simulated function bool HasNightVision()
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.bHasNightVision : false);
|
return (CurrentPerk!=None ? CurrentPerk.bHasNightVision : false);
|
||||||
}
|
}
|
||||||
function bool RepairArmor( Pawn HealTarget )
|
function bool RepairArmor(Pawn HealTarget)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.RepairArmor(HealTarget) : false);
|
return (CurrentPerk!=None ? CurrentPerk.RepairArmor(HealTarget) : false);
|
||||||
}
|
}
|
||||||
function bool ModifyHealAmount( out float HealAmount )
|
function bool ModifyHealAmount(out float HealAmount)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.ModifyHealAmount(HealAmount) : false);
|
return (CurrentPerk!=None ? CurrentPerk.ModifyHealAmount(HealAmount) : false);
|
||||||
}
|
}
|
||||||
@ -563,28 +563,28 @@ function bool CanNotBeGrabbed()
|
|||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? !CurrentPerk.bCanBeGrabbed : false);
|
return (CurrentPerk!=None ? !CurrentPerk.bCanBeGrabbed : false);
|
||||||
}
|
}
|
||||||
simulated function ModifyMagSizeAndNumber( KFWeapon KFW, out int MagazineCapacity, optional array< Class<KFPerk> > WeaponPerkClass, optional bool bSecondary=false, optional name WeaponClassname )
|
simulated function ModifyMagSizeAndNumber(KFWeapon KFW, out int MagazineCapacity, optional array< Class<KFPerk> > WeaponPerkClass, optional bool bSecondary=false, optional name WeaponClassname)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifyMagSizeAndNumber(KFW,MagazineCapacity,WeaponPerkClass,bSecondary,WeaponClassname);
|
CurrentPerk.ModifyMagSizeAndNumber(KFW,MagazineCapacity,WeaponPerkClass,bSecondary,WeaponClassname);
|
||||||
}
|
}
|
||||||
simulated function ModifySpareAmmoAmount( KFWeapon KFW, out int PrimarySpareAmmo, optional const out STraderItem TraderItem, optional bool bSecondary=false )
|
simulated function ModifySpareAmmoAmount(KFWeapon KFW, out int PrimarySpareAmmo, optional const out STraderItem TraderItem, optional bool bSecondary=false)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifySpareAmmoAmount(KFW,PrimarySpareAmmo,TraderItem,bSecondary);
|
CurrentPerk.ModifySpareAmmoAmount(KFW,PrimarySpareAmmo,TraderItem,bSecondary);
|
||||||
}
|
}
|
||||||
simulated function ModifyMaxSpareAmmoAmount( KFWeapon KFW, out int SpareAmmoCapacity, optional const out STraderItem TraderItem, optional bool bSecondary=false )
|
simulated function ModifyMaxSpareAmmoAmount(KFWeapon KFW, out int SpareAmmoCapacity, optional const out STraderItem TraderItem, optional bool bSecondary=false)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifySpareAmmoAmount(KFW,SpareAmmoCapacity,TraderItem,bSecondary);
|
CurrentPerk.ModifySpareAmmoAmount(KFW,SpareAmmoCapacity,TraderItem,bSecondary);
|
||||||
}
|
}
|
||||||
simulated function bool ShouldMagSizeModifySpareAmmo( KFWeapon KFW, optional Class<KFPerk> WeaponPerkClass )
|
simulated function bool ShouldMagSizeModifySpareAmmo(KFWeapon KFW, optional Class<KFPerk> WeaponPerkClass)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.ShouldMagSizeModifySpareAmmo(KFW,WeaponPerkClass) : false);
|
return (CurrentPerk!=None ? CurrentPerk.ShouldMagSizeModifySpareAmmo(KFW,WeaponPerkClass) : false);
|
||||||
}
|
}
|
||||||
simulated function ModifyHealerRechargeTime( out float RechargeRate )
|
simulated function ModifyHealerRechargeTime(out float RechargeRate)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifyHealerRechargeTime(RechargeRate);
|
CurrentPerk.ModifyHealerRechargeTime(RechargeRate);
|
||||||
}
|
}
|
||||||
simulated function bool CanExplosiveWeld()
|
simulated function bool CanExplosiveWeld()
|
||||||
@ -597,7 +597,7 @@ simulated function bool IsOnContactActive()
|
|||||||
}
|
}
|
||||||
function bool CanSpreadNapalm()
|
function bool CanSpreadNapalm()
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None && CurrentPerk.bNapalmFire && LastNapalmTime!=WorldInfo.TimeSeconds )
|
if(CurrentPerk!=None && CurrentPerk.bNapalmFire && LastNapalmTime!=WorldInfo.TimeSeconds)
|
||||||
{
|
{
|
||||||
LastNapalmTime = WorldInfo.TimeSeconds; // Avoid infinite script recursion in KFPawn_Monster.
|
LastNapalmTime = WorldInfo.TimeSeconds; // Avoid infinite script recursion in KFPawn_Monster.
|
||||||
return true;
|
return true;
|
||||||
@ -610,31 +610,31 @@ simulated function bool IsRangeActive()
|
|||||||
}
|
}
|
||||||
simulated function DrawSpecialPerkHUD(Canvas C)
|
simulated function DrawSpecialPerkHUD(Canvas C)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.DrawSpecialPerkHUD(C);
|
CurrentPerk.DrawSpecialPerkHUD(C);
|
||||||
}
|
}
|
||||||
function PlayerKilled( KFPawn_Monster Victim, class<DamageType> DamageType )
|
function PlayerKilled(KFPawn_Monster Victim, class<DamageType> DamageType)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.PlayerKilled(Victim,DamageType);
|
CurrentPerk.PlayerKilled(Victim,DamageType);
|
||||||
}
|
}
|
||||||
function ModifyBloatBileDoT( out float DoTScaler )
|
function ModifyBloatBileDoT(out float DoTScaler)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.ModifyBloatBileDoT(DoTScaler);
|
CurrentPerk.ModifyBloatBileDoT(DoTScaler);
|
||||||
}
|
}
|
||||||
simulated function bool GetIsUberAmmoActive( KFWeapon KFW )
|
simulated function bool GetIsUberAmmoActive(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.GetIsUberAmmoActive(KFW) : false);
|
return (CurrentPerk!=None ? CurrentPerk.GetIsUberAmmoActive(KFW) : false);
|
||||||
}
|
}
|
||||||
function UpdatePerkHeadShots( ImpactInfo Impact, class<DamageType> DamageType, int NumHit )
|
function UpdatePerkHeadShots(ImpactInfo Impact, class<DamageType> DamageType, int NumHit)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None )
|
if(CurrentPerk!=None)
|
||||||
CurrentPerk.UpdatePerkHeadShots(Impact,DamageType,NumHit);
|
CurrentPerk.UpdatePerkHeadShots(Impact,DamageType,NumHit);
|
||||||
}
|
}
|
||||||
function CheckForAirborneAgent( KFPawn HealTarget, class<DamageType> DamType, int HealAmount )
|
function CheckForAirborneAgent(KFPawn HealTarget, class<DamageType> DamType, int HealAmount)
|
||||||
{
|
{
|
||||||
if( !bCurrentlyHealing && CurrentPerk!=None )
|
if(!bCurrentlyHealing && CurrentPerk!=None)
|
||||||
{
|
{
|
||||||
// Using boolean to avoid infinite recursion.
|
// Using boolean to avoid infinite recursion.
|
||||||
bCurrentlyHealing = true;
|
bCurrentlyHealing = true;
|
||||||
@ -642,7 +642,7 @@ function CheckForAirborneAgent( KFPawn HealTarget, class<DamageType> DamType, in
|
|||||||
bCurrentlyHealing = false;
|
bCurrentlyHealing = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
simulated function float GetZedTimeModifier( KFWeapon W )
|
simulated function float GetZedTimeModifier(KFWeapon W)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.GetZedTimeModifier(W) : 0.f);
|
return (CurrentPerk!=None ? CurrentPerk.GetZedTimeModifier(W) : 0.f);
|
||||||
}
|
}
|
||||||
@ -652,14 +652,14 @@ function bool IsAcidicCompoundActive()
|
|||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.bToxicDart : false);
|
return (CurrentPerk!=None ? CurrentPerk.bToxicDart : false);
|
||||||
}
|
}
|
||||||
function ModifyACDamage( out int InDamage )
|
function ModifyACDamage(out int InDamage)
|
||||||
{
|
{
|
||||||
if( CurrentPerk!=None && CurrentPerk.bToxicDart )
|
if(CurrentPerk!=None && CurrentPerk.bToxicDart)
|
||||||
InDamage += CurrentPerk.ToxicDartDamage;
|
InDamage += CurrentPerk.ToxicDartDamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Zombie explosion!
|
// Zombie explosion!
|
||||||
function bool CouldBeZedShrapnel( class<KFDamageType> KFDT )
|
function bool CouldBeZedShrapnel(class<KFDamageType> KFDT)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? (CurrentPerk.bFireExplode && class<KFDT_Fire>(KFDT)!=None) : false);
|
return (CurrentPerk!=None ? (CurrentPerk.bFireExplode && class<KFDT_Fire>(KFDT)!=None) : false);
|
||||||
}
|
}
|
||||||
@ -681,7 +681,7 @@ function NotifyZedTimeStarted()
|
|||||||
{
|
{
|
||||||
CurrentPerk.NotifyZedTimeStarted();
|
CurrentPerk.NotifyZedTimeStarted();
|
||||||
}
|
}
|
||||||
simulated function float GetZedTimeExtensions( byte Level )
|
simulated function float GetZedTimeExtensions(byte Level)
|
||||||
{
|
{
|
||||||
return CurrentPerk.GetZedTimeExtensions(Level);
|
return CurrentPerk.GetZedTimeExtensions(Level);
|
||||||
}
|
}
|
||||||
@ -691,11 +691,11 @@ simulated function bool HasHeavyArmor()
|
|||||||
{
|
{
|
||||||
return (CurrentPerk!=None && CurrentPerk.bHeavyArmor);
|
return (CurrentPerk!=None && CurrentPerk.bHeavyArmor);
|
||||||
}
|
}
|
||||||
simulated function float GetIronSightSpeedModifier( KFWeapon KFW )
|
simulated function float GetIronSightSpeedModifier(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.GetIronSightSpeedModifier(KFW) : 1.f);
|
return (CurrentPerk!=None ? CurrentPerk.GetIronSightSpeedModifier(KFW) : 1.f);
|
||||||
}
|
}
|
||||||
simulated function float GetCrouchSpeedModifier( KFWeapon KFW )
|
simulated function float GetCrouchSpeedModifier(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
return (CurrentPerk!=None ? CurrentPerk.GetIronSightSpeedModifier(KFW) : 1.f);
|
return (CurrentPerk!=None ? CurrentPerk.GetIronSightSpeedModifier(KFW) : 1.f);
|
||||||
}
|
}
|
||||||
@ -723,7 +723,7 @@ simulated function bool ShouldNeverDud()
|
|||||||
}
|
}
|
||||||
function NotifyPerkSacrificeExploded()
|
function NotifyPerkSacrificeExploded()
|
||||||
{
|
{
|
||||||
if( Ext_PerkDemolition(CurrentPerk) != none ) Ext_PerkDemolition(CurrentPerk).bUsedSacrifice = true;
|
if(Ext_PerkDemolition(CurrentPerk) != none) Ext_PerkDemolition(CurrentPerk).bUsedSacrifice = true;
|
||||||
}
|
}
|
||||||
simulated function float GetAoERadiusModifier()
|
simulated function float GetAoERadiusModifier()
|
||||||
{
|
{
|
||||||
@ -755,11 +755,11 @@ static function class<KFDamageType> GetToxicDmgTypeClass()
|
|||||||
{
|
{
|
||||||
return class'Ext_PerkFieldMedic'.static.GetToxicDmgTypeClass();
|
return class'Ext_PerkFieldMedic'.static.GetToxicDmgTypeClass();
|
||||||
}
|
}
|
||||||
static function ModifyToxicDmg( out int ToxicDamage )
|
static function ModifyToxicDmg(out int ToxicDamage)
|
||||||
{
|
{
|
||||||
ToxicDamage = class'Ext_PerkFieldMedic'.static.ModifyToxicDmg(ToxicDamage);
|
ToxicDamage = class'Ext_PerkFieldMedic'.static.ModifyToxicDmg(ToxicDamage);
|
||||||
}
|
}
|
||||||
simulated function float GetSnarePower( optional class<DamageType> DamageType, optional byte HitZoneIdx )
|
simulated function float GetSnarePower(optional class<DamageType> DamageType, optional byte HitZoneIdx)
|
||||||
{
|
{
|
||||||
return (Ext_PerkFieldMedic(CurrentPerk)!=None ? Ext_PerkFieldMedic(CurrentPerk).GetSnarePower(DamageType, HitZoneIdx) : 0.f);
|
return (Ext_PerkFieldMedic(CurrentPerk)!=None ? Ext_PerkFieldMedic(CurrentPerk).GetSnarePower(DamageType, HitZoneIdx) : 0.f);
|
||||||
}
|
}
|
||||||
@ -769,7 +769,7 @@ simulated function bool CanRepairDoors()
|
|||||||
{
|
{
|
||||||
return (Ext_PerkSupport(CurrentPerk)!=None ? Ext_PerkSupport(CurrentPerk).CanRepairDoors() : false);
|
return (Ext_PerkSupport(CurrentPerk)!=None ? Ext_PerkSupport(CurrentPerk).CanRepairDoors() : false);
|
||||||
}
|
}
|
||||||
simulated function float GetPenetrationModifier( byte Level, class<KFDamageType> DamageType, optional bool bForce )
|
simulated function float GetPenetrationModifier(byte Level, class<KFDamageType> DamageType, optional bool bForce )
|
||||||
{
|
{
|
||||||
return (Ext_PerkSupport(CurrentPerk)!=None ? Ext_PerkSupport(CurrentPerk).GetPenetrationModifier(Level, DamageType, bForce) : 0.f);
|
return (Ext_PerkSupport(CurrentPerk)!=None ? Ext_PerkSupport(CurrentPerk).GetPenetrationModifier(Level, DamageType, bForce) : 0.f);
|
||||||
}
|
}
|
||||||
@ -777,12 +777,12 @@ simulated function float GetPenetrationModifier( byte Level, class<KFDamageType>
|
|||||||
// Other
|
// Other
|
||||||
function ApplySkillsToPawn()
|
function ApplySkillsToPawn()
|
||||||
{
|
{
|
||||||
if( CheckOwnerPawn() )
|
if(CheckOwnerPawn())
|
||||||
{
|
{
|
||||||
OwnerPawn.UpdateGroundSpeed();
|
OwnerPawn.UpdateGroundSpeed();
|
||||||
OwnerPawn.bMovesFastInZedTime = false;
|
OwnerPawn.bMovesFastInZedTime = false;
|
||||||
|
|
||||||
if( MyPRI == none )
|
if(MyPRI == none)
|
||||||
MyPRI = KFPlayerReplicationInfo(OwnerPawn.PlayerReplicationInfo);
|
MyPRI = KFPlayerReplicationInfo(OwnerPawn.PlayerReplicationInfo);
|
||||||
|
|
||||||
ApplyWeightLimits();
|
ApplyWeightLimits();
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
class ExtPerksContainer_Details extends KFGFxPerksContainer_Details;
|
class ExtPerksContainer_Details extends KFGFxPerksContainer_Details;
|
||||||
|
|
||||||
`define AddWeaponsInfo(InClassDef) if( `InClassDef!=None ) AddWeaponInfo(WeaponNames, WeaponSources, `InClassDef.static.GetItemName(), `InClassDef.static.GetImagePath())
|
`define AddWeaponsInfo(InClassDef) if(`InClassDef!=None) AddWeaponInfo(WeaponNames, WeaponSources, `InClassDef.static.GetItemName(), `InClassDef.static.GetImagePath())
|
||||||
|
|
||||||
final function ExUpdateDetails( Ext_PerkBase PerkClass )
|
final function ExUpdateDetails(Ext_PerkBase PerkClass)
|
||||||
{
|
{
|
||||||
local GFxObject DetailsProvider;
|
local GFxObject DetailsProvider;
|
||||||
local KFPlayerController KFPC;
|
local KFPlayerController KFPC;
|
||||||
@ -11,15 +11,15 @@ final function ExUpdateDetails( Ext_PerkBase PerkClass )
|
|||||||
local array<string> WeaponSources;
|
local array<string> WeaponSources;
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
DetailsProvider = CreateObject( "Object" );
|
DetailsProvider = CreateObject("Object");
|
||||||
|
|
||||||
KFPC = KFPlayerController( GetPC() );
|
KFPC = KFPlayerController(GetPC());
|
||||||
|
|
||||||
if ( KFPC != none)
|
if (KFPC != none)
|
||||||
{
|
{
|
||||||
KFGRI = KFGameReplicationInfo(KFPC.WorldInfo.GRI);
|
KFGRI = KFGameReplicationInfo(KFPC.WorldInfo.GRI);
|
||||||
|
|
||||||
DetailsProvider.SetString( "ExperienceMessage", ExperienceString @ PerkClass.CurrentEXP );
|
DetailsProvider.SetString("ExperienceMessage", ExperienceString @ PerkClass.CurrentEXP);
|
||||||
|
|
||||||
if(KFGRI != none)
|
if(KFGRI != none)
|
||||||
{
|
{
|
||||||
@ -31,31 +31,31 @@ final function ExUpdateDetails( Ext_PerkBase PerkClass )
|
|||||||
|
|
||||||
for (i = 0; i < WeaponNames.length; i++)
|
for (i = 0; i < WeaponNames.length; i++)
|
||||||
{
|
{
|
||||||
DetailsProvider.SetString( "WeaponName" $ i, WeaponNames[i] );
|
DetailsProvider.SetString("WeaponName" $ i, WeaponNames[i]);
|
||||||
DetailsProvider.SetString( "WeaponImage" $ i, "img://"$WeaponSources[i] );
|
DetailsProvider.SetString("WeaponImage" $ i, "img://"$WeaponSources[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
DetailsProvider.SetString( "EXPAction1", "Kill zombies" );
|
DetailsProvider.SetString("EXPAction1", "Kill zombies");
|
||||||
//DetailsProvider.SetString( "EXPAction2", PerkClass.default.EXPAction2 );
|
//DetailsProvider.SetString("EXPAction2", PerkClass.default.EXPAction2);
|
||||||
|
|
||||||
SetObject( "detailsData", DetailsProvider );
|
SetObject("detailsData", DetailsProvider);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final function ExUpdatePassives( Ext_PerkBase PerkClass )
|
final function ExUpdatePassives(Ext_PerkBase PerkClass)
|
||||||
{
|
{
|
||||||
local GFxObject PassivesProvider;
|
local GFxObject PassivesProvider;
|
||||||
local GFxObject PassiveObject;
|
local GFxObject PassiveObject;
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
PassivesProvider = CreateArray();
|
PassivesProvider = CreateArray();
|
||||||
for( i=0; i<PerkClass.PerkStats.Length; ++i )
|
for(i=0; i<PerkClass.PerkStats.Length; ++i)
|
||||||
{
|
{
|
||||||
PassiveObject = CreateObject( "Object" );
|
PassiveObject = CreateObject("Object");
|
||||||
PassiveObject.SetString( "PassiveTitle", PerkClass.GetStatUIStr(i) );
|
PassiveObject.SetString("PassiveTitle", PerkClass.GetStatUIStr(i));
|
||||||
PassiveObject.SetString( "PerkBonusModifier", "");
|
PassiveObject.SetString("PerkBonusModifier", "");
|
||||||
PassiveObject.SetString( "PerkBonusAmount", "" );
|
PassiveObject.SetString("PerkBonusAmount", "");
|
||||||
PassivesProvider.SetElementObject( i, PassiveObject );
|
PassivesProvider.SetElementObject(i, PassiveObject);
|
||||||
}
|
}
|
||||||
SetObject( "passivesData", PassivesProvider );
|
SetObject("passivesData", PassivesProvider);
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
class ExtPerksContainer_Header extends KFGFxPerksContainer_Header;
|
class ExtPerksContainer_Header extends KFGFxPerksContainer_Header;
|
||||||
|
|
||||||
final function ExUpdatePerkHeader( Ext_PerkBase PerkClass )
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
|
@ -8,24 +8,24 @@ function UpdatePerkSelection(byte SelectedPerkIndex)
|
|||||||
local ExtPlayerController KFPC;
|
local ExtPlayerController KFPC;
|
||||||
local Ext_PerkBase PerkClass;
|
local Ext_PerkBase PerkClass;
|
||||||
|
|
||||||
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++)
|
||||||
{
|
{
|
||||||
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);
|
||||||
@ -37,8 +37,8 @@ function UpdatePendingPerkInfo(byte SelectedPerkIndex)
|
|||||||
local ExtPlayerController KFPC;
|
local ExtPlayerController KFPC;
|
||||||
local Ext_PerkBase PerkClass;
|
local Ext_PerkBase PerkClass;
|
||||||
|
|
||||||
KFPC = ExtPlayerController( GetPC() );
|
KFPC = ExtPlayerController(GetPC());
|
||||||
if( KFPC != none )
|
if(KFPC != none)
|
||||||
{
|
{
|
||||||
PerkClass = KFPC.ActivePerkManager.UserPerks[SelectedPerkIndex];
|
PerkClass = KFPC.ActivePerkManager.UserPerks[SelectedPerkIndex];
|
||||||
SetPendingPerkChanges(PerkClass.PerkName, PerkClass.GetPerkIconPath(PerkClass.CurrentLevel), "Perk changes will be applied when you die.");
|
SetPendingPerkChanges(PerkClass.PerkName, PerkClass.GetPerkIconPath(PerkClass.CurrentLevel), "Perk changes will be applied when you die.");
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -16,14 +16,14 @@ simulated exec function IronSights(optional bool bHoldButtonMode)
|
|||||||
{
|
{
|
||||||
local KFWeapon KFW;
|
local KFWeapon KFW;
|
||||||
|
|
||||||
if( Pawn != none )
|
if(Pawn != none)
|
||||||
{
|
{
|
||||||
if( KFPawn_Monster(Pawn)!=None )
|
if(KFPawn_Monster(Pawn)!=None)
|
||||||
Pawn.StartFire(1);
|
Pawn.StartFire(1);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KFW = KFWeapon(Pawn.Weapon);
|
KFW = KFWeapon(Pawn.Weapon);
|
||||||
if ( KFW != None )
|
if (KFW != None)
|
||||||
KFW.SetIronSights((bHoldButtonMode) ? true : !KFW.bUsingSights);
|
KFW.SetIronSights((bHoldButtonMode) ? true : !KFW.bUsingSights);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -32,14 +32,14 @@ simulated exec function IronSightsRelease(optional bool bHoldButtonMode)
|
|||||||
{
|
{
|
||||||
local KFWeapon KFW;
|
local KFWeapon KFW;
|
||||||
|
|
||||||
if( Pawn != none )
|
if(Pawn != none)
|
||||||
{
|
{
|
||||||
if( KFPawn_Monster(Pawn)!=None )
|
if(KFPawn_Monster(Pawn)!=None)
|
||||||
Pawn.StopFire(1);
|
Pawn.StopFire(1);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KFW = KFWeapon(Pawn.Weapon);
|
KFW = KFWeapon(Pawn.Weapon);
|
||||||
if ( !KFW.bHasIronSights || bHoldButtonMode )
|
if (!KFW.bHasIronSights || bHoldButtonMode)
|
||||||
KFW.SetIronSights(false);
|
KFW.SetIronSights(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -47,40 +47,40 @@ simulated exec function IronSightsRelease(optional bool bHoldButtonMode)
|
|||||||
|
|
||||||
simulated exec function ToggleFlashlight()
|
simulated exec function ToggleFlashlight()
|
||||||
{
|
{
|
||||||
if( KFPawn_Monster(Pawn)!=None && Pawn.Health>0 )
|
if(KFPawn_Monster(Pawn)!=None && Pawn.Health>0)
|
||||||
SetNightVision(!bNightVisionActive);
|
SetNightVision(!bNightVisionActive);
|
||||||
else Super.ToggleFlashlight();
|
else Super.ToggleFlashlight();
|
||||||
}
|
}
|
||||||
|
|
||||||
function PreClientTravel( string PendingURL, ETravelType TravelType, bool bIsSeamlessTravel)
|
function PreClientTravel(string PendingURL, ETravelType TravelType, bool bIsSeamlessTravel)
|
||||||
{
|
{
|
||||||
Super.PreClientTravel(PendingURL,TravelType,bIsSeamlessTravel);
|
Super.PreClientTravel(PendingURL,TravelType,bIsSeamlessTravel);
|
||||||
if( !bHandledTravel )
|
if(!bHandledTravel)
|
||||||
{
|
{
|
||||||
bHandledTravel = true;
|
bHandledTravel = true;
|
||||||
if( KFExtendedHUD(MyHUD)!=None )
|
if(KFExtendedHUD(MyHUD)!=None)
|
||||||
KFExtendedHUD(MyHUD).NotifyLevelChange(true);
|
KFExtendedHUD(MyHUD).NotifyLevelChange(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
event bool FilterButtonInput(int ControllerId, Name Key, EInputEvent Event, float AmountDepressed, bool bGamepad)
|
event bool FilterButtonInput(int ControllerId, Name Key, EInputEvent Event, float AmountDepressed, bool bGamepad)
|
||||||
{
|
{
|
||||||
if ( MyGfxManager.bAfterLobby && Event==IE_Pressed && (Key == 'Escape' || Key == 'XboxTypeS_Start') )
|
if (MyGfxManager.bAfterLobby && Event==IE_Pressed && (Key == 'Escape' || Key == 'XboxTypeS_Start'))
|
||||||
{
|
{
|
||||||
if( MyGUIController==None || MyGUIController.bIsInvalid )
|
if(MyGUIController==None || MyGUIController.bIsInvalid)
|
||||||
{
|
{
|
||||||
MyGUIController = class'KF2GUIController'.Static.GetGUIController(Outer);
|
MyGUIController = class'KF2GUIController'.Static.GetGUIController(Outer);
|
||||||
if( MyGUIController==None )
|
if(MyGUIController==None)
|
||||||
{
|
{
|
||||||
ExtPlayerController(Outer).CancelConnection();
|
ExtPlayerController(Outer).CancelConnection();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( MyGUIController.bIsInMenuState )
|
if(MyGUIController.bIsInMenuState)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if( MyGFxManager.bMenusOpen )
|
else if(MyGFxManager.bMenusOpen)
|
||||||
{
|
{
|
||||||
return MyGFxManager.ToggleMenus();
|
return MyGFxManager.ToggleMenus();
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ var repnotify class<Ext_TraitSupply> HasSupplier;
|
|||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
// Things the server should send to the client.
|
// Things the server should send to the client.
|
||||||
if ( true )
|
if (true)
|
||||||
RespawnCounter,AdminType,ECurrentPerk,ECurrentPerkLevel,ECurrentPerkPrestige,RepKills,RepEXP,RepLevelProgress,bIsDev,NameTag,FixedData,bHiddenUser,CustomCharacter,HasSupplier;
|
RespawnCounter,AdminType,ECurrentPerk,ECurrentPerkLevel,ECurrentPerkPrestige,RepKills,RepEXP,RepLevelProgress,bIsDev,NameTag,FixedData,bHiddenUser,CustomCharacter,HasSupplier;
|
||||||
if (bNetInitial || bInitialPT)
|
if (bNetInitial || bInitialPT)
|
||||||
RepPlayTime;
|
RepPlayTime;
|
||||||
@ -81,22 +81,22 @@ simulated function PostBeginPlay()
|
|||||||
|
|
||||||
Super.PostBeginPlay();
|
Super.PostBeginPlay();
|
||||||
SetTimer(1,true,'TickPT');
|
SetTimer(1,true,'TickPT');
|
||||||
if( WorldInfo.NetMode!=NM_DedicatedServer )
|
if(WorldInfo.NetMode!=NM_DedicatedServer)
|
||||||
{
|
{
|
||||||
HUDPerkColor = PickPerkColor();
|
HUDPerkColor = PickPerkColor();
|
||||||
PC = GetALocalPlayerController();
|
PC = GetALocalPlayerController();
|
||||||
if( PC!=None )
|
if(PC!=None)
|
||||||
LocalOwnerPRI = ExtPlayerReplicationInfo(PC.PlayerReplicationInfo);
|
LocalOwnerPRI = ExtPlayerReplicationInfo(PC.PlayerReplicationInfo);
|
||||||
}
|
}
|
||||||
else LocalOwnerPRI = Self; // Dedicated server can use self PRI.
|
else LocalOwnerPRI = Self; // Dedicated server can use self PRI.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resupply traits:
|
// Resupply traits:
|
||||||
simulated final function bool CanUseSupply( Pawn P )
|
simulated final function bool CanUseSupply(Pawn P)
|
||||||
{
|
{
|
||||||
return (SupplierLimit.SuppliedPawn!=P || SupplierLimit.NextSupplyTimer<WorldInfo.TimeSeconds);
|
return (SupplierLimit.SuppliedPawn!=P || SupplierLimit.NextSupplyTimer<WorldInfo.TimeSeconds);
|
||||||
}
|
}
|
||||||
simulated final function UsedSupply( Pawn P, float NextTime )
|
simulated final function UsedSupply(Pawn P, float NextTime)
|
||||||
{
|
{
|
||||||
SupplierLimit.SuppliedPawn = P;
|
SupplierLimit.SuppliedPawn = P;
|
||||||
SupplierLimit.NextSupplyTimer = WorldInfo.TimeSeconds+NextTime;
|
SupplierLimit.NextSupplyTimer = WorldInfo.TimeSeconds+NextTime;
|
||||||
@ -108,7 +108,7 @@ simulated function ClientInitialize(Controller C)
|
|||||||
|
|
||||||
Super.ClientInitialize(C);
|
Super.ClientInitialize(C);
|
||||||
|
|
||||||
if( WorldInfo.NetMode!=NM_DedicatedServer )
|
if(WorldInfo.NetMode!=NM_DedicatedServer)
|
||||||
{
|
{
|
||||||
LocalOwnerPRI = Self;
|
LocalOwnerPRI = Self;
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ simulated function TickPT()
|
|||||||
|
|
||||||
simulated event ReplicatedEvent(name VarName)
|
simulated event ReplicatedEvent(name VarName)
|
||||||
{
|
{
|
||||||
switch( VarName )
|
switch(VarName)
|
||||||
{
|
{
|
||||||
case 'RepLevelProgress':
|
case 'RepLevelProgress':
|
||||||
HUDPerkColor = PickPerkColor();
|
HUDPerkColor = PickPerkColor();
|
||||||
@ -148,7 +148,7 @@ function SetPlayerName(string S)
|
|||||||
Super.SetPlayerName(S);
|
Super.SetPlayerName(S);
|
||||||
UpdateNameTag();
|
UpdateNameTag();
|
||||||
}
|
}
|
||||||
function SetPlayerNameTag( string S )
|
function SetPlayerNameTag(string S)
|
||||||
{
|
{
|
||||||
NameTag = S;
|
NameTag = S;
|
||||||
UpdateNameTag();
|
UpdateNameTag();
|
||||||
@ -163,11 +163,11 @@ function OverrideWith(PlayerReplicationInfo PRI)
|
|||||||
}
|
}
|
||||||
simulated final function UpdateNameTag()
|
simulated final function UpdateNameTag()
|
||||||
{
|
{
|
||||||
if( NameTag!="" )
|
if(NameTag!="")
|
||||||
TaggedPlayerName = "["$NameTag$"] "$PlayerName;
|
TaggedPlayerName = "["$NameTag$"] "$PlayerName;
|
||||||
else TaggedPlayerName = PlayerName;
|
else TaggedPlayerName = PlayerName;
|
||||||
}
|
}
|
||||||
final function SetLevelProgress( int CurLevel, int CurPrest, int MinLevel, int MaxLevel )
|
final function SetLevelProgress(int CurLevel, int CurPrest, int MinLevel, int MaxLevel)
|
||||||
{
|
{
|
||||||
local float V;
|
local float V;
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ final function SetLevelProgress( int CurLevel, int CurPrest, int MinLevel, int M
|
|||||||
RepLevelProgress = V;
|
RepLevelProgress = V;
|
||||||
bForceNetUpdate = true;
|
bForceNetUpdate = true;
|
||||||
|
|
||||||
if( WorldInfo.NetMode!=NM_DedicatedServer )
|
if(WorldInfo.NetMode!=NM_DedicatedServer)
|
||||||
HUDPerkColor = PickPerkColor();
|
HUDPerkColor = PickPerkColor();
|
||||||
}
|
}
|
||||||
simulated final function string GetPerkLevelStr()
|
simulated final function string GetPerkLevelStr()
|
||||||
@ -189,20 +189,20 @@ simulated final function color PickPerkColor()
|
|||||||
local float P;
|
local float P;
|
||||||
local byte i;
|
local byte i;
|
||||||
|
|
||||||
if( RepLevelProgress==0 )
|
if(RepLevelProgress==0)
|
||||||
return MakeColor(255,255,255,255);
|
return MakeColor(255,255,255,255);
|
||||||
P = float(RepLevelProgress) / 255.f;
|
P = float(RepLevelProgress) / 255.f;
|
||||||
if( P<0.25f ) // White - Blue
|
if(P<0.25f) // White - Blue
|
||||||
{
|
{
|
||||||
i = 255 - (P*1020.f);
|
i = 255 - (P*1020.f);
|
||||||
return MakeColor(i,i,255,255);
|
return MakeColor(i,i,255,255);
|
||||||
}
|
}
|
||||||
if( P<0.5f ) // Blue - Green
|
if(P<0.5f) // Blue - Green
|
||||||
{
|
{
|
||||||
i = ((P-0.25f)*1020.f);
|
i = ((P-0.25f)*1020.f);
|
||||||
return MakeColor(0,i,255-i,255);
|
return MakeColor(0,i,255-i,255);
|
||||||
}
|
}
|
||||||
if( P<0.75f ) // Green - Red
|
if(P<0.75f) // Green - Red
|
||||||
{
|
{
|
||||||
i = ((P-0.5f)*1020.f);
|
i = ((P-0.5f)*1020.f);
|
||||||
return MakeColor(i,255-i,0,255);
|
return MakeColor(i,255-i,0,255);
|
||||||
@ -212,7 +212,7 @@ simulated final function color PickPerkColor()
|
|||||||
return MakeColor(255,i,0,255);
|
return MakeColor(255,i,0,255);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetInitPlayTime( int T )
|
function SetInitPlayTime(int T)
|
||||||
{
|
{
|
||||||
bInitialPT = true;
|
bInitialPT = true;
|
||||||
bForceNetUpdate = true;
|
bForceNetUpdate = true;
|
||||||
@ -224,17 +224,17 @@ function UnsetPT()
|
|||||||
bInitialPT = false;
|
bInitialPT = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Delegate bool OnRepNextItem( ExtPlayerReplicationInfo PRI, int RepIndex )
|
Delegate bool OnRepNextItem(ExtPlayerReplicationInfo PRI, int RepIndex)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
simulated reliable client function ClientAddTraderItem( int Index, FCustomTraderItem Item )
|
simulated reliable client function ClientAddTraderItem(int Index, FCustomTraderItem Item)
|
||||||
{
|
{
|
||||||
// Make sure to not execute on server.
|
// Make sure to not execute on server.
|
||||||
if( WorldInfo.NetMode!=NM_Client && (PlayerController(Owner)==None || LocalPlayer(PlayerController(Owner).Player)==None) )
|
if(WorldInfo.NetMode!=NM_Client && (PlayerController(Owner)==None || LocalPlayer(PlayerController(Owner).Player)==None))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( CustomList==None )
|
if(CustomList==None)
|
||||||
{
|
{
|
||||||
CustomList = CreateNewList();
|
CustomList = CreateNewList();
|
||||||
RecheckGRI();
|
RecheckGRI();
|
||||||
@ -254,17 +254,17 @@ simulated static final function KFGFxObject_TraderItems CreateNewList()
|
|||||||
|
|
||||||
return L;
|
return L;
|
||||||
}
|
}
|
||||||
simulated static final function SetWeaponInfo( bool bDedicated, int Index, FCustomTraderItem Item, KFGFxObject_TraderItems List )
|
simulated static final function SetWeaponInfo(bool bDedicated, int Index, FCustomTraderItem Item, KFGFxObject_TraderItems List)
|
||||||
{
|
{
|
||||||
local array<STraderItemWeaponStats> S;
|
local array<STraderItemWeaponStats> S;
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
if( List.SaleItems.Length<=Index )
|
if(List.SaleItems.Length<=Index)
|
||||||
List.SaleItems.Length = Index+1;
|
List.SaleItems.Length = Index+1;
|
||||||
|
|
||||||
List.SaleItems[Index].WeaponDef = Item.WeaponDef;
|
List.SaleItems[Index].WeaponDef = Item.WeaponDef;
|
||||||
List.SaleItems[Index].ClassName = Item.WeaponClass.Name;
|
List.SaleItems[Index].ClassName = Item.WeaponClass.Name;
|
||||||
if( class<KFWeap_DualBase>(Item.WeaponClass)!=None && class<KFWeap_DualBase>(Item.WeaponClass).Default.SingleClass!=None )
|
if(class<KFWeap_DualBase>(Item.WeaponClass)!=None && class<KFWeap_DualBase>(Item.WeaponClass).Default.SingleClass!=None)
|
||||||
List.SaleItems[Index].SingleClassName = class<KFWeap_DualBase>(Item.WeaponClass).Default.SingleClass.Name;
|
List.SaleItems[Index].SingleClassName = class<KFWeap_DualBase>(Item.WeaponClass).Default.SingleClass.Name;
|
||||||
else List.SaleItems[Index].SingleClassName = '';
|
else List.SaleItems[Index].SingleClassName = '';
|
||||||
List.SaleItems[Index].DualClassName = Item.WeaponClass.Default.DualClass!=None ? Item.WeaponClass.Default.DualClass.Name : '';
|
List.SaleItems[Index].DualClassName = Item.WeaponClass.Default.DualClass!=None ? Item.WeaponClass.Default.DualClass.Name : '';
|
||||||
@ -284,7 +284,7 @@ simulated static final function SetWeaponInfo( bool bDedicated, int Index, FCust
|
|||||||
List.SaleItems[Index].WeaponUpgradeDmgMultiplier[i+1] = Item.WeaponClass.Static.GetUpgradeStatScale(EWUS_Damage0, i+1);
|
List.SaleItems[Index].WeaponUpgradeDmgMultiplier[i+1] = Item.WeaponClass.Static.GetUpgradeStatScale(EWUS_Damage0, i+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !bDedicated )
|
if(!bDedicated)
|
||||||
{
|
{
|
||||||
List.SaleItems[Index].SecondaryAmmoImagePath = Item.WeaponClass.Default.SecondaryAmmoTexture!=None ? PathName(Item.WeaponClass.Default.SecondaryAmmoTexture) : "UI_SecondaryAmmo_TEX.GasTank";
|
List.SaleItems[Index].SecondaryAmmoImagePath = Item.WeaponClass.Default.SecondaryAmmoTexture!=None ? PathName(Item.WeaponClass.Default.SecondaryAmmoTexture) : "UI_SecondaryAmmo_TEX.GasTank";
|
||||||
List.SaleItems[Index].TraderFilter = Item.WeaponClass.Static.GetTraderFilter();
|
List.SaleItems[Index].TraderFilter = Item.WeaponClass.Static.GetTraderFilter();
|
||||||
@ -299,14 +299,14 @@ simulated function RecheckGRI()
|
|||||||
{
|
{
|
||||||
local ExtPlayerController PC;
|
local ExtPlayerController PC;
|
||||||
|
|
||||||
if( KFGameReplicationInfo(WorldInfo.GRI)==None )
|
if(KFGameReplicationInfo(WorldInfo.GRI)==None)
|
||||||
SetTimer(0.1,false,'RecheckGRI');
|
SetTimer(0.1,false,'RecheckGRI');
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KFGameReplicationInfo(WorldInfo.GRI).TraderItems = CustomList;
|
KFGameReplicationInfo(WorldInfo.GRI).TraderItems = CustomList;
|
||||||
foreach LocalPlayerControllers(class'ExtPlayerController',PC)
|
foreach LocalPlayerControllers(class'ExtPlayerController',PC)
|
||||||
{
|
{
|
||||||
if( PC.PurchaseHelper!=None )
|
if(PC.PurchaseHelper!=None)
|
||||||
{
|
{
|
||||||
PC.PurchaseHelper.TraderItems = CustomList;
|
PC.PurchaseHelper.TraderItems = CustomList;
|
||||||
}
|
}
|
||||||
@ -320,7 +320,7 @@ simulated final function bool ShowAdminName()
|
|||||||
}
|
}
|
||||||
simulated function string GetAdminName()
|
simulated function string GetAdminName()
|
||||||
{
|
{
|
||||||
switch( AdminType )
|
switch(AdminType)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return "Super Admin";
|
return "Super Admin";
|
||||||
@ -337,7 +337,7 @@ simulated function string GetAdminName()
|
|||||||
}
|
}
|
||||||
simulated function string GetAdminNameAbr()
|
simulated function string GetAdminNameAbr()
|
||||||
{
|
{
|
||||||
switch( AdminType )
|
switch(AdminType)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return "S";
|
return "S";
|
||||||
@ -354,7 +354,7 @@ simulated function string GetAdminNameAbr()
|
|||||||
}
|
}
|
||||||
simulated function string GetAdminColor()
|
simulated function string GetAdminColor()
|
||||||
{
|
{
|
||||||
switch( AdminType )
|
switch(AdminType)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return "FF6600";
|
return "FF6600";
|
||||||
@ -371,7 +371,7 @@ simulated function string GetAdminColor()
|
|||||||
}
|
}
|
||||||
simulated function color GetAdminColorC()
|
simulated function color GetAdminColorC()
|
||||||
{
|
{
|
||||||
switch( AdminType )
|
switch(AdminType)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return MakeColor(255,102,0,255);
|
return MakeColor(255,102,0,255);
|
||||||
@ -392,7 +392,7 @@ simulated function string GetHumanReadableName()
|
|||||||
return TaggedPlayerName;
|
return TaggedPlayerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetFixedData( byte M )
|
function SetFixedData(byte M)
|
||||||
{
|
{
|
||||||
OnModeSet(Self,M);
|
OnModeSet(Self,M);
|
||||||
FixedData = FixedData | M;
|
FixedData = FixedData | M;
|
||||||
@ -406,30 +406,30 @@ simulated final function string GetDesc()
|
|||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
|
|
||||||
if( (FixedData & 1)!=0 )
|
if((FixedData & 1)!=0)
|
||||||
S = "A.";
|
S = "A.";
|
||||||
if( (FixedData & 2)!=0 )
|
if((FixedData & 2)!=0)
|
||||||
S $= "WF.";
|
S $= "WF.";
|
||||||
if( (FixedData & 4)!=0 )
|
if((FixedData & 4)!=0)
|
||||||
S $= "G.";
|
S $= "G.";
|
||||||
if( (FixedData & 8)!=0 )
|
if((FixedData & 8)!=0)
|
||||||
S $= "NW.";
|
S $= "NW.";
|
||||||
if( (FixedData & 16)!=0 )
|
if((FixedData & 16)!=0)
|
||||||
S $= "WA.";
|
S $= "WA.";
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
delegate OnModeSet( ExtPlayerReplicationInfo PRI, byte Num );
|
delegate OnModeSet(ExtPlayerReplicationInfo PRI, byte Num);
|
||||||
|
|
||||||
simulated final function bool LoadPlayerCharacter( byte CharIndex, out FMyCustomChar CharInfo )
|
simulated final function bool LoadPlayerCharacter(byte CharIndex, out FMyCustomChar CharInfo)
|
||||||
{
|
{
|
||||||
local KFCharacterInfo_Human C;
|
local KFCharacterInfo_Human C;
|
||||||
|
|
||||||
if( CharIndex>=(CharacterArchetypes.Length+CustomCharList.Length) )
|
if(CharIndex>=(CharacterArchetypes.Length+CustomCharList.Length))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( SaveDataObjects.Length<=CharIndex )
|
if(SaveDataObjects.Length<=CharIndex)
|
||||||
SaveDataObjects.Length = CharIndex+1;
|
SaveDataObjects.Length = CharIndex+1;
|
||||||
if( SaveDataObjects[CharIndex]==None )
|
if(SaveDataObjects[CharIndex]==None)
|
||||||
{
|
{
|
||||||
C = (CharIndex<CharacterArchetypes.Length) ? CharacterArchetypes[CharIndex] : CustomCharList[CharIndex-CharacterArchetypes.Length].Char;
|
C = (CharIndex<CharacterArchetypes.Length) ? CharacterArchetypes[CharIndex] : CustomCharList[CharIndex-CharacterArchetypes.Length].Char;
|
||||||
SaveDataObjects[CharIndex] = new(None,PathName(C)) class'ExtCharDataInfo';
|
SaveDataObjects[CharIndex] = new(None,PathName(C)) class'ExtCharDataInfo';
|
||||||
@ -441,12 +441,12 @@ simulated final function bool SavePlayerCharacter()
|
|||||||
{
|
{
|
||||||
local KFCharacterInfo_Human C;
|
local KFCharacterInfo_Human C;
|
||||||
|
|
||||||
if( CustomCharacter.CharacterIndex>=(CharacterArchetypes.Length+CustomCharList.Length) )
|
if(CustomCharacter.CharacterIndex>=(CharacterArchetypes.Length+CustomCharList.Length))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( SaveDataObjects.Length<=CustomCharacter.CharacterIndex )
|
if(SaveDataObjects.Length<=CustomCharacter.CharacterIndex)
|
||||||
SaveDataObjects.Length = CustomCharacter.CharacterIndex+1;
|
SaveDataObjects.Length = CustomCharacter.CharacterIndex+1;
|
||||||
if( SaveDataObjects[CustomCharacter.CharacterIndex]==None )
|
if(SaveDataObjects[CustomCharacter.CharacterIndex]==None)
|
||||||
{
|
{
|
||||||
C = (CustomCharacter.CharacterIndex<CharacterArchetypes.Length) ? CharacterArchetypes[CustomCharacter.CharacterIndex] : CustomCharList[CustomCharacter.CharacterIndex-CharacterArchetypes.Length].Char;
|
C = (CustomCharacter.CharacterIndex<CharacterArchetypes.Length) ? CharacterArchetypes[CustomCharacter.CharacterIndex] : CustomCharList[CustomCharacter.CharacterIndex-CharacterArchetypes.Length].Char;
|
||||||
SaveDataObjects[CustomCharacter.CharacterIndex] = new(None,PathName(C)) class'ExtCharDataInfo';
|
SaveDataObjects[CustomCharacter.CharacterIndex] = new(None,PathName(C)) class'ExtCharDataInfo';
|
||||||
@ -454,39 +454,39 @@ simulated final function bool SavePlayerCharacter()
|
|||||||
SaveDataObjects[CustomCharacter.CharacterIndex].SaveData(CustomCharacter);
|
SaveDataObjects[CustomCharacter.CharacterIndex].SaveData(CustomCharacter);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
simulated function ChangeCharacter( byte CharIndex, optional bool bFirstSet )
|
simulated function ChangeCharacter(byte CharIndex, optional bool bFirstSet)
|
||||||
{
|
{
|
||||||
local FMyCustomChar NewChar;
|
local FMyCustomChar NewChar;
|
||||||
local byte i;
|
local byte i;
|
||||||
|
|
||||||
if( CharIndex>=(CharacterArchetypes.Length+CustomCharList.Length) || IsClientCharLocked(CharIndex) )
|
if(CharIndex>=(CharacterArchetypes.Length+CustomCharList.Length) || IsClientCharLocked(CharIndex))
|
||||||
CharIndex = 0;
|
CharIndex = 0;
|
||||||
|
|
||||||
if( bFirstSet && RepCustomizationInfo.CharacterIndex==CharIndex )
|
if(bFirstSet && RepCustomizationInfo.CharacterIndex==CharIndex)
|
||||||
{
|
{
|
||||||
// Copy properties from default character info.
|
// Copy properties from default character info.
|
||||||
NewChar.HeadMeshIndex = RepCustomizationInfo.HeadMeshIndex;
|
NewChar.HeadMeshIndex = RepCustomizationInfo.HeadMeshIndex;
|
||||||
NewChar.HeadSkinIndex = RepCustomizationInfo.HeadSkinIndex;
|
NewChar.HeadSkinIndex = RepCustomizationInfo.HeadSkinIndex;
|
||||||
NewChar.BodyMeshIndex = RepCustomizationInfo.BodyMeshIndex;
|
NewChar.BodyMeshIndex = RepCustomizationInfo.BodyMeshIndex;
|
||||||
NewChar.BodySkinIndex = RepCustomizationInfo.BodySkinIndex;
|
NewChar.BodySkinIndex = RepCustomizationInfo.BodySkinIndex;
|
||||||
for( i=0; i<`MAX_COSMETIC_ATTACHMENTS; ++i )
|
for(i=0; i<`MAX_COSMETIC_ATTACHMENTS; ++i)
|
||||||
{
|
{
|
||||||
NewChar.AttachmentMeshIndices[i] = RepCustomizationInfo.AttachmentMeshIndices[i];
|
NewChar.AttachmentMeshIndices[i] = RepCustomizationInfo.AttachmentMeshIndices[i];
|
||||||
NewChar.AttachmentSkinIndices[i] = RepCustomizationInfo.AttachmentSkinIndices[i];
|
NewChar.AttachmentSkinIndices[i] = RepCustomizationInfo.AttachmentSkinIndices[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( LoadPlayerCharacter(CharIndex,NewChar) )
|
if(LoadPlayerCharacter(CharIndex,NewChar))
|
||||||
{
|
{
|
||||||
NewChar.CharacterIndex = CharIndex;
|
NewChar.CharacterIndex = CharIndex;
|
||||||
CustomCharacter = NewChar;
|
CustomCharacter = NewChar;
|
||||||
ServerSetCharacterX(NewChar);
|
ServerSetCharacterX(NewChar);
|
||||||
if( WorldInfo.NetMode==NM_Client )
|
if(WorldInfo.NetMode==NM_Client)
|
||||||
CharacterCustomizationChanged();
|
CharacterCustomizationChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
simulated function UpdateCustomization( byte Type, byte MeshIndex, byte SkinIndex, optional byte SlotIndex )
|
simulated function UpdateCustomization(byte Type, byte MeshIndex, byte SkinIndex, optional byte SlotIndex)
|
||||||
{
|
{
|
||||||
switch( Type )
|
switch(Type)
|
||||||
{
|
{
|
||||||
case CO_Head:
|
case CO_Head:
|
||||||
CustomCharacter.HeadMeshIndex = MeshIndex;
|
CustomCharacter.HeadMeshIndex = MeshIndex;
|
||||||
@ -503,26 +503,26 @@ simulated function UpdateCustomization( byte Type, byte MeshIndex, byte SkinInde
|
|||||||
}
|
}
|
||||||
SavePlayerCharacter();
|
SavePlayerCharacter();
|
||||||
ServerSetCharacterX(CustomCharacter);
|
ServerSetCharacterX(CustomCharacter);
|
||||||
if( WorldInfo.NetMode==NM_Client )
|
if(WorldInfo.NetMode==NM_Client)
|
||||||
CharacterCustomizationChanged();
|
CharacterCustomizationChanged();
|
||||||
}
|
}
|
||||||
simulated final function RemoveAttachments()
|
simulated final function RemoveAttachments()
|
||||||
{
|
{
|
||||||
local byte i;
|
local byte i;
|
||||||
|
|
||||||
for( i=0; i<`MAX_COSMETIC_ATTACHMENTS; ++i )
|
for(i=0; i<`MAX_COSMETIC_ATTACHMENTS; ++i)
|
||||||
{
|
{
|
||||||
CustomCharacter.AttachmentMeshIndices[i] = `CLEARED_ATTACHMENT_INDEX;
|
CustomCharacter.AttachmentMeshIndices[i] = `CLEARED_ATTACHMENT_INDEX;
|
||||||
CustomCharacter.AttachmentSkinIndices[i] = 0;
|
CustomCharacter.AttachmentSkinIndices[i] = 0;
|
||||||
}
|
}
|
||||||
SavePlayerCharacter();
|
SavePlayerCharacter();
|
||||||
ServerSetCharacterX(CustomCharacter);
|
ServerSetCharacterX(CustomCharacter);
|
||||||
if( WorldInfo.NetMode==NM_Client )
|
if(WorldInfo.NetMode==NM_Client)
|
||||||
CharacterCustomizationChanged();
|
CharacterCustomizationChanged();
|
||||||
}
|
}
|
||||||
simulated function ClearCharacterAttachment(int AttachmentIndex)
|
simulated function ClearCharacterAttachment(int AttachmentIndex)
|
||||||
{
|
{
|
||||||
if( UsesCustomChar() )
|
if(UsesCustomChar())
|
||||||
{
|
{
|
||||||
CustomCharacter.AttachmentMeshIndices[AttachmentIndex] = `CLEARED_ATTACHMENT_INDEX;
|
CustomCharacter.AttachmentMeshIndices[AttachmentIndex] = `CLEARED_ATTACHMENT_INDEX;
|
||||||
CustomCharacter.AttachmentSkinIndices[AttachmentIndex] = 0;
|
CustomCharacter.AttachmentSkinIndices[AttachmentIndex] = 0;
|
||||||
@ -530,42 +530,42 @@ simulated function ClearCharacterAttachment(int AttachmentIndex)
|
|||||||
else Super.ClearCharacterAttachment(AttachmentIndex);
|
else Super.ClearCharacterAttachment(AttachmentIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
reliable server final function ServerSetCharacterX( FMyCustomChar NewMeshInfo )
|
reliable server final function ServerSetCharacterX(FMyCustomChar NewMeshInfo)
|
||||||
{
|
{
|
||||||
if( NewMeshInfo.CharacterIndex>=(CharacterArchetypes.Length+CustomCharList.Length) || IsClientCharLocked(NewMeshInfo.CharacterIndex) )
|
if(NewMeshInfo.CharacterIndex>=(CharacterArchetypes.Length+CustomCharList.Length) || IsClientCharLocked(NewMeshInfo.CharacterIndex))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
if( Index<CharacterArchetypes.Length )
|
if(Index<CharacterArchetypes.Length)
|
||||||
return false;
|
return false;
|
||||||
Index-=CharacterArchetypes.Length;
|
Index-=CharacterArchetypes.Length;
|
||||||
return (Index<CustomCharList.Length && CustomCharList[Index].bLock && !ShowAdminName());
|
return (Index<CustomCharList.Length && CustomCharList[Index].bLock && !ShowAdminName());
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated reliable client function ReceivedCharacter( byte Index, FCustomCharEntry C )
|
simulated reliable client function ReceivedCharacter(byte Index, FCustomCharEntry C)
|
||||||
{
|
{
|
||||||
if( WorldInfo.NetMode==NM_DedicatedServer )
|
if(WorldInfo.NetMode==NM_DedicatedServer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( CustomCharList.Length<=Index )
|
if(CustomCharList.Length<=Index)
|
||||||
CustomCharList.Length = Index+1;
|
CustomCharList.Length = Index+1;
|
||||||
CustomCharList[Index] = C;
|
CustomCharList[Index] = C;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated reliable client function AllCharReceived()
|
simulated reliable client function AllCharReceived()
|
||||||
{
|
{
|
||||||
if( WorldInfo.NetMode==NM_DedicatedServer )
|
if(WorldInfo.NetMode==NM_DedicatedServer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( !bClientInitChars )
|
if(!bClientInitChars)
|
||||||
{
|
{
|
||||||
OnCharListDone();
|
OnCharListDone();
|
||||||
NotifyCharListDone();
|
NotifyCharListDone();
|
||||||
@ -581,19 +581,19 @@ simulated final function NotifyCharListDone()
|
|||||||
foreach WorldInfo.AllPawns(class'KFPawn_Human', KFP)
|
foreach WorldInfo.AllPawns(class'KFPawn_Human', KFP)
|
||||||
{
|
{
|
||||||
EPRI = ExtPlayerReplicationInfo(KFP.PlayerReplicationInfo);
|
EPRI = ExtPlayerReplicationInfo(KFP.PlayerReplicationInfo);
|
||||||
if( EPRI!=None )
|
if(EPRI!=None)
|
||||||
{
|
{
|
||||||
NewCharArch = EPRI.GetSelectedArch();
|
NewCharArch = EPRI.GetSelectedArch();
|
||||||
|
|
||||||
if( NewCharArch != KFP.CharacterArch )
|
if(NewCharArch != KFP.CharacterArch)
|
||||||
{
|
{
|
||||||
// selected a new character
|
// selected a new character
|
||||||
KFP.SetCharacterArch( NewCharArch );
|
KFP.SetCharacterArch(NewCharArch);
|
||||||
}
|
}
|
||||||
else if( WorldInfo.NetMode != NM_DedicatedServer )
|
else if(WorldInfo.NetMode != NM_DedicatedServer)
|
||||||
{
|
{
|
||||||
// refresh cosmetics only
|
// refresh cosmetics only
|
||||||
class'ExtCharacterInfo'.Static.SetCharacterMeshFromArch( NewCharArch, KFP, EPRI );
|
class'ExtCharacterInfo'.Static.SetCharacterMeshFromArch(NewCharArch, KFP, EPRI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -604,7 +604,7 @@ simulated delegate OnCharListDone();
|
|||||||
// Player has a server specific setting for a character selected.
|
// Player has a server specific setting for a character selected.
|
||||||
simulated final function bool UsesCustomChar()
|
simulated final function bool UsesCustomChar()
|
||||||
{
|
{
|
||||||
if( LocalOwnerPRI==None )
|
if(LocalOwnerPRI==None)
|
||||||
return false; // Not yet init on client.
|
return false; // Not yet init on client.
|
||||||
return CustomCharacter.CharacterIndex<(LocalOwnerPRI.CustomCharList.Length+CharacterArchetypes.Length);
|
return CustomCharacter.CharacterIndex<(LocalOwnerPRI.CustomCharList.Length+CharacterArchetypes.Length);
|
||||||
}
|
}
|
||||||
@ -612,13 +612,13 @@ simulated final function bool UsesCustomChar()
|
|||||||
// Client uses a server specific custom character.
|
// Client uses a server specific custom character.
|
||||||
simulated final function bool ReallyUsingCustomChar()
|
simulated final function bool ReallyUsingCustomChar()
|
||||||
{
|
{
|
||||||
if( !UsesCustomChar() )
|
if(!UsesCustomChar())
|
||||||
return false;
|
return false;
|
||||||
return (CustomCharacter.CharacterIndex>=CharacterArchetypes.Length);
|
return (CustomCharacter.CharacterIndex>=CharacterArchetypes.Length);
|
||||||
}
|
}
|
||||||
simulated final function KFCharacterInfo_Human GetSelectedArch()
|
simulated final function KFCharacterInfo_Human GetSelectedArch()
|
||||||
{
|
{
|
||||||
if( UsesCustomChar() )
|
if(UsesCustomChar())
|
||||||
return (CustomCharacter.CharacterIndex<CharacterArchetypes.Length) ? CharacterArchetypes[CustomCharacter.CharacterIndex] : LocalOwnerPRI.CustomCharList[CustomCharacter.CharacterIndex-CharacterArchetypes.Length].Char;
|
return (CustomCharacter.CharacterIndex<CharacterArchetypes.Length) ? CharacterArchetypes[CustomCharacter.CharacterIndex] : LocalOwnerPRI.CustomCharList[CustomCharacter.CharacterIndex-CharacterArchetypes.Length].Char;
|
||||||
return CharacterArchetypes[RepCustomizationInfo.CharacterIndex];
|
return CharacterArchetypes[RepCustomizationInfo.CharacterIndex];
|
||||||
}
|
}
|
||||||
@ -630,35 +630,35 @@ simulated event CharacterCustomizationChanged()
|
|||||||
|
|
||||||
foreach WorldInfo.AllPawns(class'KFPawn_Human', KFP)
|
foreach WorldInfo.AllPawns(class'KFPawn_Human', KFP)
|
||||||
{
|
{
|
||||||
if( KFP.PlayerReplicationInfo == self || (KFP.DrivenVehicle != None && KFP.DrivenVehicle.PlayerReplicationInfo == self) )
|
if(KFP.PlayerReplicationInfo == self || (KFP.DrivenVehicle != None && KFP.DrivenVehicle.PlayerReplicationInfo == self))
|
||||||
{
|
{
|
||||||
NewCharArch = GetSelectedArch();
|
NewCharArch = GetSelectedArch();
|
||||||
|
|
||||||
if( NewCharArch != KFP.CharacterArch )
|
if(NewCharArch != KFP.CharacterArch)
|
||||||
{
|
{
|
||||||
// selected a new character
|
// selected a new character
|
||||||
KFP.SetCharacterArch( NewCharArch );
|
KFP.SetCharacterArch(NewCharArch);
|
||||||
}
|
}
|
||||||
else if( WorldInfo.NetMode != NM_DedicatedServer )
|
else if(WorldInfo.NetMode != NM_DedicatedServer)
|
||||||
{
|
{
|
||||||
// refresh cosmetics only
|
// refresh cosmetics only
|
||||||
class'ExtCharacterInfo'.Static.SetCharacterMeshFromArch( NewCharArch, KFP, self );
|
class'ExtCharacterInfo'.Static.SetCharacterMeshFromArch(NewCharArch, KFP, self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save/Load custom character information.
|
// Save/Load custom character information.
|
||||||
final function SaveCustomCharacter( ExtSaveDataBase Data )
|
final function SaveCustomCharacter(ExtSaveDataBase Data)
|
||||||
{
|
{
|
||||||
local byte i,c;
|
local byte i,c;
|
||||||
local string S;
|
local string S;
|
||||||
|
|
||||||
// Write the name of custom character.
|
// Write the name of custom character.
|
||||||
if( UsesCustomChar() )
|
if(UsesCustomChar())
|
||||||
S = string(GetSelectedArch().Name);
|
S = string(GetSelectedArch().Name);
|
||||||
Data.SaveStr(S);
|
Data.SaveStr(S);
|
||||||
if( S=="" )
|
if(S=="")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Write selected accessories.
|
// Write selected accessories.
|
||||||
@ -668,9 +668,9 @@ final function SaveCustomCharacter( ExtSaveDataBase Data )
|
|||||||
Data.SaveInt(CustomCharacter.BodySkinIndex);
|
Data.SaveInt(CustomCharacter.BodySkinIndex);
|
||||||
|
|
||||||
c = 0;
|
c = 0;
|
||||||
for( i=0; i<`MAX_COSMETIC_ATTACHMENTS; ++i )
|
for(i=0; i<`MAX_COSMETIC_ATTACHMENTS; ++i)
|
||||||
{
|
{
|
||||||
if( CustomCharacter.AttachmentMeshIndices[i]!=`CLEARED_ATTACHMENT_INDEX )
|
if(CustomCharacter.AttachmentMeshIndices[i]!=`CLEARED_ATTACHMENT_INDEX)
|
||||||
++c;
|
++c;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -678,9 +678,9 @@ final function SaveCustomCharacter( ExtSaveDataBase Data )
|
|||||||
Data.SaveInt(c);
|
Data.SaveInt(c);
|
||||||
|
|
||||||
// Write attachments.
|
// Write attachments.
|
||||||
for( i=0; i<`MAX_COSMETIC_ATTACHMENTS; ++i )
|
for(i=0; i<`MAX_COSMETIC_ATTACHMENTS; ++i)
|
||||||
{
|
{
|
||||||
if( CustomCharacter.AttachmentMeshIndices[i]!=`CLEARED_ATTACHMENT_INDEX )
|
if(CustomCharacter.AttachmentMeshIndices[i]!=`CLEARED_ATTACHMENT_INDEX)
|
||||||
{
|
{
|
||||||
Data.SaveInt(i);
|
Data.SaveInt(i);
|
||||||
Data.SaveInt(CustomCharacter.AttachmentMeshIndices[i]);
|
Data.SaveInt(CustomCharacter.AttachmentMeshIndices[i]);
|
||||||
@ -688,35 +688,35 @@ final function SaveCustomCharacter( ExtSaveDataBase Data )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final function LoadCustomCharacter( ExtSaveDataBase Data )
|
final function LoadCustomCharacter(ExtSaveDataBase Data)
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
local byte i,n,j;
|
local byte i,n,j;
|
||||||
|
|
||||||
if( Data.GetArVer()>=2 )
|
if(Data.GetArVer()>=2)
|
||||||
S = Data.ReadStr();
|
S = Data.ReadStr();
|
||||||
if( S=="" ) // Stock skin.
|
if(S=="") // Stock skin.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for( i=0; i<CharacterArchetypes.Length; ++i )
|
for(i=0; i<CharacterArchetypes.Length; ++i)
|
||||||
{
|
{
|
||||||
if( string(CharacterArchetypes[i].Name)~=S )
|
if(string(CharacterArchetypes[i].Name)~=S)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( i==CharacterArchetypes.Length )
|
if(i==CharacterArchetypes.Length)
|
||||||
{
|
{
|
||||||
for( i=0; i<CustomCharList.Length; ++i )
|
for(i=0; i<CustomCharList.Length; ++i)
|
||||||
{
|
{
|
||||||
if( string(CustomCharList[i].Char.Name)~=S )
|
if(string(CustomCharList[i].Char.Name)~=S)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if( i==CharacterArchetypes.Length )
|
if(i==CharacterArchetypes.Length)
|
||||||
{
|
{
|
||||||
// Character not found = Skip data.
|
// Character not found = Skip data.
|
||||||
Data.SkipBytes(4);
|
Data.SkipBytes(4);
|
||||||
n = Data.ReadInt();
|
n = Data.ReadInt();
|
||||||
for( i=0; i<n; ++i )
|
for(i=0; i<n; ++i)
|
||||||
Data.SkipBytes(3);
|
Data.SkipBytes(3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -730,7 +730,7 @@ final function LoadCustomCharacter( ExtSaveDataBase Data )
|
|||||||
CustomCharacter.BodySkinIndex = Data.ReadInt();
|
CustomCharacter.BodySkinIndex = Data.ReadInt();
|
||||||
|
|
||||||
n = Data.ReadInt();
|
n = Data.ReadInt();
|
||||||
for( i=0; i<n; ++i )
|
for(i=0; i<n; ++i)
|
||||||
{
|
{
|
||||||
j = Min(Data.ReadInt(),`MAX_COSMETIC_ATTACHMENTS-1);
|
j = Min(Data.ReadInt(),`MAX_COSMETIC_ATTACHMENTS-1);
|
||||||
CustomCharacter.AttachmentMeshIndices[j] = Data.ReadInt();
|
CustomCharacter.AttachmentMeshIndices[j] = Data.ReadInt();
|
||||||
@ -740,22 +740,22 @@ final function LoadCustomCharacter( ExtSaveDataBase Data )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only used to skip offset (in case of an error).
|
// Only used to skip offset (in case of an error).
|
||||||
static final function DummyLoadChar( ExtSaveDataBase Data )
|
static final function DummyLoadChar(ExtSaveDataBase Data)
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
local byte i,n;
|
local byte i,n;
|
||||||
|
|
||||||
if( Data.GetArVer()>=2 )
|
if(Data.GetArVer()>=2)
|
||||||
S = Data.ReadStr();
|
S = Data.ReadStr();
|
||||||
if( S=="" ) // Stock skin.
|
if(S=="") // Stock skin.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Data.SkipBytes(4);
|
Data.SkipBytes(4);
|
||||||
n = Data.ReadInt();
|
n = Data.ReadInt();
|
||||||
for( i=0; i<n; ++i )
|
for(i=0; i<n; ++i)
|
||||||
Data.SkipBytes(3);
|
Data.SkipBytes(3);
|
||||||
}
|
}
|
||||||
static final function DummySaveChar( ExtSaveDataBase Data )
|
static final function DummySaveChar(ExtSaveDataBase Data)
|
||||||
{
|
{
|
||||||
Data.SaveStr("");
|
Data.SaveStr("");
|
||||||
}
|
}
|
||||||
@ -773,7 +773,7 @@ simulated function Texture2D GetCurrentIconToDisplay()
|
|||||||
// Set admin levels without having to hard-reference to this mod.
|
// Set admin levels without having to hard-reference to this mod.
|
||||||
event BeginState(Name N)
|
event BeginState(Name N)
|
||||||
{
|
{
|
||||||
switch( N )
|
switch(N)
|
||||||
{
|
{
|
||||||
case 'Global':
|
case 'Global':
|
||||||
AdminType = 0;
|
AdminType = 0;
|
||||||
|
@ -14,13 +14,13 @@ 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);
|
||||||
}
|
}
|
||||||
@ -45,10 +45,10 @@ simulated function SmallExplosion(Vector HitLocation, Vector HitNormal, Actor Hi
|
|||||||
PrepareExplosionTemplate();
|
PrepareExplosionTemplate();
|
||||||
|
|
||||||
// If the locations are zero (probably because this exploded in the air) set defaults
|
// If the locations are zero (probably because this exploded in the air) set defaults
|
||||||
if( IsZero(HitLocation) )
|
if(IsZero(HitLocation))
|
||||||
HitLocation = Location;
|
HitLocation = Location;
|
||||||
|
|
||||||
if( IsZero(HitNormal) )
|
if(IsZero(HitNormal))
|
||||||
{
|
{
|
||||||
HitNormal = vect(0,0,1);
|
HitNormal = vect(0,0,1);
|
||||||
}
|
}
|
||||||
|
@ -14,50 +14,50 @@ simulated function PostBeginPlay()
|
|||||||
local KFPawn InstigatorPawn;
|
local KFPawn InstigatorPawn;
|
||||||
|
|
||||||
InstigatorPawn = KFPawn(Instigator);
|
InstigatorPawn = KFPawn(Instigator);
|
||||||
if( InstigatorPawn != none )
|
if(InstigatorPawn != none)
|
||||||
{
|
{
|
||||||
InstigatorPerk = InstigatorPawn.GetPerk();
|
InstigatorPerk = InstigatorPawn.GetPerk();
|
||||||
if( InstigatorPerk != none )
|
if(InstigatorPerk != none)
|
||||||
bExplodeOnContact = InstigatorPerk.IsOnContactActive();
|
bExplodeOnContact = InstigatorPerk.IsOnContactActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
Super.PostBeginPlay();
|
Super.PostBeginPlay();
|
||||||
if( Instigator!=None && ExtPlayerReplicationInfo(Instigator.PlayerReplicationInfo)!=None && ExtPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ECurrentPerk!=None )
|
if(Instigator!=None && ExtPlayerReplicationInfo(Instigator.PlayerReplicationInfo)!=None && ExtPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ECurrentPerk!=None)
|
||||||
ClusterNades = ExtPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ECurrentPerk.Default.PerkGrenade;
|
ClusterNades = ExtPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ECurrentPerk.Default.PerkGrenade;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNormal)
|
simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNormal)
|
||||||
{
|
{
|
||||||
if( bExplodeOnContact && Other != Instigator && !Other.bWorldGeometry && Pawn(Other)!=None && Pawn(Other).GetTeamNum() != GetTeamNum() )
|
if(bExplodeOnContact && Other != Instigator && !Other.bWorldGeometry && Pawn(Other)!=None && Pawn(Other).GetTeamNum() != GetTeamNum())
|
||||||
{
|
{
|
||||||
// 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function Disintegrate( rotator inDisintegrateEffectRotation ); // Nope!
|
simulated function Disintegrate(rotator inDisintegrateEffectRotation); // Nope!
|
||||||
|
|
||||||
simulated function TriggerExplosion(Vector HitLocation, Vector HitNormal, Actor HitActor)
|
simulated function TriggerExplosion(Vector HitLocation, Vector HitNormal, Actor HitActor)
|
||||||
{
|
{
|
||||||
local byte i;
|
local byte i;
|
||||||
local KFProj_Grenade P;
|
local KFProj_Grenade P;
|
||||||
|
|
||||||
if( bHasExploded )
|
if(bHasExploded)
|
||||||
return;
|
return;
|
||||||
if( InstigatorController==None && WorldInfo.NetMode!=NM_Client ) // Prevent Team-Kill.
|
if(InstigatorController==None && WorldInfo.NetMode!=NM_Client) // Prevent Team-Kill.
|
||||||
{
|
{
|
||||||
Destroy();
|
Destroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Super.TriggerExplosion(HitLocation,HitNormal,HitActor);
|
Super.TriggerExplosion(HitLocation,HitNormal,HitActor);
|
||||||
if( WorldInfo.NetMode!=NM_Client )
|
if(WorldInfo.NetMode!=NM_Client)
|
||||||
{
|
{
|
||||||
for( i=0; i<NumClusters; ++i )
|
for(i=0; i<NumClusters; ++i)
|
||||||
{
|
{
|
||||||
P = Spawn(ClusterNades,,,Location);
|
P = Spawn(ClusterNades,,,Location);
|
||||||
if( P!=None )
|
if(P!=None)
|
||||||
{
|
{
|
||||||
P.InstigatorController = InstigatorController;
|
P.InstigatorController = InstigatorController;
|
||||||
P.Init(VRand());
|
P.Init(VRand());
|
||||||
@ -73,7 +73,7 @@ simulated function Destroyed()
|
|||||||
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);
|
||||||
|
@ -4,27 +4,27 @@ class ExtProj_SUPERMedGrenade extends KFProj_MedicGrenade
|
|||||||
|
|
||||||
var() byte NumClusters;
|
var() byte NumClusters;
|
||||||
|
|
||||||
simulated function Disintegrate( rotator inDisintegrateEffectRotation ); // Nope!
|
simulated function Disintegrate(rotator inDisintegrateEffectRotation); // Nope!
|
||||||
|
|
||||||
simulated function TriggerExplosion(Vector HitLocation, Vector HitNormal, Actor HitActor)
|
simulated function TriggerExplosion(Vector HitLocation, Vector HitNormal, Actor HitActor)
|
||||||
{
|
{
|
||||||
local byte i;
|
local byte i;
|
||||||
local KFProj_MedicGrenade P;
|
local KFProj_MedicGrenade P;
|
||||||
|
|
||||||
if( bHasExploded )
|
if(bHasExploded)
|
||||||
return;
|
return;
|
||||||
if( InstigatorController==None && WorldInfo.NetMode!=NM_Client ) // Prevent Team-Kill.
|
if(InstigatorController==None && WorldInfo.NetMode!=NM_Client) // Prevent Team-Kill.
|
||||||
{
|
{
|
||||||
Destroy();
|
Destroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Super.TriggerExplosion(HitLocation,HitNormal,HitActor);
|
Super.TriggerExplosion(HitLocation,HitNormal,HitActor);
|
||||||
if( WorldInfo.NetMode!=NM_Client )
|
if(WorldInfo.NetMode!=NM_Client)
|
||||||
{
|
{
|
||||||
for( i=0; i<NumClusters; ++i )
|
for(i=0; i<NumClusters; ++i)
|
||||||
{
|
{
|
||||||
P = Spawn(class'KFProj_MedicGrenade',,,Location);
|
P = Spawn(class'KFProj_MedicGrenade',,,Location);
|
||||||
if( P!=None )
|
if(P!=None)
|
||||||
{
|
{
|
||||||
P.InstigatorController = InstigatorController;
|
P.InstigatorController = InstigatorController;
|
||||||
P.Init(VRand());
|
P.Init(VRand());
|
||||||
@ -40,7 +40,7 @@ simulated function Destroyed()
|
|||||||
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);
|
||||||
|
@ -1,47 +1,47 @@
|
|||||||
class ExtSM_Player_Emote extends KFSM_Player_Emote;
|
class ExtSM_Player_Emote extends KFSM_Player_Emote;
|
||||||
|
|
||||||
static function byte PackFlagsBase( KFPawn P )
|
static function byte PackFlagsBase(KFPawn P)
|
||||||
{
|
{
|
||||||
return class'ExtEmoteList'.static.GetEmoteIndex( class'ExtEmoteList'.static.GetEquippedEmoteId(ExtPlayerController(P.Controller)) );
|
return class'ExtEmoteList'.static.GetEmoteIndex(class'ExtEmoteList'.static.GetEquippedEmoteId(ExtPlayerController(P.Controller)));
|
||||||
}
|
}
|
||||||
|
|
||||||
function PlayAnimation()
|
function PlayAnimation()
|
||||||
{
|
{
|
||||||
AnimName = class'ExtEmoteList'.static.GetEmoteFromIndex( KFPOwner.SpecialMoveFlags );
|
AnimName = class'ExtEmoteList'.static.GetEmoteFromIndex(KFPOwner.SpecialMoveFlags);
|
||||||
|
|
||||||
PlaySpecialMoveAnim( AnimName, AnimStance, BlendInTime, BlendOutTime, 1.f );
|
PlaySpecialMoveAnim(AnimName, AnimStance, BlendInTime, BlendOutTime, 1.f);
|
||||||
|
|
||||||
if( KFPOwner.Role == ROLE_Authority )
|
if(KFPOwner.Role == ROLE_Authority)
|
||||||
{
|
{
|
||||||
KFGameInfo(KFPOwner.WorldInfo.Game).DialogManager.PlayDialogEvent( KFPOwner, 31 );
|
KFGameInfo(KFPOwner.WorldInfo.Game).DialogManager.PlayDialogEvent(KFPOwner, 31);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store camera mode for restoration after move ends
|
// Store camera mode for restoration after move ends
|
||||||
LastCameraMode = 'FirstPerson';
|
LastCameraMode = 'FirstPerson';
|
||||||
if( PCOwner != none && PCOwner.PlayerCamera != none )
|
if(PCOwner != none && PCOwner.PlayerCamera != none)
|
||||||
{
|
{
|
||||||
LastCameraMode = PCOwner.PlayerCamera.CameraStyle;
|
LastCameraMode = PCOwner.PlayerCamera.CameraStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set camera to emote third person camera
|
// Set camera to emote third person camera
|
||||||
if( PCOwner == none || !PawnOwner.IsLocallyControlled() )
|
if(PCOwner == none || !PawnOwner.IsLocallyControlled())
|
||||||
{
|
{
|
||||||
KFPOwner.SetWeaponAttachmentVisibility( false );
|
KFPOwner.SetWeaponAttachmentVisibility(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( PCOwner.CanViewCinematics() )
|
if(PCOwner.CanViewCinematics())
|
||||||
{
|
{
|
||||||
PCOwner.ClientSetCameraFade( true, FadeInColor, vect2d(1.f, 0.f), FadeInTime, true );
|
PCOwner.ClientSetCameraFade(true, FadeInColor, vect2d(1.f, 0.f), FadeInTime, true);
|
||||||
PCOwner.PlayerCamera.CameraStyle = 'Emote';
|
PCOwner.PlayerCamera.CameraStyle = 'Emote';
|
||||||
|
|
||||||
// Switch camera modes immediately in single player or on client
|
// Switch camera modes immediately in single player or on client
|
||||||
if( PCOwner.WorldInfo.NetMode != NM_DedicatedServer )
|
if(PCOwner.WorldInfo.NetMode != NM_DedicatedServer)
|
||||||
{
|
{
|
||||||
PCOwner.ClientSetCameraMode( 'Emote' );
|
PCOwner.ClientSetCameraMode('Emote');
|
||||||
}
|
}
|
||||||
|
|
||||||
KFPOwner.SetWeaponAttachmentVisibility( false );
|
KFPOwner.SetWeaponAttachmentVisibility(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,35 +8,35 @@ Interface ExtSaveDataBase;
|
|||||||
2: 0-16777215
|
2: 0-16777215
|
||||||
3: -2147483647 - 2147483647
|
3: -2147483647 - 2147483647
|
||||||
*/
|
*/
|
||||||
function SaveInt( int Value, optional byte MaxVal );
|
function SaveInt(int Value, optional byte MaxVal);
|
||||||
function int ReadInt( optional byte MaxVal );
|
function int ReadInt(optional byte MaxVal);
|
||||||
function SaveStr( string S );
|
function SaveStr(string S);
|
||||||
function string ReadStr();
|
function string ReadStr();
|
||||||
|
|
||||||
// File offset management.
|
// File offset management.
|
||||||
function int TellOffset();
|
function int TellOffset();
|
||||||
function SeekOffset( int Offset );
|
function SeekOffset(int Offset);
|
||||||
function int TotalSize();
|
function int TotalSize();
|
||||||
function ToEnd();
|
function ToEnd();
|
||||||
function ToStart();
|
function ToStart();
|
||||||
function bool AtEnd();
|
function bool AtEnd();
|
||||||
function SkipBytes( int Count );
|
function SkipBytes(int Count);
|
||||||
|
|
||||||
// Wipe out any saved data.
|
// Wipe out any saved data.
|
||||||
function FlushData();
|
function FlushData();
|
||||||
|
|
||||||
// Get file contents in a byte array line.
|
// Get file contents in a byte array line.
|
||||||
function GetData( out array<byte> Res );
|
function GetData(out array<byte> Res);
|
||||||
function SetData( out array<byte> S );
|
function SetData(out array<byte> S);
|
||||||
|
|
||||||
// Archive version (to allow modder to make upgraded stat binarily compatible)
|
// Archive version (to allow modder to make upgraded stat binarily compatible)
|
||||||
function int GetArVer();
|
function int GetArVer();
|
||||||
function SetArVer( int Ver );
|
function SetArVer(int Ver);
|
||||||
|
|
||||||
// Push/Pop file limitators (to prevent it from reading EoF in sub sections).
|
// Push/Pop file limitators (to prevent it from reading EoF in sub sections).
|
||||||
function PushEOFLimit( int EndOffset );
|
function PushEOFLimit(int EndOffset);
|
||||||
function PopEOFLimit();
|
function PopEOFLimit();
|
||||||
|
|
||||||
// Get most recent save version for this user.
|
// Get most recent save version for this user.
|
||||||
function int GetSaveVersion();
|
function int GetSaveVersion();
|
||||||
function SetSaveVersion( int Num );
|
function SetSaveVersion(int Num);
|
||||||
|
@ -5,7 +5,7 @@ Class ExtSpawnPointHelper extends Info
|
|||||||
var transient array<NavigationPoint> PendingList,CheckedList;
|
var transient array<NavigationPoint> PendingList,CheckedList;
|
||||||
var array<Actor> ValidSpawnSpots;
|
var array<Actor> ValidSpawnSpots;
|
||||||
|
|
||||||
static final function ExtSpawnPointHelper FindHelper( WorldInfo Level )
|
static final function ExtSpawnPointHelper FindHelper(WorldInfo Level)
|
||||||
{
|
{
|
||||||
local ExtSpawnPointHelper H;
|
local ExtSpawnPointHelper H;
|
||||||
|
|
||||||
@ -24,21 +24,21 @@ final function Actor PickBestSpawn()
|
|||||||
BestScore = 0;
|
BestScore = 0;
|
||||||
foreach ValidSpawnSpots(N)
|
foreach ValidSpawnSpots(N)
|
||||||
{
|
{
|
||||||
if( Rand(4)==0 )
|
if(Rand(4)==0)
|
||||||
{
|
{
|
||||||
Score = FRand();
|
Score = FRand();
|
||||||
foreach WorldInfo.AllPawns(class'KFPawn',P,N.Location,2000.f)
|
foreach WorldInfo.AllPawns(class'KFPawn',P,N.Location,2000.f)
|
||||||
{
|
{
|
||||||
if( !P.IsAliveAndWell() )
|
if(!P.IsAliveAndWell())
|
||||||
continue;
|
continue;
|
||||||
Dist = VSize(N.Location-P.Location);
|
Dist = VSize(N.Location-P.Location);
|
||||||
if( FastTrace(P.Location,N.Location) )
|
if(FastTrace(P.Location,N.Location))
|
||||||
Dist*=0.75;
|
Dist*=0.75;
|
||||||
if( P.IsA('KFPawn_Human') )
|
if(P.IsA('KFPawn_Human'))
|
||||||
Score+=(3000.f-Dist)/2000.f;
|
Score+=(3000.f-Dist)/2000.f;
|
||||||
else Score-=(3500.f-Dist)/2500.f;
|
else Score-=(3500.f-Dist)/2500.f;
|
||||||
}
|
}
|
||||||
if( BestN==None || Score>BestScore )
|
if(BestN==None || Score>BestScore)
|
||||||
{
|
{
|
||||||
BestN = N;
|
BestN = N;
|
||||||
BestScore = Score;
|
BestScore = Score;
|
||||||
@ -49,21 +49,21 @@ final function Actor PickBestSpawn()
|
|||||||
// See if can spawn ontop of other players.
|
// See if can spawn ontop of other players.
|
||||||
foreach WorldInfo.AllPawns(class'KFPawn_Human',H)
|
foreach WorldInfo.AllPawns(class'KFPawn_Human',H)
|
||||||
{
|
{
|
||||||
if( !H.IsAliveAndWell() || H.Physics==PHYS_Falling || (ExtHumanPawn(H)!=None && ExtHumanPawn(H).bFeigningDeath) )
|
if(!H.IsAliveAndWell() || H.Physics==PHYS_Falling || (ExtHumanPawn(H)!=None && ExtHumanPawn(H).bFeigningDeath))
|
||||||
continue;
|
continue;
|
||||||
Score = FRand();
|
Score = FRand();
|
||||||
foreach WorldInfo.AllPawns(class'KFPawn',P,H.Location,2000.f)
|
foreach WorldInfo.AllPawns(class'KFPawn',P,H.Location,2000.f)
|
||||||
{
|
{
|
||||||
if( !P.IsAliveAndWell() )
|
if(!P.IsAliveAndWell())
|
||||||
continue;
|
continue;
|
||||||
Dist = VSize(H.Location-P.Location);
|
Dist = VSize(H.Location-P.Location);
|
||||||
if( FastTrace(P.Location,H.Location) )
|
if(FastTrace(P.Location,H.Location))
|
||||||
Dist*=0.75;
|
Dist*=0.75;
|
||||||
if( P.IsA('KFPawn_Human') )
|
if(P.IsA('KFPawn_Human'))
|
||||||
Score+=(3000.f-Dist)/3000.f;
|
Score+=(3000.f-Dist)/3000.f;
|
||||||
else Score-=(3500.f-Dist)/3500.f;
|
else Score-=(3500.f-Dist)/3500.f;
|
||||||
}
|
}
|
||||||
if( BestN==None || Score>BestScore )
|
if(BestN==None || Score>BestScore)
|
||||||
{
|
{
|
||||||
BestN = H;
|
BestN = H;
|
||||||
BestScore = Score;
|
BestScore = Score;
|
||||||
@ -83,14 +83,14 @@ function InitChecker()
|
|||||||
foreach WorldInfo.AllNavigationPoints(class'PlayerStart',PS)
|
foreach WorldInfo.AllNavigationPoints(class'PlayerStart',PS)
|
||||||
{
|
{
|
||||||
Fallback = PS;
|
Fallback = PS;
|
||||||
if( PS.bEnabled && PS.TeamIndex==0 )
|
if(PS.bEnabled && PS.TeamIndex==0)
|
||||||
{
|
{
|
||||||
CheckSpawn(PS);
|
CheckSpawn(PS);
|
||||||
if( PendingList.Length!=0 )
|
if(PendingList.Length!=0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( PendingList.Length==0 && Fallback!=None )
|
if(PendingList.Length==0 && Fallback!=None)
|
||||||
CheckSpawn(Fallback);
|
CheckSpawn(Fallback);
|
||||||
SetTimer(0.001,true,'NextCheck');
|
SetTimer(0.001,true,'NextCheck');
|
||||||
}
|
}
|
||||||
@ -99,9 +99,9 @@ function NextCheck()
|
|||||||
local NavigationPoint N;
|
local NavigationPoint N;
|
||||||
local byte i;
|
local byte i;
|
||||||
|
|
||||||
if( PendingList.Length!=0 )
|
if(PendingList.Length!=0)
|
||||||
{
|
{
|
||||||
while( ++i<5 && PendingList.Length!=0 )
|
while(++i<5 && PendingList.Length!=0)
|
||||||
{
|
{
|
||||||
N = PendingList[PendingList.Length-1];
|
N = PendingList[PendingList.Length-1];
|
||||||
PendingList.Remove(PendingList.Length-1,1);
|
PendingList.Remove(PendingList.Length-1,1);
|
||||||
@ -114,7 +114,7 @@ function NextCheck()
|
|||||||
CheckedList.Length = 0;
|
CheckedList.Length = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final function CheckSpawn( NavigationPoint N )
|
final function CheckSpawn(NavigationPoint N)
|
||||||
{
|
{
|
||||||
local vector V;
|
local vector V;
|
||||||
local ReachSpec R;
|
local ReachSpec R;
|
||||||
@ -122,7 +122,7 @@ final function CheckSpawn( NavigationPoint N )
|
|||||||
local KFPawnBlockingVolume P;
|
local KFPawnBlockingVolume P;
|
||||||
|
|
||||||
V = N.Location;
|
V = N.Location;
|
||||||
if( N.MaxPathSize.Radius>30 && N.MaxPathSize.Height>80 && FindSpot(vect(36,36,86),V) && KFDoorMarker(N)==None && PickupFactory(N)==None )
|
if(N.MaxPathSize.Radius>30 && N.MaxPathSize.Height>80 && FindSpot(vect(36,36,86),V) && KFDoorMarker(N)==None && PickupFactory(N)==None)
|
||||||
{
|
{
|
||||||
//DrawDebugLine(V,V+vect(0,0,50),255,255,255,true);
|
//DrawDebugLine(V,V+vect(0,0,50),255,255,255,true);
|
||||||
ValidSpawnSpots.AddItem(N);
|
ValidSpawnSpots.AddItem(N);
|
||||||
@ -132,22 +132,22 @@ final function CheckSpawn( NavigationPoint N )
|
|||||||
foreach N.PathList(R)
|
foreach N.PathList(R)
|
||||||
{
|
{
|
||||||
E = R.GetEnd();
|
E = R.GetEnd();
|
||||||
if( E==None || R.CollisionRadius<30 || R.CollisionHeight<80 || R.Class==Class'ProscribedReachSpec' )
|
if(E==None || R.CollisionRadius<30 || R.CollisionHeight<80 || R.Class==Class'ProscribedReachSpec')
|
||||||
{
|
{
|
||||||
//if( E!=None )
|
//if(E!=None)
|
||||||
// DrawDebugLine(E.Location,N.Location,255,255,0,true);
|
// DrawDebugLine(E.Location,N.Location,255,255,0,true);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if( CheckedList.Find(E)!=INDEX_NONE )
|
if(CheckedList.Find(E)!=INDEX_NONE)
|
||||||
continue;
|
continue;
|
||||||
// DO NOT go through any blocking volumes.
|
// DO NOT go through any blocking volumes.
|
||||||
V = (N.Location+E.Location) * 0.5;
|
V = (N.Location+E.Location) * 0.5;
|
||||||
foreach OverlappingActors(class'KFPawnBlockingVolume',P,VSize(N.Location-V),V)
|
foreach OverlappingActors(class'KFPawnBlockingVolume',P,VSize(N.Location-V),V)
|
||||||
{
|
{
|
||||||
if( P.bBlockPlayers && TraceComponent(V,V,P.CollisionComponent,E.Location,N.Location,vect(36,36,50)) )
|
if(P.bBlockPlayers && TraceComponent(V,V,P.CollisionComponent,E.Location,N.Location,vect(36,36,50)))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if( P==None )
|
if(P==None)
|
||||||
{
|
{
|
||||||
//DrawDebugLine(E.Location,N.Location,0,255,0,true);
|
//DrawDebugLine(E.Location,N.Location,0,255,0,true);
|
||||||
PendingList.AddItem(E);
|
PendingList.AddItem(E);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Interface class for outputting stats into a file or something.
|
// Interface class for outputting stats into a file or something.
|
||||||
Interface ExtStatWriter;
|
Interface ExtStatWriter;
|
||||||
|
|
||||||
function WriteValue( string Key, string Value );
|
function WriteValue(string Key, string Value);
|
||||||
function StartIntendent( string Section, optional string Key, optional string Value );
|
function StartIntendent(string Section, optional string Key, optional string Value);
|
||||||
function EndIntendent();
|
function EndIntendent();
|
||||||
function ResetFile();
|
function ResetFile();
|
||||||
|
@ -11,18 +11,18 @@ 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;
|
||||||
KFPRI = KFPlayerReplicationInfo(KFPC.PlayerReplicationInfo);
|
KFPRI = KFPlayerReplicationInfo(KFPC.PlayerReplicationInfo);
|
||||||
if ( KFPRI != none && PrM!=None )
|
if (KFPRI != none && PrM!=None)
|
||||||
{
|
{
|
||||||
i = Max(PrM.UserPerks.Find(PrM.CurrentPerk),0);
|
i = Max(PrM.UserPerks.Find(PrM.CurrentPerk),0);
|
||||||
SetInt("selectedIndex", i);
|
SetInt("selectedIndex", i);
|
||||||
|
|
||||||
// Set the title of this filter based on either the perk or the off perk string
|
// Set the title of this filter based on either the perk or the off perk string
|
||||||
if( FilterIndex < PrM.UserPerks.Length )
|
if(FilterIndex < PrM.UserPerks.Length)
|
||||||
{
|
{
|
||||||
SetString("filterText", PrM.UserPerks[FilterIndex].PerkName);
|
SetString("filterText", PrM.UserPerks[FilterIndex].PerkName);
|
||||||
}
|
}
|
||||||
@ -34,16 +34,16 @@ function SetPerkFilterData(byte FilterIndex)
|
|||||||
DataProvider = CreateArray();
|
DataProvider = CreateArray();
|
||||||
for (i = 0; i < PrM.UserPerks.Length; i++)
|
for (i = 0; i < PrM.UserPerks.Length; i++)
|
||||||
{
|
{
|
||||||
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");
|
||||||
FilterObject.SetString("source", "img://"$class'KFGFxObject_TraderItems'.default.OffPerkIconPath);
|
FilterObject.SetString("source", "img://"$class'KFGFxObject_TraderItems'.default.OffPerkIconPath);
|
||||||
DataProvider.SetElementObject( i, FilterObject );
|
DataProvider.SetElementObject(i, FilterObject);
|
||||||
|
|
||||||
SetObject( "filterSource", DataProvider );
|
SetObject("filterSource", DataProvider);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ function SetPerkInfo()
|
|||||||
local float V;
|
local float V;
|
||||||
|
|
||||||
KFPC = ExtPlayerController(GetPC());
|
KFPC = ExtPlayerController(GetPC());
|
||||||
if( KFPC!=none && KFPC.ActivePerkManager!=None && KFPC.ActivePerkManager.CurrentPerk!=None )
|
if(KFPC!=none && KFPC.ActivePerkManager!=None && KFPC.ActivePerkManager.CurrentPerk!=None)
|
||||||
{
|
{
|
||||||
CurrentPerk = KFPC.ActivePerkManager.CurrentPerk;
|
CurrentPerk = KFPC.ActivePerkManager.CurrentPerk;
|
||||||
SetString("perkName", CurrentPerk.PerkName);
|
SetString("perkName", CurrentPerk.PerkName);
|
||||||
@ -28,14 +28,14 @@ function SetPerkList()
|
|||||||
local Ext_PerkBase P;
|
local Ext_PerkBase P;
|
||||||
|
|
||||||
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++)
|
||||||
{
|
{
|
||||||
P = KFPC.ActivePerkManager.UserPerks[i];
|
P = KFPC.ActivePerkManager.UserPerks[i];
|
||||||
PerkObject = CreateObject( "Object" );
|
PerkObject = CreateObject("Object");
|
||||||
PerkObject.SetString("name", P.PerkName);
|
PerkObject.SetString("name", P.PerkName);
|
||||||
PerkObject.SetString("perkIconSource", P.GetPerkIconPath(P.CurrentLevel));
|
PerkObject.SetString("perkIconSource", P.GetPerkIconPath(P.CurrentLevel));
|
||||||
PerkObject.SetInt("level", P.CurrentLevel);
|
PerkObject.SetInt("level", P.CurrentLevel);
|
||||||
|
@ -9,9 +9,9 @@ function RefreshWeaponListByPerk(byte FilterIndex, const out array<STraderItem>
|
|||||||
local ExtPlayerController EKFPC;
|
local ExtPlayerController EKFPC;
|
||||||
|
|
||||||
EKFPC = ExtPlayerController(KFPC);
|
EKFPC = ExtPlayerController(KFPC);
|
||||||
if ( EKFPC!=none && EKFPC.ActivePerkManager!=None)
|
if (EKFPC!=none && EKFPC.ActivePerkManager!=None)
|
||||||
{
|
{
|
||||||
if( FilterIndex<EKFPC.ActivePerkManager.UserPerks.Length )
|
if(FilterIndex<EKFPC.ActivePerkManager.UserPerks.Length)
|
||||||
TargetPerkClass = EKFPC.ActivePerkManager.UserPerks[FilterIndex].BasePerk;
|
TargetPerkClass = EKFPC.ActivePerkManager.UserPerks[FilterIndex].BasePerk;
|
||||||
|
|
||||||
SlotIndex = 0;
|
SlotIndex = 0;
|
||||||
@ -19,12 +19,12 @@ function RefreshWeaponListByPerk(byte FilterIndex, const out array<STraderItem>
|
|||||||
|
|
||||||
for (i = 0; i < ItemList.Length; i++)
|
for (i = 0; i < ItemList.Length; i++)
|
||||||
{
|
{
|
||||||
if ( IsItemFiltered(ItemList[i]) )
|
if (IsItemFiltered(ItemList[i]))
|
||||||
{
|
{
|
||||||
continue; // Skip this item if it's in our inventory
|
continue; // Skip this item if it's in our inventory
|
||||||
}
|
}
|
||||||
else if ( ItemList[i].AssociatedPerkClasses.length > 0 && ItemList[i].AssociatedPerkClasses[0] != none && TargetPerkClass != class'KFPerk_Survivalist'
|
else if (ItemList[i].AssociatedPerkClasses.length > 0 && ItemList[i].AssociatedPerkClasses[0] != none && TargetPerkClass != class'KFPerk_Survivalist'
|
||||||
&& (TargetPerkClass==None || ItemList[i].AssociatedPerkClasses.Find(TargetPerkClass) == INDEX_NONE ) )
|
&& (TargetPerkClass==None || ItemList[i].AssociatedPerkClasses.Find(TargetPerkClass) == INDEX_NONE))
|
||||||
{
|
{
|
||||||
continue; // filtered by perk
|
continue; // filtered by perk
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,12 @@ simulated static function bool AllowedForAllPerks()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ConsumeAmmo( byte FireModeNum )
|
simulated function ConsumeAmmo(byte FireModeNum)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated static event class<KFPerk> GetWeaponPerkClass( class<KFPerk> InstigatorPerkClass )
|
simulated static event class<KFPerk> GetWeaponPerkClass(class<KFPerk> InstigatorPerkClass)
|
||||||
{
|
{
|
||||||
if(InstigatorPerkClass != None)
|
if(InstigatorPerkClass != None)
|
||||||
return InstigatorPerkClass;
|
return InstigatorPerkClass;
|
||||||
|
@ -17,12 +17,12 @@ simulated static function bool AllowedForAllPerks()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ConsumeAmmo( byte FireModeNum )
|
simulated function ConsumeAmmo(byte FireModeNum)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated static event class<KFPerk> GetWeaponPerkClass( class<KFPerk> InstigatorPerkClass )
|
simulated static event class<KFPerk> GetWeaponPerkClass(class<KFPerk> InstigatorPerkClass)
|
||||||
{
|
{
|
||||||
if(InstigatorPerkClass != None)
|
if(InstigatorPerkClass != None)
|
||||||
return InstigatorPerkClass;
|
return InstigatorPerkClass;
|
||||||
|
@ -24,13 +24,13 @@ simulated static function bool AllowedForAllPerks()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ConsumeAmmo( byte FireModeNum )
|
simulated function ConsumeAmmo(byte FireModeNum)
|
||||||
{
|
{
|
||||||
if(FireModeNum == ALTFIRE_FIREMODE)
|
if(FireModeNum == ALTFIRE_FIREMODE)
|
||||||
super.ConsumeAmmo(FireModeNum);
|
super.ConsumeAmmo(FireModeNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated static event class<KFPerk> GetWeaponPerkClass( class<KFPerk> InstigatorPerkClass )
|
simulated static event class<KFPerk> GetWeaponPerkClass(class<KFPerk> InstigatorPerkClass)
|
||||||
{
|
{
|
||||||
if(InstigatorPerkClass != None)
|
if(InstigatorPerkClass != None)
|
||||||
return InstigatorPerkClass;
|
return InstigatorPerkClass;
|
||||||
|
@ -27,28 +27,28 @@ static function array<MaterialInterface> GetWeaponSkin(int ItemId, EWeaponSkinTy
|
|||||||
local string FirstPMat;
|
local string FirstPMat;
|
||||||
|
|
||||||
i = default.Skins.Find('Id', ItemId);
|
i = default.Skins.Find('Id', ItemId);
|
||||||
if( i > -1 )
|
if(i > -1)
|
||||||
{
|
{
|
||||||
switch( Type )
|
switch(Type)
|
||||||
{
|
{
|
||||||
case WST_FirstPerson:
|
case WST_FirstPerson:
|
||||||
foreach default.Skins[i].MIC_1P(FirstPMat)
|
foreach default.Skins[i].MIC_1P(FirstPMat)
|
||||||
{
|
{
|
||||||
LoadedMat = MaterialInterface(DynamicLoadObject(FirstPMat, class'MaterialInterface'));
|
LoadedMat = MaterialInterface(DynamicLoadObject(FirstPMat, class'MaterialInterface'));
|
||||||
if( LoadedMat != None )
|
if(LoadedMat != None)
|
||||||
Mats.AddItem(LoadedMat);
|
Mats.AddItem(LoadedMat);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case WST_ThirdPerson:
|
case WST_ThirdPerson:
|
||||||
LoadedMat = MaterialInterface(DynamicLoadObject(default.Skins[i].MIC_3P, class'MaterialInterface'));
|
LoadedMat = MaterialInterface(DynamicLoadObject(default.Skins[i].MIC_3P, class'MaterialInterface'));
|
||||||
if( LoadedMat != None )
|
if(LoadedMat != None)
|
||||||
Mats.AddItem(LoadedMat);
|
Mats.AddItem(LoadedMat);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case WST_Pickup:
|
case WST_Pickup:
|
||||||
LoadedMat = MaterialInterface(DynamicLoadObject(default.Skins[i].MIC_Pickup, class'MaterialInterface'));
|
LoadedMat = MaterialInterface(DynamicLoadObject(default.Skins[i].MIC_Pickup, class'MaterialInterface'));
|
||||||
if( LoadedMat != None )
|
if(LoadedMat != None)
|
||||||
Mats.AddItem(LoadedMat);
|
Mats.AddItem(LoadedMat);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -58,12 +58,12 @@ static function array<MaterialInterface> GetWeaponSkin(int ItemId, EWeaponSkinTy
|
|||||||
return Mats;
|
return Mats;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function SaveWeaponSkin(class<KFWeaponDefinition> WeaponDef, int ID, ExtPlayerController PC )
|
static function SaveWeaponSkin(class<KFWeaponDefinition> WeaponDef, int ID, ExtPlayerController PC)
|
||||||
{
|
{
|
||||||
local int ALen, i;
|
local int ALen, i;
|
||||||
|
|
||||||
i = PC.SavedWeaponSkins.Find('WepDef', WeaponDef);
|
i = PC.SavedWeaponSkins.Find('WepDef', WeaponDef);
|
||||||
if( i > -1 )
|
if(i > -1)
|
||||||
PC.SavedWeaponSkins.Remove(i, 1);
|
PC.SavedWeaponSkins.Remove(i, 1);
|
||||||
|
|
||||||
ALen = PC.SavedWeaponSkins.Length;
|
ALen = PC.SavedWeaponSkins.Length;
|
||||||
@ -77,7 +77,7 @@ static function bool IsSkinEquip(class<KFWeaponDefinition> WeaponDef, int ID, Ex
|
|||||||
{
|
{
|
||||||
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;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -33,19 +33,19 @@ struct FPropGroup
|
|||||||
var array<FPropGroup> ConfigList;
|
var array<FPropGroup> ConfigList;
|
||||||
|
|
||||||
// Value accessors.
|
// Value accessors.
|
||||||
Delegate string OnGetValue( name PropName, int ElementIndex );
|
Delegate string OnGetValue(name PropName, int ElementIndex);
|
||||||
Delegate OnSetValue( name PropName, int ElementIndex, string Value );
|
Delegate OnSetValue(name PropName, int ElementIndex, string Value);
|
||||||
|
|
||||||
final function Cleanup()
|
final function Cleanup()
|
||||||
{
|
{
|
||||||
ConfigList.Length = 0;
|
ConfigList.Length = 0;
|
||||||
}
|
}
|
||||||
final function AddSettingsPage( string PageName, class<Object> Obj, const out array<FWebAdminConfigInfo> Configs, delegate<OnGetValue> GetFunc, delegate<OnSetValue> SetFunc )
|
final function AddSettingsPage(string PageName, class<Object> Obj, const out array<FWebAdminConfigInfo> Configs, delegate<OnGetValue> GetFunc, delegate<OnSetValue> SetFunc)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
i = ConfigList.Find('PageName',PageName);
|
i = ConfigList.Find('PageName',PageName);
|
||||||
if( i>=0 ) // Make sure no dupe pages.
|
if(i>=0) // Make sure no dupe pages.
|
||||||
PageName $= "_"$(ConfigList[i].Dupes++);
|
PageName $= "_"$(ConfigList[i].Dupes++);
|
||||||
|
|
||||||
i = ConfigList.Length;
|
i = ConfigList.Length;
|
||||||
@ -56,7 +56,7 @@ final function AddSettingsPage( string PageName, class<Object> Obj, const out ar
|
|||||||
ConfigList[i].GetValue = GetFunc;
|
ConfigList[i].GetValue = GetFunc;
|
||||||
ConfigList[i].SetValue = SetFunc;
|
ConfigList[i].SetValue = SetFunc;
|
||||||
}
|
}
|
||||||
final function bool HasConfigFor( class<Object> Obj )
|
final function bool HasConfigFor(class<Object> Obj)
|
||||||
{
|
{
|
||||||
return (ConfigList.Find('ObjClass',Obj)>=0);
|
return (ConfigList.Find('ObjClass',Obj)>=0);
|
||||||
}
|
}
|
||||||
|
@ -7,12 +7,12 @@ var transient bool bVisib,bHasInit;
|
|||||||
|
|
||||||
function TickHud(float DeltaTime)
|
function TickHud(float DeltaTime)
|
||||||
{
|
{
|
||||||
if( !KFPC.bHideBossHealthBar && BossList.Length>0 )
|
if(!KFPC.bHideBossHealthBar && BossList.Length>0)
|
||||||
{
|
{
|
||||||
if( KFPC.WorldInfo.RealTimeSeconds>LastUpdateTime && HasBossesAlive() )
|
if(KFPC.WorldInfo.RealTimeSeconds>LastUpdateTime && HasBossesAlive())
|
||||||
{
|
{
|
||||||
LastUpdateTime = KFPC.WorldInfo.RealTimeSeconds + UpdateTickTime;
|
LastUpdateTime = KFPC.WorldInfo.RealTimeSeconds + UpdateTickTime;
|
||||||
if( !bVisib )
|
if(!bVisib)
|
||||||
{
|
{
|
||||||
LastHP = -1;
|
LastHP = -1;
|
||||||
LastShield = -1;
|
LastShield = -1;
|
||||||
@ -22,12 +22,12 @@ function TickHud(float DeltaTime)
|
|||||||
UpdateBossInfo();
|
UpdateBossInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( bHasInit )
|
else if(bHasInit)
|
||||||
{
|
{
|
||||||
NumBosses = 0;
|
NumBosses = 0;
|
||||||
bHasInit = false;
|
bHasInit = false;
|
||||||
BossList.Length = 0;
|
BossList.Length = 0;
|
||||||
if( bVisib )
|
if(bVisib)
|
||||||
{
|
{
|
||||||
bVisib = false;
|
bVisib = false;
|
||||||
SetVisible(false);
|
SetVisible(false);
|
||||||
@ -39,14 +39,14 @@ final function bool HasBossesAlive()
|
|||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
for( i=(BossList.Length-1); i>=0; --i )
|
for(i=(BossList.Length-1); i>=0; --i)
|
||||||
{
|
{
|
||||||
if( BossList[i]==None || BossList[i].bDeleteMe || BossList[i].GetTeamNum()==0 )
|
if(BossList[i]==None || BossList[i].bDeleteMe || BossList[i].GetTeamNum()==0)
|
||||||
{
|
{
|
||||||
BossList.Remove(i,1);
|
BossList.Remove(i,1);
|
||||||
--NumBosses;
|
--NumBosses;
|
||||||
}
|
}
|
||||||
else if( !BossList[i].IsAliveAndWell() )
|
else if(!BossList[i].IsAliveAndWell())
|
||||||
BossList.Remove(i,1);
|
BossList.Remove(i,1);
|
||||||
}
|
}
|
||||||
return (BossList.Length>0);
|
return (BossList.Length>0);
|
||||||
@ -54,7 +54,7 @@ final function bool HasBossesAlive()
|
|||||||
|
|
||||||
function SetBossPawn(KFInterface_MonsterBoss NewBoss)
|
function SetBossPawn(KFInterface_MonsterBoss NewBoss)
|
||||||
{
|
{
|
||||||
if( !KFPC.bHideBossHealthBar && NewBoss!=None && NewBoss.GetMonsterPawn().IsAliveAndWell() )
|
if(!KFPC.bHideBossHealthBar && NewBoss!=None && NewBoss.GetMonsterPawn().IsAliveAndWell())
|
||||||
{
|
{
|
||||||
bHasInit = true;
|
bHasInit = true;
|
||||||
++NumBosses;
|
++NumBosses;
|
||||||
@ -67,27 +67,27 @@ final function UpdateBossInfo()
|
|||||||
local float V;
|
local float V;
|
||||||
local KFPawn_Monster B;
|
local KFPawn_Monster B;
|
||||||
|
|
||||||
if( NextBossDistTime<KFPC.WorldInfo.RealTimeSeconds )
|
if(NextBossDistTime<KFPC.WorldInfo.RealTimeSeconds)
|
||||||
{
|
{
|
||||||
NextBossDistTime = KFPC.WorldInfo.RealTimeSeconds + 1.f;
|
NextBossDistTime = KFPC.WorldInfo.RealTimeSeconds + 1.f;
|
||||||
CheckBestBoss();
|
CheckBestBoss();
|
||||||
}
|
}
|
||||||
|
|
||||||
V = (BossPawn!=None ? FClamp(float(BossPawn.GetMonsterPawn().Health) / float(BossPawn.GetMonsterPawn().HealthMax),0.f,1.f) : 0.f);
|
V = (BossPawn!=None ? FClamp(float(BossPawn.GetMonsterPawn().Health) / float(BossPawn.GetMonsterPawn().HealthMax),0.f,1.f) : 0.f);
|
||||||
if( LastHP!=V )
|
if(LastHP!=V)
|
||||||
{
|
{
|
||||||
LastHP = V;
|
LastHP = V;
|
||||||
SetFloat("currentHealthPercentValue",V);
|
SetFloat("currentHealthPercentValue",V);
|
||||||
}
|
}
|
||||||
|
|
||||||
V = 0.f;
|
V = 0.f;
|
||||||
if( NumBosses>1 )
|
if(NumBosses>1)
|
||||||
{
|
{
|
||||||
foreach BossList(B)
|
foreach BossList(B)
|
||||||
V += FClamp(float(B.Health) / float(B.HealthMax),0.f,1.f);
|
V += FClamp(float(B.Health) / float(B.HealthMax),0.f,1.f);
|
||||||
V /= NumBosses;
|
V /= NumBosses;
|
||||||
}
|
}
|
||||||
if( LastShield!=V )
|
if(LastShield!=V)
|
||||||
{
|
{
|
||||||
LastShield = V;
|
LastShield = V;
|
||||||
SetFloat("currentShieldPercecntValue",V);
|
SetFloat("currentShieldPercecntValue",V);
|
||||||
@ -104,14 +104,14 @@ final function CheckBestBoss()
|
|||||||
foreach BossList(B)
|
foreach BossList(B)
|
||||||
{
|
{
|
||||||
Dist = VSizeSq(Pos-B.Location);
|
Dist = VSizeSq(Pos-B.Location);
|
||||||
if( Best==None || Dist<BestDist )
|
if(Best==None || Dist<BestDist)
|
||||||
{
|
{
|
||||||
Best = B;
|
Best = B;
|
||||||
BestDist = Dist;
|
BestDist = Dist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Best!=BossPawn )
|
if(Best!=BossPawn)
|
||||||
{
|
{
|
||||||
BossPawn = Best;
|
BossPawn = Best;
|
||||||
SetBossName(Best.static.GetLocalizedName());
|
SetBossName(Best.static.GetLocalizedName());
|
||||||
|
@ -14,7 +14,7 @@ struct ExtMemberSlotStruct
|
|||||||
};
|
};
|
||||||
var ExtMemberSlotStruct ExtMemberSlots[13];
|
var ExtMemberSlotStruct ExtMemberSlots[13];
|
||||||
|
|
||||||
function GFxObject RefreshSlot( int SlotIndex, KFPlayerReplicationInfo KFPRI )
|
function GFxObject RefreshSlot(int SlotIndex, KFPlayerReplicationInfo KFPRI)
|
||||||
{
|
{
|
||||||
local string PlayerName;
|
local string PlayerName;
|
||||||
local UniqueNetId AdminId;
|
local UniqueNetId AdminId;
|
||||||
@ -27,20 +27,20 @@ function GFxObject RefreshSlot( int SlotIndex, KFPlayerReplicationInfo KFPRI )
|
|||||||
PlayerInfoObject = CreateObject("Object");
|
PlayerInfoObject = CreateObject("Object");
|
||||||
EPC = ExtPlayerController(GetPC());
|
EPC = ExtPlayerController(GetPC());
|
||||||
|
|
||||||
if( KFPRI != none )
|
if(KFPRI != none)
|
||||||
{
|
{
|
||||||
EPRI = ExtPlayerReplicationInfo(KFPRI);
|
EPRI = ExtPlayerReplicationInfo(KFPRI);
|
||||||
}
|
}
|
||||||
if( OnlineLobby != none )
|
if(OnlineLobby != none)
|
||||||
{
|
{
|
||||||
OnlineLobby.GetLobbyAdmin( OnlineLobby.GetCurrentLobbyId(), AdminId);
|
OnlineLobby.GetLobbyAdmin(OnlineLobby.GetCurrentLobbyId(), AdminId);
|
||||||
}
|
}
|
||||||
bIsLeader = EPRI.UniqueId == AdminId;
|
bIsLeader = EPRI.UniqueId == AdminId;
|
||||||
PlayerInfoObject.SetBool("bLeader", bIsLeader);
|
PlayerInfoObject.SetBool("bLeader", bIsLeader);
|
||||||
bIsMyPlayer = EPC.PlayerReplicationInfo.UniqueId == KFPRI.UniqueId;
|
bIsMyPlayer = EPC.PlayerReplicationInfo.UniqueId == KFPRI.UniqueId;
|
||||||
ExtMemberSlots[SlotIndex].PerkClass = EPRI.ECurrentPerk;
|
ExtMemberSlots[SlotIndex].PerkClass = EPRI.ECurrentPerk;
|
||||||
PlayerInfoObject.SetBool("myPlayer", bIsMyPlayer);
|
PlayerInfoObject.SetBool("myPlayer", bIsMyPlayer);
|
||||||
if( ExtMemberSlots[SlotIndex].PerkClass != none )
|
if(ExtMemberSlots[SlotIndex].PerkClass != none)
|
||||||
{
|
{
|
||||||
PerkIconObject = CreateObject("Object");
|
PerkIconObject = CreateObject("Object");
|
||||||
PerkIconObject.SetString("perkIcon", ExtMemberSlots[SlotIndex].PerkClass.static.GetPerkIconPath(EPRI.ECurrentPerkLevel));
|
PerkIconObject.SetString("perkIcon", ExtMemberSlots[SlotIndex].PerkClass.static.GetPerkIconPath(EPRI.ECurrentPerkLevel));
|
||||||
@ -48,11 +48,11 @@ function GFxObject RefreshSlot( int SlotIndex, KFPlayerReplicationInfo KFPRI )
|
|||||||
|
|
||||||
PlayerInfoObject.SetString("perkLevel", string(EPRI.ECurrentPerkLevel));
|
PlayerInfoObject.SetString("perkLevel", string(EPRI.ECurrentPerkLevel));
|
||||||
}
|
}
|
||||||
if( !bIsMyPlayer )
|
if(!bIsMyPlayer)
|
||||||
{
|
{
|
||||||
PlayerInfoObject.SetBool("muted", EPC.IsPlayerMuted(EPRI.UniqueId));
|
PlayerInfoObject.SetBool("muted", EPC.IsPlayerMuted(EPRI.UniqueId));
|
||||||
}
|
}
|
||||||
if( class'WorldInfo'.static.IsE3Build() )
|
if(class'WorldInfo'.static.IsE3Build())
|
||||||
{
|
{
|
||||||
PlayerName = EPRI.PlayerName;
|
PlayerName = EPRI.PlayerName;
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ function GFxObject RefreshSlot( int SlotIndex, KFPlayerReplicationInfo KFPRI )
|
|||||||
PlayerName = EPRI.PlayerName;
|
PlayerName = EPRI.PlayerName;
|
||||||
}
|
}
|
||||||
PlayerInfoObject.SetString("playerName", PlayerName);
|
PlayerInfoObject.SetString("playerName", PlayerName);
|
||||||
if( class'WorldInfo'.static.IsConsoleBuild(CONSOLE_Orbis) )
|
if(class'WorldInfo'.static.IsConsoleBuild(CONSOLE_Orbis))
|
||||||
{
|
{
|
||||||
PlayerInfoObject.SetString("profileImageSource", "img://"$KFPC.GetPS4Avatar(PlayerName));
|
PlayerInfoObject.SetString("profileImageSource", "img://"$KFPC.GetPS4Avatar(PlayerName));
|
||||||
}
|
}
|
||||||
@ -69,7 +69,7 @@ function GFxObject RefreshSlot( int SlotIndex, KFPlayerReplicationInfo KFPRI )
|
|||||||
{
|
{
|
||||||
PlayerInfoObject.SetString("profileImageSource", "img://"$KFPC.GetSteamAvatar(EPRI.UniqueId));
|
PlayerInfoObject.SetString("profileImageSource", "img://"$KFPC.GetSteamAvatar(EPRI.UniqueId));
|
||||||
}
|
}
|
||||||
if( KFGRI != none )
|
if(KFGRI != none)
|
||||||
{
|
{
|
||||||
PlayerInfoObject.SetBool("ready", EPRI.bReadyToPlay && !KFGRI.bMatchHasBegun);
|
PlayerInfoObject.SetBool("ready", EPRI.bReadyToPlay && !KFGRI.bMatchHasBegun);
|
||||||
}
|
}
|
||||||
|
@ -9,22 +9,22 @@ final function vector PickPointNearOwner()
|
|||||||
local vector V,HL,HN,Start;
|
local vector V,HL,HN,Start;
|
||||||
|
|
||||||
Start = OwnerPawn.Location;
|
Start = OwnerPawn.Location;
|
||||||
if( OwnerPawn.Physics==PHYS_Falling )
|
if(OwnerPawn.Physics==PHYS_Falling)
|
||||||
{
|
{
|
||||||
if( Pawn.Trace(HL,HN,OwnerPawn.Location-vect(0,0,5000),OwnerPawn.Location,false,vect(20,20,60))!=None )
|
if(Pawn.Trace(HL,HN,OwnerPawn.Location-vect(0,0,5000),OwnerPawn.Location,false,vect(20,20,60))!=None)
|
||||||
Start = HL;
|
Start = HL;
|
||||||
}
|
}
|
||||||
while( true )
|
while(true)
|
||||||
{
|
{
|
||||||
++i;
|
++i;
|
||||||
V.X = FRand()-0.5;
|
V.X = FRand()-0.5;
|
||||||
V.Y = FRand()-0.5;
|
V.Y = FRand()-0.5;
|
||||||
V = Start + Normal2D(V) * (100.f+FRand()*500.f);
|
V = Start + Normal2D(V) * (100.f+FRand()*500.f);
|
||||||
|
|
||||||
if( i<20 && !FastTrace(V,Start) ) // Destination is inside a wall.
|
if(i<20 && !FastTrace(V,Start)) // Destination is inside a wall.
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( i<20 && FastTrace(V-vect(0,0,100),V) ) // Destination is above a pit.
|
if(i<20 && FastTrace(V-vect(0,0,100),V)) // Destination is above a pit.
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ final function bool CanSeeOwner()
|
|||||||
|
|
||||||
NextSightCheckTime = WorldInfo.TimeSeconds+1.f + FRand();
|
NextSightCheckTime = WorldInfo.TimeSeconds+1.f + FRand();
|
||||||
P = Ext_T_MonsterPRI(PlayerReplicationInfo)!=None ? Ext_T_MonsterPRI(PlayerReplicationInfo).OwnerController.Pawn : None;
|
P = Ext_T_MonsterPRI(PlayerReplicationInfo)!=None ? Ext_T_MonsterPRI(PlayerReplicationInfo).OwnerController.Pawn : None;
|
||||||
if( P!=None && !LineOfSightTo(P) )
|
if(P!=None && !LineOfSightTo(P))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ final function bool CanSeeOwner()
|
|||||||
state ZedBaseCommand
|
state ZedBaseCommand
|
||||||
{
|
{
|
||||||
Begin:
|
Begin:
|
||||||
if( Pawn.Physics == PHYS_Falling )
|
if(Pawn.Physics == PHYS_Falling)
|
||||||
{
|
{
|
||||||
DisableMeleeRangeEventProbing();
|
DisableMeleeRangeEventProbing();
|
||||||
WaitForLanding();
|
WaitForLanding();
|
||||||
@ -55,32 +55,32 @@ Begin:
|
|||||||
CheckInterruptCombatTransitions();
|
CheckInterruptCombatTransitions();
|
||||||
|
|
||||||
// Select nearest enemy if current enemy is invalid
|
// Select nearest enemy if current enemy is invalid
|
||||||
if( Enemy == none || Enemy.Health <= 0 || !IsValidAttackTarget(KFPawn(Enemy)) )
|
if(Enemy == none || Enemy.Health <= 0 || !IsValidAttackTarget(KFPawn(Enemy)))
|
||||||
SelectEnemy();
|
SelectEnemy();
|
||||||
|
|
||||||
// Handle special case if I'm supposed to be attacking a door
|
// Handle special case if I'm supposed to be attacking a door
|
||||||
if( DoorEnemy != none && DoorEnemy.Health > 0 && VSizeSq( DoorEnemy.Location - Pawn.Location ) < (DoorMeleeDistance * DoorMeleeDistance) ) //200UU
|
if(DoorEnemy != none && DoorEnemy.Health > 0 && VSizeSq(DoorEnemy.Location - Pawn.Location) < (DoorMeleeDistance * DoorMeleeDistance)) //200UU
|
||||||
{
|
{
|
||||||
`AILog( self$" DoorEnemy: "$DoorEnemy$" starting melee attack", 'Command_Base' );
|
`AILog(self$" DoorEnemy: "$DoorEnemy$" starting melee attack", 'Command_Base');
|
||||||
UpdateHistoryString( "[Attacking : "$DoorEnemy$" at "$WorldInfo.TimeSeconds$"]" );
|
UpdateHistoryString("[Attacking : "$DoorEnemy$" at "$WorldInfo.TimeSeconds$"]");
|
||||||
class'AICommand_Attack_Melee'.static.Melee( Outer, DoorEnemy );
|
class'AICommand_Attack_Melee'.static.Melee(Outer, DoorEnemy);
|
||||||
}
|
}
|
||||||
|
|
||||||
// See if we are close to our owner
|
// See if we are close to our owner
|
||||||
RecheckOwner:
|
RecheckOwner:
|
||||||
OwnerPawn = Ext_T_MonsterPRI(PlayerReplicationInfo)!=None ? Ext_T_MonsterPRI(PlayerReplicationInfo).OwnerController.Pawn : None;
|
OwnerPawn = Ext_T_MonsterPRI(PlayerReplicationInfo)!=None ? Ext_T_MonsterPRI(PlayerReplicationInfo).OwnerController.Pawn : None;
|
||||||
if( OwnerPawn!=None )
|
if(OwnerPawn!=None)
|
||||||
{
|
{
|
||||||
if( Enemy!=None && LineOfSightTo(OwnerPawn) && LineOfSightTo(Enemy) ) // We have sight to our owner and can see enemy, go for it!
|
if(Enemy!=None && LineOfSightTo(OwnerPawn) && LineOfSightTo(Enemy)) // We have sight to our owner and can see enemy, go for it!
|
||||||
{
|
{
|
||||||
OwnerPawn = None;
|
OwnerPawn = None;
|
||||||
|
|
||||||
bWaitingOnMovementPlugIn = true;
|
bWaitingOnMovementPlugIn = true;
|
||||||
SetEnemyMoveGoal(self, true,,, ShouldAttackWhileMoving() );
|
SetEnemyMoveGoal(self, true,,, ShouldAttackWhileMoving());
|
||||||
NextSightCheckTime = WorldInfo.TimeSeconds+2.f;
|
NextSightCheckTime = WorldInfo.TimeSeconds+2.f;
|
||||||
while( bWaitingOnMovementPlugIn && bUsePluginsForMovement )
|
while(bWaitingOnMovementPlugIn && bUsePluginsForMovement)
|
||||||
{
|
{
|
||||||
if( NextSightCheckTime<WorldInfo.TimeSeconds && !CanSeeOwner() )
|
if(NextSightCheckTime<WorldInfo.TimeSeconds && !CanSeeOwner())
|
||||||
{
|
{
|
||||||
ClearMovementInfo();
|
ClearMovementInfo();
|
||||||
GoTo'RecheckOwner';
|
GoTo'RecheckOwner';
|
||||||
@ -88,12 +88,12 @@ RecheckOwner:
|
|||||||
Sleep(0.03);
|
Sleep(0.03);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( VSizeSq(OwnerPawn.Location-Pawn.Location)>640000.f || !LineOfSightTo(OwnerPawn) ) // 800.f - Need to move closer to our owner.
|
else if(VSizeSq(OwnerPawn.Location-Pawn.Location)>640000.f || !LineOfSightTo(OwnerPawn)) // 800.f - Need to move closer to our owner.
|
||||||
{
|
{
|
||||||
bWaitingOnMovementPlugIn = true;
|
bWaitingOnMovementPlugIn = true;
|
||||||
SetMovePoint(PickPointNearOwner(),OwnerPawn,,300.f);
|
SetMovePoint(PickPointNearOwner(),OwnerPawn,,300.f);
|
||||||
|
|
||||||
while( bWaitingOnMovementPlugIn && bUsePluginsForMovement )
|
while(bWaitingOnMovementPlugIn && bUsePluginsForMovement)
|
||||||
{
|
{
|
||||||
Sleep(0.03);
|
Sleep(0.03);
|
||||||
}
|
}
|
||||||
@ -104,22 +104,22 @@ RecheckOwner:
|
|||||||
Sleep(0.2+FRand()*0.5);
|
Sleep(0.2+FRand()*0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( IsValidAttackTarget(KFPawn(Enemy)) )
|
else if(IsValidAttackTarget(KFPawn(Enemy)))
|
||||||
{
|
{
|
||||||
`AILog( "Calling SetEnemyMoveGoal [Dist:"$VSize(Enemy.Location - Pawn.Location)$"] using offset of "$AttackRange$", because IsWithinBasicMeleeRange() returned false ", 'Command_Base' );
|
`AILog("Calling SetEnemyMoveGoal [Dist:"$VSize(Enemy.Location - Pawn.Location)$"] using offset of "$AttackRange$", because IsWithinBasicMeleeRange() returned false ", 'Command_Base');
|
||||||
bWaitingOnMovementPlugIn = true;
|
bWaitingOnMovementPlugIn = true;
|
||||||
SetEnemyMoveGoal(self, true,,, ShouldAttackWhileMoving() );
|
SetEnemyMoveGoal(self, true,,, ShouldAttackWhileMoving());
|
||||||
|
|
||||||
while( bWaitingOnMovementPlugIn && bUsePluginsForMovement )
|
while(bWaitingOnMovementPlugIn && bUsePluginsForMovement)
|
||||||
{
|
{
|
||||||
Sleep(0.03);
|
Sleep(0.03);
|
||||||
}
|
}
|
||||||
`AiLog("Back from waiting for the movement plug in!!!");
|
`AiLog("Back from waiting for the movement plug in!!!");
|
||||||
|
|
||||||
if( Enemy == none )
|
if(Enemy == none)
|
||||||
{
|
{
|
||||||
Sleep( FRand() + 0.1f );
|
Sleep(FRand() + 0.1f);
|
||||||
Goto( 'Begin' );
|
Goto('Begin');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -130,18 +130,18 @@ RecheckOwner:
|
|||||||
|
|
||||||
// Check combat transitions
|
// Check combat transitions
|
||||||
CheckCombatTransition();
|
CheckCombatTransition();
|
||||||
if( bFailedToMoveToEnemy )
|
if(bFailedToMoveToEnemy)
|
||||||
{
|
{
|
||||||
if( bFailedPathfind )
|
if(bFailedPathfind)
|
||||||
{
|
{
|
||||||
bFailedPathfind = false;
|
bFailedPathfind = false;
|
||||||
Sleep( 0.f );
|
Sleep(0.f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Sleep( 0.f );
|
Sleep(0.f);
|
||||||
}
|
}
|
||||||
SetEnemy( GetClosestEnemy( Enemy ) );
|
SetEnemy(GetClosestEnemy(Enemy));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -5,30 +5,30 @@ var float VampRegenRate,ZedTimeMeleeAtkRate;
|
|||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
// Things the server should send to the client.
|
// Things the server should send to the client.
|
||||||
if ( true )
|
if (true)
|
||||||
ZedTimeMeleeAtkRate;
|
ZedTimeMeleeAtkRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ModifyMeleeAttackSpeed( out float InDuration )
|
simulated function ModifyMeleeAttackSpeed(out float InDuration)
|
||||||
{
|
{
|
||||||
InDuration *= Modifiers[4];
|
InDuration *= Modifiers[4];
|
||||||
if( ZedTimeMeleeAtkRate<1.f && WorldInfo.TimeDilation<1.f )
|
if(ZedTimeMeleeAtkRate<1.f && WorldInfo.TimeDilation<1.f)
|
||||||
InDuration *= ZedTimeMeleeAtkRate;
|
InDuration *= ZedTimeMeleeAtkRate;
|
||||||
}
|
}
|
||||||
simulated function ModifyRateOfFire( out float InRate, KFWeapon KFW )
|
simulated function ModifyRateOfFire(out float InRate, KFWeapon KFW)
|
||||||
{
|
{
|
||||||
if( IsWeaponOnPerk(KFW) )
|
if(IsWeaponOnPerk(KFW))
|
||||||
{
|
{
|
||||||
InRate *= Modifiers[4];
|
InRate *= Modifiers[4];
|
||||||
if( ZedTimeMeleeAtkRate<1.f && WorldInfo.TimeDilation<1.f )
|
if(ZedTimeMeleeAtkRate<1.f && WorldInfo.TimeDilation<1.f)
|
||||||
InRate *= ZedTimeMeleeAtkRate;
|
InRate *= ZedTimeMeleeAtkRate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function PlayerKilled( KFPawn_Monster Victim, class<DamageType> DT )
|
function PlayerKilled(KFPawn_Monster Victim, class<DamageType> DT)
|
||||||
{
|
{
|
||||||
if( VampRegenRate>0 && PlayerOwner.Pawn!=None && PlayerOwner.Pawn.Health>0 && class<KFDamageType>(DT)!=None && class<KFDamageType>(DT).Default.ModifierPerkList.Find(BasePerk)>=0 )
|
if(VampRegenRate>0 && PlayerOwner.Pawn!=None && PlayerOwner.Pawn.Health>0 && class<KFDamageType>(DT)!=None && class<KFDamageType>(DT).Default.ModifierPerkList.Find(BasePerk)>=0)
|
||||||
PlayerOwner.Pawn.HealDamage( Max(PlayerOwner.Pawn.HealthMax*VampRegenRate,1), PlayerOwner, class'KFDT_Healing', false, false );
|
PlayerOwner.Pawn.HealDamage(Max(PlayerOwner.Pawn.HealthMax*VampRegenRate,1), PlayerOwner, class'KFDT_Healing', false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
|
@ -6,46 +6,46 @@ var float ZTExtCount;
|
|||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
// Things the server should send to the client.
|
// Things the server should send to the client.
|
||||||
if ( true )
|
if (true)
|
||||||
bUseProfessional,bUseMachineGunner;
|
bUseProfessional,bUseMachineGunner;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function bool GetUsingTactialReload( KFWeapon KFW )
|
simulated function bool GetUsingTactialReload(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
return (IsWeaponOnPerk(KFW) ? Modifiers[5]<0.65 : false);
|
return (IsWeaponOnPerk(KFW) ? Modifiers[5]<0.65 : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx )
|
simulated function ModifyDamageGiven(out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx)
|
||||||
{
|
{
|
||||||
if( (DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk)>=0) || (KFWeapon(DamageCauser)!=None && IsWeaponOnPerk(KFWeapon(DamageCauser))) )
|
if((DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk)>=0) || (KFWeapon(DamageCauser)!=None && IsWeaponOnPerk(KFWeapon(DamageCauser))))
|
||||||
{
|
{
|
||||||
if( bUseMachineGunner && WorldInfo.TimeDilation < 1.f )
|
if(bUseMachineGunner && WorldInfo.TimeDilation < 1.f)
|
||||||
InDamage += InDamage * 0.03;
|
InDamage += InDamage * 0.03;
|
||||||
}
|
}
|
||||||
|
|
||||||
Super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
|
Super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function float GetZedTimeModifier( KFWeapon W )
|
simulated function float GetZedTimeModifier(KFWeapon W)
|
||||||
{
|
{
|
||||||
local name StateName;
|
local name StateName;
|
||||||
StateName = W.GetStateName();
|
StateName = W.GetStateName();
|
||||||
|
|
||||||
if( bUseProfessional && IsWeaponOnPerk( W ) )
|
if(bUseProfessional && IsWeaponOnPerk(W))
|
||||||
{
|
{
|
||||||
if( StateName == 'Reloading' || StateName == 'AltReloading' )
|
if(StateName == 'Reloading' || StateName == 'AltReloading')
|
||||||
return 1.f;
|
return 1.f;
|
||||||
else if( StateName == 'WeaponPuttingDown' || StateName == 'WeaponEquipping' )
|
else if(StateName == 'WeaponPuttingDown' || StateName == 'WeaponEquipping')
|
||||||
return 0.3f;
|
return 0.3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bUseMachineGunner && IsWeaponOnPerk( W ) && BasePerk.Default.ZedTimeModifyingStates.Find( StateName ) != INDEX_NONE )
|
if(bUseMachineGunner && IsWeaponOnPerk(W) && BasePerk.Default.ZedTimeModifyingStates.Find(StateName) != INDEX_NONE)
|
||||||
return 0.5f;
|
return 0.5f;
|
||||||
|
|
||||||
return 0.f;
|
return 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function float GetZedTimeExtensions( byte Level )
|
simulated function float GetZedTimeExtensions(byte Level)
|
||||||
{
|
{
|
||||||
return ZTExtCount;
|
return ZTExtCount;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ var float AOEMult, NukeDamageMult;
|
|||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
// Things the server should send to the client.
|
// Things the server should send to the client.
|
||||||
if ( true )
|
if (true)
|
||||||
NukeDamageMult,bDirectHit,bCriticalHit,bProfessionalActive,AOEMult;
|
NukeDamageMult,bDirectHit,bCriticalHit,bProfessionalActive,AOEMult;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,12 +16,12 @@ simulated function float GetAoERadiusModifier()
|
|||||||
return AOEMult;
|
return AOEMult;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function bool GetUsingTactialReload( KFWeapon KFW )
|
simulated function bool GetUsingTactialReload(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
return (IsWeaponOnPerk(KFW) ? Modifiers[5]<0.85 : false);
|
return (IsWeaponOnPerk(KFW) ? Modifiers[5]<0.85 : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function float ApplyEffect( name Type, float Value, float Progress )
|
simulated function float ApplyEffect(name Type, float Value, float Progress)
|
||||||
{
|
{
|
||||||
local KFPlayerReplicationInfo MyPRI;
|
local KFPlayerReplicationInfo MyPRI;
|
||||||
local float DefValue;
|
local float DefValue;
|
||||||
@ -29,7 +29,7 @@ simulated function float ApplyEffect( name Type, float Value, float Progress )
|
|||||||
DefValue = Super.ApplyEffect(Type, Value, Progress);
|
DefValue = Super.ApplyEffect(Type, Value, Progress);
|
||||||
MyPRI = KFPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo);
|
MyPRI = KFPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo);
|
||||||
|
|
||||||
if( MyPRI != None && Type == 'KnockDown' )
|
if(MyPRI != None && Type == 'KnockDown')
|
||||||
MyPRI.bConcussiveActive = Modifiers[7] > 1.5;
|
MyPRI.bConcussiveActive = Modifiers[7] > 1.5;
|
||||||
|
|
||||||
return DefValue;
|
return DefValue;
|
||||||
@ -40,37 +40,37 @@ function OnWaveEnded()
|
|||||||
bUsedSacrifice = false;
|
bUsedSacrifice = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx )
|
simulated function ModifyDamageGiven(out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx)
|
||||||
{
|
{
|
||||||
if( BasePerk==None || (DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk)>=0) || (KFWeapon(DamageCauser)!=None && IsWeaponOnPerk(KFWeapon(DamageCauser))) )
|
if(BasePerk==None || (DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk)>=0) || (KFWeapon(DamageCauser)!=None && IsWeaponOnPerk(KFWeapon(DamageCauser))))
|
||||||
{
|
{
|
||||||
if( bDirectHit && class<KFDT_Ballistic_Shell>(DamageType) != none )
|
if(bDirectHit && class<KFDT_Ballistic_Shell>(DamageType) != none)
|
||||||
InDamage *= 1.25;
|
InDamage *= 1.25;
|
||||||
|
|
||||||
if( bCriticalHit && MyKFPM != none && IsCriticalHitZone( MyKFPM, HitZoneIdx ) )
|
if(bCriticalHit && MyKFPM != none && IsCriticalHitZone(MyKFPM, HitZoneIdx))
|
||||||
InDamage *= 1.5f;
|
InDamage *= 1.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( class<KFDT_DemoNuke_Toxic_Lingering>(DamageType) != None )
|
if(class<KFDT_DemoNuke_Toxic_Lingering>(DamageType) != None)
|
||||||
InDamage *= NukeDamageMult;
|
InDamage *= NukeDamageMult;
|
||||||
|
|
||||||
Super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
|
Super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
function bool IsCriticalHitZone( KFPawn TestPawn, int HitZoneIndex )
|
function bool IsCriticalHitZone(KFPawn TestPawn, int HitZoneIndex)
|
||||||
{
|
{
|
||||||
if( TestPawn != none && HitzoneIndex >= 0 && HitzoneIndex < TestPawn.HitZones.length )
|
if(TestPawn != none && HitzoneIndex >= 0 && HitzoneIndex < TestPawn.HitZones.length)
|
||||||
return TestPawn.HitZones[HitZoneIndex].DmgScale > 1.f;
|
return TestPawn.HitZones[HitZoneIndex].DmgScale > 1.f;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ModifySpareAmmoAmount( KFWeapon KFW, out int PrimarySpareAmmo, optional const out STraderItem TraderItem, optional bool bSecondary )
|
simulated function ModifySpareAmmoAmount(KFWeapon KFW, out int PrimarySpareAmmo, optional const out STraderItem TraderItem, optional bool bSecondary)
|
||||||
{
|
{
|
||||||
if( KFW != None && KFWeap_Thrown_C4(KFW) != None )
|
if(KFW != None && KFWeap_Thrown_C4(KFW) != None)
|
||||||
PrimarySpareAmmo += (1 + Modifiers[11]);
|
PrimarySpareAmmo += (1 + Modifiers[11]);
|
||||||
|
|
||||||
Super.ModifySpareAmmoAmount( KFW, PrimarySpareAmmo, TraderItem, bSecondary );
|
Super.ModifySpareAmmoAmount(KFW, PrimarySpareAmmo, TraderItem, bSecondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
|
@ -12,13 +12,13 @@ var bool bUseToxicDamage,bUseSlug,bUseAirborneAgent;
|
|||||||
|
|
||||||
var const class<KFDamageType> ToxicDmgTypeClass;
|
var const class<KFDamageType> ToxicDmgTypeClass;
|
||||||
|
|
||||||
simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx )
|
simulated function ModifyDamageGiven(out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx)
|
||||||
{
|
{
|
||||||
local float TempDamage;
|
local float TempDamage;
|
||||||
|
|
||||||
TempDamage = InDamage;
|
TempDamage = InDamage;
|
||||||
|
|
||||||
if( bUseSlug && WorldInfo.TimeDilation < 1.f && DamageType != none && ClassIsChildOf( DamageType, class'KFDT_Toxic' ) )
|
if(bUseSlug && WorldInfo.TimeDilation < 1.f && DamageType != none && ClassIsChildOf(DamageType, class'KFDT_Toxic'))
|
||||||
TempDamage += InDamage * 100;
|
TempDamage += InDamage * 100;
|
||||||
|
|
||||||
InDamage = Round(TempDamage);
|
InDamage = Round(TempDamage);
|
||||||
@ -26,60 +26,60 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
|
|||||||
Super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
|
Super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ModifyMagSizeAndNumber( KFWeapon KFW, out int MagazineCapacity, optional array< Class<KFPerk> > WeaponPerkClass, optional bool bSecondary=false, optional name WeaponClassname )
|
simulated function ModifyMagSizeAndNumber(KFWeapon KFW, out int MagazineCapacity, optional array< Class<KFPerk> > WeaponPerkClass, optional bool bSecondary=false, optional name WeaponClassname)
|
||||||
{
|
{
|
||||||
if( MagazineCapacity>2 && (KFW==None ? WeaponPerkClass.Find(BasePerk)>=0 : IsWeaponOnPerk(KFW)) ) // Skip boomstick for this.
|
if(MagazineCapacity>2 && (KFW==None ? WeaponPerkClass.Find(BasePerk)>=0 : IsWeaponOnPerk(KFW))) // Skip boomstick for this.
|
||||||
MagazineCapacity = Min(MagazineCapacity*Modifiers[10], bSecondary ? 150 : 255);
|
MagazineCapacity = Min(MagazineCapacity*Modifiers[10], bSecondary ? 150 : 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
function bool RepairArmor( Pawn HealTarget )
|
function bool RepairArmor(Pawn HealTarget)
|
||||||
{
|
{
|
||||||
local KFPawn_Human KFPH;
|
local KFPawn_Human KFPH;
|
||||||
|
|
||||||
if( RepairArmorRate>0 )
|
if(RepairArmorRate>0)
|
||||||
{
|
{
|
||||||
KFPH = KFPawn_Human(Healtarget);
|
KFPH = KFPawn_Human(Healtarget);
|
||||||
if( KFPH != none && KFPH.Armor < KFPH.MaxArmor )
|
if(KFPH != none && KFPH.Armor < KFPH.MaxArmor)
|
||||||
{
|
{
|
||||||
KFPH.AddArmor( Round( float(KFPH.MaxArmor) * RepairArmorRate ) );
|
KFPH.AddArmor(Round(float(KFPH.MaxArmor) * RepairArmorRate));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function bool ModifyHealAmount( out float HealAmount )
|
function bool ModifyHealAmount(out float HealAmount)
|
||||||
{
|
{
|
||||||
HealAmount*=Modifiers[9];
|
HealAmount*=Modifiers[9];
|
||||||
return (RepairArmorRate>0);
|
return (RepairArmorRate>0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Di
|
// Di
|
||||||
// simulated function ModifyHealerRechargeTime( out float RechargeRate )
|
// simulated function ModifyHealerRechargeTime(out float RechargeRate)
|
||||||
// {
|
// {
|
||||||
// super.ModifyHealerRechargeTime(RechargeRate)
|
// super.ModifyHealerRechargeTime(RechargeRate)
|
||||||
// RechargeRate /= Clamp(Modifiers[9] * 2, 1.f, 3.f);
|
// RechargeRate /= Clamp(Modifiers[9] * 2, 1.f, 3.f);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
function CheckForAirborneAgent( KFPawn HealTarget, class<DamageType> DamType, int HealAmount )
|
function CheckForAirborneAgent(KFPawn HealTarget, class<DamageType> DamType, int HealAmount)
|
||||||
{
|
{
|
||||||
if( (AirborneAgentLevel==1 && WorldInfo.TimeDilation<1.f) || AirborneAgentLevel>1 )
|
if((AirborneAgentLevel==1 && WorldInfo.TimeDilation<1.f) || AirborneAgentLevel>1)
|
||||||
GiveMedicAirborneAgentHealth( HealTarget, DamType, HealAmount );
|
GiveMedicAirborneAgentHealth(HealTarget, DamType, HealAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
function GiveMedicAirborneAgentHealth( KFPawn HealTarget, class<DamageType> DamType, int HealAmount )
|
function GiveMedicAirborneAgentHealth(KFPawn HealTarget, class<DamageType> DamType, int HealAmount)
|
||||||
{
|
{
|
||||||
local KFPawn KFP;
|
local KFPawn KFP;
|
||||||
local int RoundedExtraHealAmount;
|
local int RoundedExtraHealAmount;
|
||||||
|
|
||||||
RoundedExtraHealAmount = FCeil( float(HealAmount) * AirborneAgentHealRate );
|
RoundedExtraHealAmount = FCeil(float(HealAmount) * AirborneAgentHealRate);
|
||||||
|
|
||||||
foreach WorldInfo.Allpawns(class'KFPawn', KFP, HealTarget.Location, 500.f)
|
foreach WorldInfo.Allpawns(class'KFPawn', KFP, HealTarget.Location, 500.f)
|
||||||
{
|
{
|
||||||
if( KFP.IsAliveAndWell() && WorldInfo.GRI.OnSameTeam( HealTarget, KFP ) )
|
if(KFP.IsAliveAndWell() && WorldInfo.GRI.OnSameTeam(HealTarget, KFP))
|
||||||
{
|
{
|
||||||
if ( HealTarget == KFP )
|
if (HealTarget == KFP)
|
||||||
KFP.HealDamage( RoundedExtraHealAmount, PlayerOwner, DamType );
|
KFP.HealDamage(RoundedExtraHealAmount, PlayerOwner, DamType);
|
||||||
else KFP.HealDamage( RoundedExtraHealAmount + HealAmount, PlayerOwner, DamType );
|
else KFP.HealDamage(RoundedExtraHealAmount + HealAmount, PlayerOwner, DamType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ static function int ModifyToxicDmg(int ToxicDamage)
|
|||||||
local float TempDamage;
|
local float TempDamage;
|
||||||
|
|
||||||
TempDamage = float(ToxicDamage) * 1.2;
|
TempDamage = float(ToxicDamage) * 1.2;
|
||||||
return FCeil( TempDamage );
|
return FCeil(TempDamage);
|
||||||
}
|
}
|
||||||
|
|
||||||
function NotifyZedTimeStarted()
|
function NotifyZedTimeStarted()
|
||||||
@ -103,19 +103,19 @@ function NotifyZedTimeStarted()
|
|||||||
|
|
||||||
HPawn = KFPawn_Human(PlayerOwner.Pawn);
|
HPawn = KFPawn_Human(PlayerOwner.Pawn);
|
||||||
|
|
||||||
if( bUseAirborneAgent && HPawn != none && HPawn.IsAliveAndWell() )
|
if(bUseAirborneAgent && HPawn != none && HPawn.IsAliveAndWell())
|
||||||
HPawn.StartAirBorneAgentEvent();
|
HPawn.StartAirBorneAgentEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function float GetSnarePower( optional class<DamageType> DamageType, optional byte HitZoneIdx )
|
simulated function float GetSnarePower(optional class<DamageType> DamageType, optional byte HitZoneIdx)
|
||||||
{
|
{
|
||||||
if( bUseSlug && WorldInfo.TimeDilation < 1.f && class<KFDamageType>(DamageType)!=None && class<KFDamageType>(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0 )
|
if(bUseSlug && WorldInfo.TimeDilation < 1.f && class<KFDamageType>(DamageType)!=None && class<KFDamageType>(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0)
|
||||||
return 100;
|
return 100;
|
||||||
|
|
||||||
return 0.f;
|
return 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
function AddDefaultInventory( KFPawn P )
|
function AddDefaultInventory(KFPawn P)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
i = P.DefaultInventory.Find(class'ExtWeap_Pistol_9mm');
|
i = P.DefaultInventory.Find(class'ExtWeap_Pistol_9mm');
|
||||||
|
@ -5,28 +5,28 @@ var bool bHasUberAmmo,bHasFanfire;
|
|||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
// Things the server should send to the client.
|
// Things the server should send to the client.
|
||||||
if ( true )
|
if (true)
|
||||||
bHasUberAmmo,bHasFanfire;
|
bHasUberAmmo,bHasFanfire;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function bool GetUsingTactialReload( KFWeapon KFW )
|
simulated function bool GetUsingTactialReload(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
return (IsWeaponOnPerk(KFW) ? Modifiers[5]<0.8 : false);
|
return (IsWeaponOnPerk(KFW) ? Modifiers[5]<0.8 : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function bool GetIsUberAmmoActive( KFWeapon KFW )
|
simulated function bool GetIsUberAmmoActive(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
return bHasUberAmmo && IsWeaponOnPerk(KFW) && WorldInfo.TimeDilation < 1.f;
|
return bHasUberAmmo && IsWeaponOnPerk(KFW) && WorldInfo.TimeDilation < 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function float GetZedTimeModifier( KFWeapon W )
|
simulated function float GetZedTimeModifier(KFWeapon W)
|
||||||
{
|
{
|
||||||
local name StateName;
|
local name StateName;
|
||||||
|
|
||||||
if( bHasFanfire && IsWeaponOnPerk( W ) )
|
if(bHasFanfire && IsWeaponOnPerk(W))
|
||||||
{
|
{
|
||||||
StateName = W.GetStateName();
|
StateName = W.GetStateName();
|
||||||
if( BasePerk.Default.ZedTimeModifyingStates.Find( StateName ) != INDEX_NONE || StateName == 'Reloading' )
|
if(BasePerk.Default.ZedTimeModifyingStates.Find(StateName) != INDEX_NONE || StateName == 'Reloading')
|
||||||
return 1.f;
|
return 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,14 +4,14 @@ var byte HeadShotComboCount,MaxRhythmCombo;
|
|||||||
var float RhythmComboDmg;
|
var float RhythmComboDmg;
|
||||||
var private const float HeadShotCountdownIntervall;
|
var private const float HeadShotCountdownIntervall;
|
||||||
|
|
||||||
simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx )
|
simulated function ModifyDamageGiven(out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx)
|
||||||
{
|
{
|
||||||
Super.ModifyDamageGiven(InDamage,DamageCauser,MyKFPM,DamageInstigator,DamageType,HitZoneIdx);
|
Super.ModifyDamageGiven(InDamage,DamageCauser,MyKFPM,DamageInstigator,DamageType,HitZoneIdx);
|
||||||
if( RhythmComboDmg>0 && BasePerk==None || (DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk)>=0) || IsWeaponOnPerk(KFWeapon(DamageCauser)) )
|
if(RhythmComboDmg>0 && BasePerk==None || (DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk)>=0) || IsWeaponOnPerk(KFWeapon(DamageCauser)))
|
||||||
InDamage *= (1.f+RhythmComboDmg);
|
InDamage *= (1.f+RhythmComboDmg);
|
||||||
}
|
}
|
||||||
|
|
||||||
final function SetMaxRhythm( byte MaxCombo )
|
final function SetMaxRhythm(byte MaxCombo)
|
||||||
{
|
{
|
||||||
MaxRhythmCombo = MaxCombo;
|
MaxRhythmCombo = MaxCombo;
|
||||||
}
|
}
|
||||||
@ -25,21 +25,21 @@ final function ResetRhythm()
|
|||||||
|
|
||||||
function SubstractHeadShotCombo()
|
function SubstractHeadShotCombo()
|
||||||
{
|
{
|
||||||
if( HeadShotComboCount > 0 )
|
if(HeadShotComboCount > 0)
|
||||||
UpdateDmgScale(false);
|
UpdateDmgScale(false);
|
||||||
else
|
else
|
||||||
ClearTimer( nameOf( SubstractHeadShotCombo ) );
|
ClearTimer(nameOf(SubstractHeadShotCombo));
|
||||||
}
|
}
|
||||||
|
|
||||||
final function UpdateDmgScale( bool bUp )
|
final function UpdateDmgScale(bool bUp)
|
||||||
{
|
{
|
||||||
if( bUp )
|
if(bUp)
|
||||||
{
|
{
|
||||||
HeadShotComboCount = Min(HeadShotComboCount+1,MaxRhythmCombo);
|
HeadShotComboCount = Min(HeadShotComboCount+1,MaxRhythmCombo);
|
||||||
HeadShotMessage(HeadShotComboCount,false,MaxRhythmCombo);
|
HeadShotMessage(HeadShotComboCount,false,MaxRhythmCombo);
|
||||||
SetTimer( HeadShotCountdownIntervall, true, nameOf( SubstractHeadShotCombo ) );
|
SetTimer(HeadShotCountdownIntervall, true, nameOf(SubstractHeadShotCombo));
|
||||||
}
|
}
|
||||||
else if( HeadShotComboCount>0)
|
else if(HeadShotComboCount>0)
|
||||||
{
|
{
|
||||||
--HeadShotComboCount;
|
--HeadShotComboCount;
|
||||||
HeadShotMessage(HeadShotComboCount,true,MaxRhythmCombo);
|
HeadShotMessage(HeadShotComboCount,true,MaxRhythmCombo);
|
||||||
@ -48,31 +48,31 @@ final function UpdateDmgScale( bool bUp )
|
|||||||
RhythmComboDmg = HeadShotComboCount*0.075;
|
RhythmComboDmg = HeadShotComboCount*0.075;
|
||||||
}
|
}
|
||||||
|
|
||||||
function UpdatePerkHeadShots( ImpactInfo Impact, class<DamageType> DamageType, int NumHit )
|
function UpdatePerkHeadShots(ImpactInfo Impact, class<DamageType> DamageType, int NumHit)
|
||||||
{
|
{
|
||||||
local int HitZoneIdx;
|
local int HitZoneIdx;
|
||||||
local KFPawn_Monster KFPM;
|
local KFPawn_Monster KFPM;
|
||||||
|
|
||||||
if( MaxRhythmCombo<=0 )
|
if(MaxRhythmCombo<=0)
|
||||||
return;
|
return;
|
||||||
KFPM = KFPawn_Monster(Impact.HitActor);
|
KFPM = KFPawn_Monster(Impact.HitActor);
|
||||||
if( KFPM==none || KFPM.GetTeamNum()==0 )
|
if(KFPM==none || KFPM.GetTeamNum()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
HitZoneIdx = KFPM.HitZones.Find('ZoneName', Impact.HitInfo.BoneName);
|
HitZoneIdx = KFPM.HitZones.Find('ZoneName', Impact.HitInfo.BoneName);
|
||||||
if( HitZoneIdx == HZI_Head && KFPM.IsAliveAndWell() )
|
if(HitZoneIdx == HZI_Head && KFPM.IsAliveAndWell())
|
||||||
{
|
{
|
||||||
if( class<KFDamageType>(DamageType)!=None && (class<KFDamageType>(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0))
|
if(class<KFDamageType>(DamageType)!=None && (class<KFDamageType>(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0))
|
||||||
UpdateDmgScale(true);
|
UpdateDmgScale(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reliable client function HeadShotMessage( byte HeadShotNum, bool bMissed, byte MaxHits )
|
reliable client function HeadShotMessage(byte HeadShotNum, bool bMissed, byte MaxHits)
|
||||||
{
|
{
|
||||||
local AkEvent TempAkEvent;
|
local AkEvent TempAkEvent;
|
||||||
local KFPlayerController PC;
|
local KFPlayerController PC;
|
||||||
|
|
||||||
PC = KFPlayerController(PlayerOwner);
|
PC = KFPlayerController(PlayerOwner);
|
||||||
if( PC==none || PC.MyGFxHUD==none )
|
if(PC==none || PC.MyGFxHUD==none)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -80,25 +80,25 @@ reliable client function HeadShotMessage( byte HeadShotNum, bool bMissed, byte M
|
|||||||
PC.MyGFxHUD.RhythmCounterWidget.SetInt("count", HeadShotNum);
|
PC.MyGFxHUD.RhythmCounterWidget.SetInt("count", HeadShotNum);
|
||||||
PC.MyGFxHUD.RhythmCounterWidget.SetBonusPercentage(float(HeadShotNum) / float(MaxHits));
|
PC.MyGFxHUD.RhythmCounterWidget.SetBonusPercentage(float(HeadShotNum) / float(MaxHits));
|
||||||
|
|
||||||
if( HeadshotNum==0 )
|
if(HeadshotNum==0)
|
||||||
TempAkEvent = AkEvent'WW_UI_PlayerCharacter.Play_R_Method_Reset';
|
TempAkEvent = AkEvent'WW_UI_PlayerCharacter.Play_R_Method_Reset';
|
||||||
else if( HeadShotNum<MaxHits )
|
else if(HeadShotNum<MaxHits)
|
||||||
{
|
{
|
||||||
if( !bMissed )
|
if(!bMissed)
|
||||||
{
|
{
|
||||||
//PC.ClientSpawnCameraLensEffect(class'KFCameraLensEmit_RackemHeadShot');
|
//PC.ClientSpawnCameraLensEffect(class'KFCameraLensEmit_RackemHeadShot');
|
||||||
TempAkEvent = AkEvent'WW_UI_PlayerCharacter.Play_R_Method_Hit';
|
TempAkEvent = AkEvent'WW_UI_PlayerCharacter.Play_R_Method_Hit';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( !bMissed )
|
else if(!bMissed)
|
||||||
{
|
{
|
||||||
//PC.ClientSpawnCameraLensEffect(class'KFCameraLensEmit_RackemHeadShotPing');
|
//PC.ClientSpawnCameraLensEffect(class'KFCameraLensEmit_RackemHeadShotPing');
|
||||||
TempAkEvent = AkEvent'WW_UI_PlayerCharacter.Play_R_Method_Top';
|
TempAkEvent = AkEvent'WW_UI_PlayerCharacter.Play_R_Method_Top';
|
||||||
HeadshotNum = 6;
|
HeadshotNum = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( TempAkEvent != none )
|
if(TempAkEvent != none)
|
||||||
PC.PlayRMEffect( TempAkEvent, 'R_Method', HeadshotNum );
|
PC.PlayRMEffect(TempAkEvent, 'R_Method', HeadshotNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
|
@ -7,23 +7,23 @@ var bool bRapidAssault;
|
|||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
// Things the server should send to the client.
|
// Things the server should send to the client.
|
||||||
if ( true )
|
if (true)
|
||||||
RepTacticalMove, bRapidAssault;
|
RepTacticalMove, bRapidAssault;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function float GetIronSightSpeedModifier( KFWeapon KFW )
|
simulated function float GetIronSightSpeedModifier(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
return ((RepTacticalMove>0 && IsWeaponOnPerk(KFW)) ? MoveSpeedMods[RepTacticalMove-1] : 1.f);
|
return ((RepTacticalMove>0 && IsWeaponOnPerk(KFW)) ? MoveSpeedMods[RepTacticalMove-1] : 1.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function bool GetIsUberAmmoActive( KFWeapon KFW )
|
simulated function bool GetIsUberAmmoActive(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
return bRapidAssault && IsWeaponOnPerk(KFW) && WorldInfo.TimeDilation < 1.f;
|
return bRapidAssault && IsWeaponOnPerk(KFW) && WorldInfo.TimeDilation < 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function float GetZedTimeModifier( KFWeapon W )
|
simulated function float GetZedTimeModifier(KFWeapon W)
|
||||||
{
|
{
|
||||||
if( bRapidAssault && WorldInfo.TimeDilation<1.f && IsWeaponOnPerk(W) && BasePerk.Default.ZedTimeModifyingStates.Find(W.GetStateName()) != INDEX_NONE )
|
if(bRapidAssault && WorldInfo.TimeDilation<1.f && IsWeaponOnPerk(W) && BasePerk.Default.ZedTimeModifyingStates.Find(W.GetStateName()) != INDEX_NONE)
|
||||||
return 0.51f;
|
return 0.51f;
|
||||||
return 0.f;
|
return 0.f;
|
||||||
}
|
}
|
||||||
|
@ -6,19 +6,19 @@ var float ZEDTimeStunPower,DireReloadSpeed;
|
|||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
// Things the server should send to the client.
|
// Things the server should send to the client.
|
||||||
if ( true )
|
if (true)
|
||||||
bHasDireReload;
|
bHasDireReload;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function float GetReloadRateScale(KFWeapon KFW)
|
simulated function float GetReloadRateScale(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
if( bHasDireReload && PlayerOwner.Pawn!=None && PlayerOwner.Pawn.Health<40 )
|
if(bHasDireReload && PlayerOwner.Pawn!=None && PlayerOwner.Pawn.Health<40)
|
||||||
return Super.GetReloadRateScale(KFW)*DireReloadSpeed;
|
return Super.GetReloadRateScale(KFW)*DireReloadSpeed;
|
||||||
return Super.GetReloadRateScale(KFW);
|
return Super.GetReloadRateScale(KFW);
|
||||||
}
|
}
|
||||||
function float GetStunPowerModifier( optional class<DamageType> DamageType, optional byte HitZoneIdx )
|
function float GetStunPowerModifier(optional class<DamageType> DamageType, optional byte HitZoneIdx)
|
||||||
{
|
{
|
||||||
if( ZEDTimeStunPower>0 && HitZoneIdx==HZI_Head && WorldInfo.TimeDilation<1.f && (class<KFDamageType>(DamageType)!=None && class<KFDamageType>(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0) )
|
if(ZEDTimeStunPower>0 && HitZoneIdx==HZI_Head && WorldInfo.TimeDilation<1.f && (class<KFDamageType>(DamageType)!=None && class<KFDamageType>(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0))
|
||||||
return Super.GetStunPowerModifier(DamageType,HitZoneIdx) + ZEDTimeStunPower;
|
return Super.GetStunPowerModifier(DamageType,HitZoneIdx) + ZEDTimeStunPower;
|
||||||
return Super.GetStunPowerModifier(DamageType,HitZoneIdx);
|
return Super.GetStunPowerModifier(DamageType,HitZoneIdx);
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,11 @@ var float APShotMul;
|
|||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
// Things the server should send to the client.
|
// Things the server should send to the client.
|
||||||
if ( true )
|
if (true)
|
||||||
bCanRepairDoors, bUseAPShot, bUsePerforate, APShotMul;
|
bCanRepairDoors, bUseAPShot, bUsePerforate, APShotMul;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function bool GetUsingTactialReload( KFWeapon KFW )
|
simulated function bool GetUsingTactialReload(KFWeapon KFW)
|
||||||
{
|
{
|
||||||
return (IsWeaponOnPerk(KFW) ? Modifiers[5]<0.75 : false);
|
return (IsWeaponOnPerk(KFW) ? Modifiers[5]<0.75 : false);
|
||||||
}
|
}
|
||||||
@ -20,10 +20,10 @@ simulated function bool CanRepairDoors()
|
|||||||
return bCanRepairDoors;
|
return bCanRepairDoors;
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
@ -5,7 +5,7 @@ Class Ext_TGroupBase extends Object
|
|||||||
var() localized string GroupInfo;
|
var() localized string GroupInfo;
|
||||||
var() bool bLimitToOne; // Limit to only one trait for this group.
|
var() bool bLimitToOne; // Limit to only one trait for this group.
|
||||||
|
|
||||||
static function string GetUIInfo( Ext_PerkBase Perk )
|
static function string GetUIInfo(Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
return (Default.bLimitToOne ? Default.GroupInfo$" (MAX 1)" : Default.GroupInfo);
|
return (Default.bLimitToOne ? Default.GroupInfo$" (MAX 1)" : Default.GroupInfo);
|
||||||
}
|
}
|
||||||
@ -15,14 +15,14 @@ static function string GetUIDesc()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// See if group is already using up limitation.
|
// See if group is already using up limitation.
|
||||||
static function bool GroupLimited( Ext_PerkBase Perk, class<Ext_TraitBase> Trait )
|
static function bool GroupLimited(Ext_PerkBase Perk, class<Ext_TraitBase> Trait)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
if( Default.bLimitToOne )
|
if(Default.bLimitToOne)
|
||||||
{
|
{
|
||||||
for( i=0; i<Perk.PerkTraits.Length; ++i )
|
for(i=0; i<Perk.PerkTraits.Length; ++i)
|
||||||
if( Perk.PerkTraits[i].CurrentLevel>0 && Perk.PerkTraits[i].TraitType!=Trait && Perk.PerkTraits[i].TraitType.Default.TraitGroup==Default.Class )
|
if(Perk.PerkTraits[i].CurrentLevel>0 && Perk.PerkTraits[i].TraitType!=Trait && Perk.PerkTraits[i].TraitType.Default.TraitGroup==Default.Class)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
class Ext_TGroupRegen extends Ext_TGroupBase;
|
class Ext_TGroupRegen extends Ext_TGroupBase;
|
||||||
|
|
||||||
static function string GetUIInfo( Ext_PerkBase Perk )
|
static function string GetUIInfo(Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
return Default.GroupInfo$" (MAX "$GetMaxLimit(Perk)$")";
|
return Default.GroupInfo$" (MAX "$GetMaxLimit(Perk)$")";
|
||||||
}
|
}
|
||||||
@ -9,21 +9,21 @@ static function string GetUIDesc()
|
|||||||
return Super.GetUIDesc()$"|To buy additional regen abilities:|-Prestige level 1 + Perk level 100 = MAX 2 traits|-Prestige level 5 + Perk level 150 = MAX 3 traits";
|
return Super.GetUIDesc()$"|To buy additional regen abilities:|-Prestige level 1 + Perk level 100 = MAX 2 traits|-Prestige level 5 + Perk level 150 = MAX 3 traits";
|
||||||
}
|
}
|
||||||
|
|
||||||
static function bool GroupLimited( Ext_PerkBase Perk, class<Ext_TraitBase> Trait )
|
static function bool GroupLimited(Ext_PerkBase Perk, class<Ext_TraitBase> Trait)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
local byte n;
|
local byte n;
|
||||||
|
|
||||||
n = GetMaxLimit(Perk);
|
n = GetMaxLimit(Perk);
|
||||||
for( i=0; i<Perk.PerkTraits.Length; ++i )
|
for(i=0; i<Perk.PerkTraits.Length; ++i)
|
||||||
if( Perk.PerkTraits[i].CurrentLevel>0 && Perk.PerkTraits[i].TraitType!=Trait && Perk.PerkTraits[i].TraitType.Default.TraitGroup==Default.Class && --n==0 )
|
if(Perk.PerkTraits[i].CurrentLevel>0 && Perk.PerkTraits[i].TraitType!=Trait && Perk.PerkTraits[i].TraitType.Default.TraitGroup==Default.Class && --n==0)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static final function byte GetMaxLimit( Ext_PerkBase Perk )
|
static final function byte GetMaxLimit(Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
if( Perk.CurrentPrestige<1 || Perk.CurrentLevel<100 )
|
if(Perk.CurrentPrestige<1 || Perk.CurrentLevel<100)
|
||||||
return 1;
|
return 1;
|
||||||
return ((Perk.CurrentPrestige<5 || Perk.CurrentLevel<150) ? 2 : 3);
|
return ((Perk.CurrentPrestige<5 || Perk.CurrentLevel<150) ? 2 : 3);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ var float RegCount;
|
|||||||
function PostBeginPlay()
|
function PostBeginPlay()
|
||||||
{
|
{
|
||||||
PawnOwner = Pawn(Owner);
|
PawnOwner = Pawn(Owner);
|
||||||
if( PawnOwner==None )
|
if(PawnOwner==None)
|
||||||
Destroy();
|
Destroy();
|
||||||
else SetTimer(29+FRand(),true);
|
else SetTimer(29+FRand(),true);
|
||||||
}
|
}
|
||||||
@ -17,18 +17,18 @@ function Timer()
|
|||||||
local byte i;
|
local byte i;
|
||||||
local int ExtraAmmo;
|
local int ExtraAmmo;
|
||||||
|
|
||||||
if( PawnOwner==None || PawnOwner.Health<=0 || PawnOwner.InvManager==None )
|
if(PawnOwner==None || PawnOwner.Health<=0 || PawnOwner.InvManager==None)
|
||||||
Destroy();
|
Destroy();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach PawnOwner.InvManager.InventoryActors(class'KFWeapon',W)
|
foreach PawnOwner.InvManager.InventoryActors(class'KFWeapon',W)
|
||||||
{
|
{
|
||||||
for( i=0; i<2; ++i )
|
for(i=0; i<2; ++i)
|
||||||
{
|
{
|
||||||
if( W.SpareAmmoCount[i] < W.SpareAmmoCapacity[i] )
|
if(W.SpareAmmoCount[i] < W.SpareAmmoCapacity[i])
|
||||||
{
|
{
|
||||||
ExtraAmmo = FMax(float(W.SpareAmmoCapacity[i] + W.MagazineCapacity[i])*RegCount,1.f);
|
ExtraAmmo = FMax(float(W.SpareAmmoCapacity[i] + W.MagazineCapacity[i])*RegCount,1.f);
|
||||||
if ( i==0 )
|
if (i==0)
|
||||||
{
|
{
|
||||||
W.AddAmmo(ExtraAmmo);
|
W.AddAmmo(ExtraAmmo);
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@ Class Ext_T_ArmorRegHelp extends Ext_T_HealthRegHelp
|
|||||||
|
|
||||||
function Timer()
|
function Timer()
|
||||||
{
|
{
|
||||||
if( PawnOwner==None || PawnOwner.Health<=0 )
|
if(PawnOwner==None || PawnOwner.Health<=0)
|
||||||
Destroy();
|
Destroy();
|
||||||
else if( PawnOwner.Armor<PawnOwner.MaxArmor )
|
else if(PawnOwner.Armor<PawnOwner.MaxArmor)
|
||||||
{
|
{
|
||||||
PawnOwner.Armor = Min(PawnOwner.Armor+RegCount,PawnOwner.MaxArmor);
|
PawnOwner.Armor = Min(PawnOwner.Armor+RegCount,PawnOwner.MaxArmor);
|
||||||
}
|
}
|
||||||
|
@ -8,46 +8,46 @@ var bool bNetworkOwner;
|
|||||||
|
|
||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
if ( bNetOwner )
|
if (bNetOwner)
|
||||||
PawnOwner,AssociatedPerkClass;
|
PawnOwner,AssociatedPerkClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
function PostBeginPlay()
|
function PostBeginPlay()
|
||||||
{
|
{
|
||||||
PawnOwner = Pawn(Owner);
|
PawnOwner = Pawn(Owner);
|
||||||
if( PawnOwner==None )
|
if(PawnOwner==None)
|
||||||
Destroy();
|
Destroy();
|
||||||
else SetTimer(0.5+FRand()*0.4,true);
|
else SetTimer(0.5+FRand()*0.4,true);
|
||||||
}
|
}
|
||||||
function Timer()
|
function Timer()
|
||||||
{
|
{
|
||||||
if( PawnOwner==None || PawnOwner.Health<=0 || PawnOwner.InvManager==None )
|
if(PawnOwner==None || PawnOwner.Health<=0 || PawnOwner.InvManager==None)
|
||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
simulated function Tick( float Delta )
|
simulated function Tick(float Delta)
|
||||||
{
|
{
|
||||||
if ( WorldInfo.NetMode==NM_DedicatedServer
|
if (WorldInfo.NetMode==NM_DedicatedServer
|
||||||
|| PawnOwner==None
|
|| PawnOwner==None
|
||||||
|| PawnOwner.InvManager==None
|
|| PawnOwner.InvManager==None
|
||||||
|| KFWeapon(PawnOwner.Weapon)==None
|
|| KFWeapon(PawnOwner.Weapon)==None
|
||||||
|| ( KFWeapon(PawnOwner.Weapon).GetWeaponPerkClass(AssociatedPerkClass) != AssociatedPerkClass && AssociatedPerkClass != class'KFPerk_Survivalist' ))
|
|| (KFWeapon(PawnOwner.Weapon).GetWeaponPerkClass(AssociatedPerkClass) != AssociatedPerkClass && AssociatedPerkClass != class'KFPerk_Survivalist'))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Find local playercontroller.
|
// Find local playercontroller.
|
||||||
if( LocalPC==None )
|
if(LocalPC==None)
|
||||||
{
|
{
|
||||||
LocalPC = PlayerController(PawnOwner.Controller);
|
LocalPC = PlayerController(PawnOwner.Controller);
|
||||||
if( LocalPC==None )
|
if(LocalPC==None)
|
||||||
return;
|
return;
|
||||||
bNetworkOwner = (LocalPlayer(LocalPC.Player)!=None);
|
bNetworkOwner = (LocalPlayer(LocalPC.Player)!=None);
|
||||||
}
|
}
|
||||||
if( !bNetworkOwner )
|
if(!bNetworkOwner)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Force always to pending fire.
|
// Force always to pending fire.
|
||||||
if( LocalPC.bFire!=0 && !PawnOwner.InvManager.IsPendingFire(None,0) )
|
if(LocalPC.bFire!=0 && !PawnOwner.InvManager.IsPendingFire(None,0))
|
||||||
PawnOwner.Weapon.StartFire(0);
|
PawnOwner.Weapon.StartFire(0);
|
||||||
else if( LocalPC.bAltFire!=0 && !PawnOwner.InvManager.IsPendingFire(None,1) )
|
else if(LocalPC.bAltFire!=0 && !PawnOwner.InvManager.IsPendingFire(None,1))
|
||||||
PawnOwner.Weapon.StartFire(1);
|
PawnOwner.Weapon.StartFire(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,30 +6,30 @@ var vector ResPoint,TeleStartPoint;
|
|||||||
var ExtSpawnPointHelper SpawnPointer;
|
var ExtSpawnPointHelper SpawnPointer;
|
||||||
var bool bTeleporting,bIsDelayed;
|
var bool bTeleporting,bIsDelayed;
|
||||||
|
|
||||||
function bool CanResPlayer( KFPawn_Human Other, byte Level )
|
function bool CanResPlayer(KFPawn_Human Other, byte Level)
|
||||||
{
|
{
|
||||||
if( bTeleporting )
|
if(bTeleporting)
|
||||||
{
|
{
|
||||||
if( LastDied!=None )
|
if(LastDied!=None)
|
||||||
LastDied.Health = 9999;
|
LastDied.Health = 9999;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( LastDied==Other )
|
if(LastDied==Other)
|
||||||
{
|
{
|
||||||
if( Level==1 || LastDiedTimer>WorldInfo.TimeSeconds )
|
if(Level==1 || LastDiedTimer>WorldInfo.TimeSeconds)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if( Level==1 && Rand(2)==0 )
|
else if(Level==1 && Rand(2)==0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
LastDied = Other;
|
LastDied = Other;
|
||||||
bTeleporting = true;
|
bTeleporting = true;
|
||||||
if( SpawnPointer==None )
|
if(SpawnPointer==None)
|
||||||
SpawnPointer = class'ExtSpawnPointHelper'.Static.FindHelper(WorldInfo);
|
SpawnPointer = class'ExtSpawnPointHelper'.Static.FindHelper(WorldInfo);
|
||||||
ResPoint = SpawnPointer.PickBestSpawn().Location;
|
ResPoint = SpawnPointer.PickBestSpawn().Location;
|
||||||
LastDied.FindSpot(vect(36,36,86),ResPoint);
|
LastDied.FindSpot(vect(36,36,86),ResPoint);
|
||||||
if( VSizeSq(LastDied.Location-ResPoint)<1.f ) // Prevent division by zero errors in future.
|
if(VSizeSq(LastDied.Location-ResPoint)<1.f) // Prevent division by zero errors in future.
|
||||||
ResPoint.Z+=5;
|
ResPoint.Z+=5;
|
||||||
Enable('Tick');
|
Enable('Tick');
|
||||||
StartResurrect();
|
StartResurrect();
|
||||||
@ -42,10 +42,10 @@ final function StartResurrect()
|
|||||||
LastDied.Health = 9999;
|
LastDied.Health = 9999;
|
||||||
LastDied.LastStartTime = WorldInfo.TimeSeconds;
|
LastDied.LastStartTime = WorldInfo.TimeSeconds;
|
||||||
|
|
||||||
if( ExtHumanPawn(LastDied)!=None )
|
if(ExtHumanPawn(LastDied)!=None)
|
||||||
{
|
{
|
||||||
ExtHumanPawn(LastDied).bCanBecomeRagdoll = false;
|
ExtHumanPawn(LastDied).bCanBecomeRagdoll = false;
|
||||||
if( !ExtHumanPawn(LastDied).CanBeRedeemed() )
|
if(!ExtHumanPawn(LastDied).CanBeRedeemed())
|
||||||
{
|
{
|
||||||
bIsDelayed = true;
|
bIsDelayed = true;
|
||||||
return;
|
return;
|
||||||
@ -61,26 +61,26 @@ final function StartResurrect()
|
|||||||
LastDiedTimer = WorldInfo.TimeSeconds+TeleTime;
|
LastDiedTimer = WorldInfo.TimeSeconds+TeleTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Tick( float Delta )
|
function Tick(float Delta)
|
||||||
{
|
{
|
||||||
if( !bTeleporting )
|
if(!bTeleporting)
|
||||||
{
|
{
|
||||||
Disable('Tick');
|
Disable('Tick');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( LastDied==None || LastDied.Health<=0 )
|
if(LastDied==None || LastDied.Health<=0)
|
||||||
{
|
{
|
||||||
bTeleporting = false;
|
bTeleporting = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( bIsDelayed )
|
if(bIsDelayed)
|
||||||
{
|
{
|
||||||
bIsDelayed = false;
|
bIsDelayed = false;
|
||||||
StartResurrect();
|
StartResurrect();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Delta = (LastDiedTimer-WorldInfo.TimeSeconds);
|
Delta = (LastDiedTimer-WorldInfo.TimeSeconds);
|
||||||
if( Delta<=0 )
|
if(Delta<=0)
|
||||||
{
|
{
|
||||||
EndGhostTeleport();
|
EndGhostTeleport();
|
||||||
return;
|
return;
|
||||||
@ -88,7 +88,7 @@ function Tick( float Delta )
|
|||||||
Delta /= TeleTime;
|
Delta /= TeleTime;
|
||||||
LastDied.Velocity = Normal(ResPoint-TeleStartPoint)*900.f;
|
LastDied.Velocity = Normal(ResPoint-TeleStartPoint)*900.f;
|
||||||
LastDied.SetLocation(TeleStartPoint*Delta+ResPoint*(1.f-Delta));
|
LastDied.SetLocation(TeleStartPoint*Delta+ResPoint*(1.f-Delta));
|
||||||
if( LastDied.Physics!=PHYS_None )
|
if(LastDied.Physics!=PHYS_None)
|
||||||
LastDied.SetPhysics(PHYS_None);
|
LastDied.SetPhysics(PHYS_None);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,16 +106,16 @@ final function EndGhostTeleport()
|
|||||||
LastDied.SetPhysics(PHYS_Falling);
|
LastDied.SetPhysics(PHYS_Falling);
|
||||||
LastDied.Velocity = vect(0,0,0);
|
LastDied.Velocity = vect(0,0,0);
|
||||||
LastDied.LastStartTime = WorldInfo.TimeSeconds; // For spawn protection, if any.
|
LastDied.LastStartTime = WorldInfo.TimeSeconds; // For spawn protection, if any.
|
||||||
if( LastDied.IsDoingSpecialMove() ) // Stop any grabbing zeds.
|
if(LastDied.IsDoingSpecialMove()) // Stop any grabbing zeds.
|
||||||
LastDied.EndSpecialMove();
|
LastDied.EndSpecialMove();
|
||||||
|
|
||||||
if( ExtHumanPawn(LastDied)!=None )
|
if(ExtHumanPawn(LastDied)!=None)
|
||||||
ExtHumanPawn(LastDied).bCanBecomeRagdoll = true;
|
ExtHumanPawn(LastDied).bCanBecomeRagdoll = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Destroyed()
|
function Destroyed()
|
||||||
{
|
{
|
||||||
if( bTeleporting && LastDied!=None && LastDied.Health>0 )
|
if(bTeleporting && LastDied!=None && LastDied.Health>0)
|
||||||
EndGhostTeleport();
|
EndGhostTeleport();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,15 +7,15 @@ var byte RegCount;
|
|||||||
function PostBeginPlay()
|
function PostBeginPlay()
|
||||||
{
|
{
|
||||||
PawnOwner = KFPawn_Human(Owner);
|
PawnOwner = KFPawn_Human(Owner);
|
||||||
if( PawnOwner==None )
|
if(PawnOwner==None)
|
||||||
Destroy();
|
Destroy();
|
||||||
else SetTimer(9+FRand(),true);
|
else SetTimer(9+FRand(),true);
|
||||||
}
|
}
|
||||||
function Timer()
|
function Timer()
|
||||||
{
|
{
|
||||||
if( PawnOwner==None || PawnOwner.Health<=0 )
|
if(PawnOwner==None || PawnOwner.Health<=0)
|
||||||
Destroy();
|
Destroy();
|
||||||
else if( PawnOwner.Health<PawnOwner.HealthMax )
|
else if(PawnOwner.Health<PawnOwner.HealthMax)
|
||||||
{
|
{
|
||||||
PawnOwner.Health = Min(PawnOwner.Health+RegCount,PawnOwner.HealthMax);
|
PawnOwner.Health = Min(PawnOwner.Health+RegCount,PawnOwner.HealthMax);
|
||||||
}
|
}
|
||||||
|
@ -18,31 +18,31 @@ replication
|
|||||||
// Make no efforts with this one.
|
// Make no efforts with this one.
|
||||||
simulated event PostBeginPlay()
|
simulated event PostBeginPlay()
|
||||||
{
|
{
|
||||||
if( WorldInfo.NetMode!=NM_Client )
|
if(WorldInfo.NetMode!=NM_Client)
|
||||||
SetTimer(1,true);
|
SetTimer(1,true);
|
||||||
}
|
}
|
||||||
simulated event Destroyed()
|
simulated event Destroyed()
|
||||||
{
|
{
|
||||||
if( OwnerHUD!=None )
|
if(OwnerHUD!=None)
|
||||||
{
|
{
|
||||||
OwnerHUD.MyCurrentPet.RemoveItem(Self);
|
OwnerHUD.MyCurrentPet.RemoveItem(Self);
|
||||||
OwnerHUD = None;
|
OwnerHUD = None;
|
||||||
}
|
}
|
||||||
if ( WorldInfo.GRI != None )
|
if (WorldInfo.GRI != None)
|
||||||
WorldInfo.GRI.RemovePRI(self);
|
WorldInfo.GRI.RemovePRI(self);
|
||||||
}
|
}
|
||||||
simulated event ReplicatedEvent(name VarName)
|
simulated event ReplicatedEvent(name VarName)
|
||||||
{
|
{
|
||||||
if( VarName=='OwnerPRI' && OwnerPRI!=None )
|
if(VarName=='OwnerPRI' && OwnerPRI!=None)
|
||||||
NotifyOwner();
|
NotifyOwner();
|
||||||
else if( VarName=='MonsterType' && MonsterType!=None )
|
else if(VarName=='MonsterType' && MonsterType!=None)
|
||||||
MonsterName = Class'KFExtendedHUD'.Static.GetNameOf(MonsterType);
|
MonsterName = Class'KFExtendedHUD'.Static.GetNameOf(MonsterType);
|
||||||
}
|
}
|
||||||
simulated function Timer()
|
simulated function Timer()
|
||||||
{
|
{
|
||||||
if( PawnOwner==None || PawnOwner.Health<=0 )
|
if(PawnOwner==None || PawnOwner.Health<=0)
|
||||||
Destroy();
|
Destroy();
|
||||||
else if( HealthStatus!=PawnOwner.Health )
|
else if(HealthStatus!=PawnOwner.Health)
|
||||||
HealthStatus = PawnOwner.Health;
|
HealthStatus = PawnOwner.Health;
|
||||||
}
|
}
|
||||||
simulated final function NotifyOwner()
|
simulated final function NotifyOwner()
|
||||||
@ -50,7 +50,7 @@ simulated final function NotifyOwner()
|
|||||||
local PlayerController PC;
|
local PlayerController PC;
|
||||||
|
|
||||||
PC = GetALocalPlayerController();
|
PC = GetALocalPlayerController();
|
||||||
if( PC==None || PC.PlayerReplicationInfo!=OwnerPRI || KFExtendedHUD(PC.MyHUD)==None )
|
if(PC==None || PC.PlayerReplicationInfo!=OwnerPRI || KFExtendedHUD(PC.MyHUD)==None)
|
||||||
return;
|
return;
|
||||||
OwnerHUD = KFExtendedHUD(PC.MyHUD);
|
OwnerHUD = KFExtendedHUD(PC.MyHUD);
|
||||||
OwnerHUD.MyCurrentPet.AddItem(Self);
|
OwnerHUD.MyCurrentPet.AddItem(Self);
|
||||||
|
@ -15,20 +15,20 @@ var bool bGrenades;
|
|||||||
|
|
||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
if( true )
|
if(true)
|
||||||
PlayerOwner,bGrenades;
|
PlayerOwner,bGrenades;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated event ReplicatedEvent(name VarName)
|
simulated event ReplicatedEvent(name VarName)
|
||||||
{
|
{
|
||||||
if( VarName=='PlayerOwner' && PlayerOwner!=None )
|
if(VarName=='PlayerOwner' && PlayerOwner!=None)
|
||||||
{
|
{
|
||||||
SetLocation(PlayerOwner.Location);
|
SetLocation(PlayerOwner.Location);
|
||||||
SetBase(PlayerOwner);
|
SetBase(PlayerOwner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function int GetInteractionIndex( Pawn User )
|
simulated function int GetInteractionIndex(Pawn User)
|
||||||
{
|
{
|
||||||
return (bGrenades ? IMT_ReceiveGrenades : InteractionIndex);
|
return (bGrenades ? IMT_ReceiveGrenades : InteractionIndex);
|
||||||
}
|
}
|
||||||
@ -40,7 +40,7 @@ simulated event Touch(Actor Other, PrimitiveComponent OtherComp, vector HitLocat
|
|||||||
Super.Touch(Other, OtherComp, HitLocation, HitNormal);
|
Super.Touch(Other, OtherComp, HitLocation, HitNormal);
|
||||||
|
|
||||||
KFP = KFPawn_Human(Other);
|
KFP = KFPawn_Human(Other);
|
||||||
if( KFP != none && KFP.Controller != none && KFP != PlayerOwner )
|
if(KFP != none && KFP.Controller != none && KFP != PlayerOwner)
|
||||||
{
|
{
|
||||||
KFPlayerController(KFP.Controller).SetPendingInteractionMessage();
|
KFPlayerController(KFP.Controller).SetPendingInteractionMessage();
|
||||||
}
|
}
|
||||||
@ -50,10 +50,10 @@ simulated event UnTouch(Actor Other)
|
|||||||
{
|
{
|
||||||
local KFPawn_Human KFP;
|
local KFPawn_Human KFP;
|
||||||
|
|
||||||
super.UnTouch( Other );
|
super.UnTouch(Other);
|
||||||
|
|
||||||
KFP = KFPawn_Human(Other);
|
KFP = KFPawn_Human(Other);
|
||||||
if( KFP != none && KFP.Controller != none && KFP != PlayerOwner )
|
if(KFP != none && KFP.Controller != none && KFP != PlayerOwner)
|
||||||
{
|
{
|
||||||
KFPlayerController(KFP.Controller).SetPendingInteractionMessage();
|
KFPlayerController(KFP.Controller).SetPendingInteractionMessage();
|
||||||
}
|
}
|
||||||
@ -66,43 +66,43 @@ simulated function RecheckUser()
|
|||||||
// Notify local player owner that this is available again.
|
// Notify local player owner that this is available again.
|
||||||
foreach TouchingActors(class'KFPawn_Human', Toucher)
|
foreach TouchingActors(class'KFPawn_Human', Toucher)
|
||||||
{
|
{
|
||||||
if( Toucher.IsLocallyControlled() )
|
if(Toucher.IsLocallyControlled())
|
||||||
Touch(Toucher,None,Location,vect(1,0,0));
|
Touch(Toucher,None,Location,vect(1,0,0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function bool GetCanInteract( Pawn User, optional bool bInteractIfTrue = false)
|
simulated function bool GetCanInteract(Pawn User, optional bool bInteractIfTrue = false)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
local ExtPlayerReplicationInfo PRI;
|
local ExtPlayerReplicationInfo PRI;
|
||||||
|
|
||||||
if( PlayerOwner==None || User==PlayerOwner || KFPawn_Human(User)==None || User.Health<=0 )
|
if(PlayerOwner==None || User==PlayerOwner || KFPawn_Human(User)==None || User.Health<=0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( WorldInfo.NetMode==NM_Client )
|
if(WorldInfo.NetMode==NM_Client)
|
||||||
{
|
{
|
||||||
PRI = ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo);
|
PRI = ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo);
|
||||||
if( !User.IsLocallyControlled() || PRI==None || !PRI.CanUseSupply(User) )
|
if(!User.IsLocallyControlled() || PRI==None || !PRI.CanUseSupply(User))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( bInteractIfTrue )
|
if(bInteractIfTrue)
|
||||||
{
|
{
|
||||||
PRI.UsedSupply(User,ReuseTime);
|
PRI.UsedSupply(User,ReuseTime);
|
||||||
SetTimer(ReuseTime+0.1,false,'RecheckUser');
|
SetTimer(ReuseTime+0.1,false,'RecheckUser');
|
||||||
|
|
||||||
if( KFPlayerController(User.Controller)!=None )
|
if(KFPlayerController(User.Controller)!=None)
|
||||||
KFPlayerController(User.Controller).SetPendingInteractionMessage();
|
KFPlayerController(User.Controller).SetPendingInteractionMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
i = ActiveUsers.Find('Player',User);
|
i = ActiveUsers.Find('Player',User);
|
||||||
if( i>=0 && ActiveUsers[i].NextUseTime>WorldInfo.TimeSeconds )
|
if(i>=0 && ActiveUsers[i].NextUseTime>WorldInfo.TimeSeconds)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( bInteractIfTrue )
|
if(bInteractIfTrue)
|
||||||
{
|
{
|
||||||
if( i==-1 )
|
if(i==-1)
|
||||||
{
|
{
|
||||||
i = ActiveUsers.Length;
|
i = ActiveUsers.Length;
|
||||||
ActiveUsers.Length = i+1;
|
ActiveUsers.Length = i+1;
|
||||||
@ -113,7 +113,7 @@ simulated function bool GetCanInteract( Pawn User, optional bool bInteractIfTrue
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bInteractIfTrue && WorldInfo.NetMode!=NM_Client )
|
if(bInteractIfTrue && WorldInfo.NetMode!=NM_Client)
|
||||||
{
|
{
|
||||||
GiveAmmunition(KFPawn_Human(User));
|
GiveAmmunition(KFPawn_Human(User));
|
||||||
}
|
}
|
||||||
@ -123,60 +123,60 @@ function CleanupUsers()
|
|||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
for( i=(ActiveUsers.Length-1); i>=0; --i )
|
for(i=(ActiveUsers.Length-1); i>=0; --i)
|
||||||
if( ActiveUsers[i].Player==None || ActiveUsers[i].Player.Health<=0 || ActiveUsers[i].NextUseTime<WorldInfo.TimeSeconds )
|
if(ActiveUsers[i].Player==None || ActiveUsers[i].Player.Health<=0 || ActiveUsers[i].NextUseTime<WorldInfo.TimeSeconds)
|
||||||
ActiveUsers.Remove(i,1);
|
ActiveUsers.Remove(i,1);
|
||||||
if( ActiveUsers.Length==0 )
|
if(ActiveUsers.Length==0)
|
||||||
ClearTimer('CleanupUsers');
|
ClearTimer('CleanupUsers');
|
||||||
}
|
}
|
||||||
final function GiveAmmunition( KFPawn_Human Other )
|
final function GiveAmmunition(KFPawn_Human Other)
|
||||||
{
|
{
|
||||||
local KFWeapon KFW;
|
local KFWeapon KFW;
|
||||||
|
|
||||||
if( PlayerController(PlayerOwner.Controller)!=None )
|
if(PlayerController(PlayerOwner.Controller)!=None)
|
||||||
PlayerController(PlayerOwner.Controller).ReceiveLocalizedMessage( class'KFLocalMessage_Game', (bGrenades ? GMT_GaveGrenadesTo : GMT_GaveAmmoTo), Other.PlayerReplicationInfo );
|
PlayerController(PlayerOwner.Controller).ReceiveLocalizedMessage(class'KFLocalMessage_Game', (bGrenades ? GMT_GaveGrenadesTo : GMT_GaveAmmoTo), Other.PlayerReplicationInfo);
|
||||||
if( PlayerController(Other.Controller)!=None )
|
if(PlayerController(Other.Controller)!=None)
|
||||||
{
|
{
|
||||||
PlayerController(Other.Controller).ReceiveLocalizedMessage( class'KFLocalMessage_Game', (bGrenades ? GMT_ReceivedGrenadesFrom : GMT_ReceivedAmmoFrom), PlayerOwner.PlayerReplicationInfo );
|
PlayerController(Other.Controller).ReceiveLocalizedMessage(class'KFLocalMessage_Game', (bGrenades ? GMT_ReceivedGrenadesFrom : GMT_ReceivedAmmoFrom), PlayerOwner.PlayerReplicationInfo);
|
||||||
if( ExtPlayerController(Other.Controller)!=None )
|
if(ExtPlayerController(Other.Controller)!=None)
|
||||||
ExtPlayerController(Other.Controller).ClientUsedAmmo(Self);
|
ExtPlayerController(Other.Controller).ClientUsedAmmo(Self);
|
||||||
}
|
}
|
||||||
if( PerkOwner!=None )
|
if(PerkOwner!=None)
|
||||||
PerkOwner.EarnedEXP(25);
|
PerkOwner.EarnedEXP(25);
|
||||||
|
|
||||||
if( bGrenades )
|
if(bGrenades)
|
||||||
{
|
{
|
||||||
if( KFInventoryManager(Other.InvManager)!=None )
|
if(KFInventoryManager(Other.InvManager)!=None)
|
||||||
KFInventoryManager(Other.InvManager).AddGrenades(1);
|
KFInventoryManager(Other.InvManager).AddGrenades(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach Other.InvManager.InventoryActors( class'KFWeapon', KFW )
|
foreach Other.InvManager.InventoryActors(class'KFWeapon', KFW)
|
||||||
{
|
{
|
||||||
if( KFW.DenyPerkResupply() )
|
if(KFW.DenyPerkResupply())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// resupply 1 mag for every 5 initial mags
|
// resupply 1 mag for every 5 initial mags
|
||||||
KFW.AddAmmo( Max( KFW.InitialSpareMags[0] / 3, 1 ) * KFW.MagazineCapacity[0] );
|
KFW.AddAmmo(Max(KFW.InitialSpareMags[0] / 3, 1) * KFW.MagazineCapacity[0]);
|
||||||
|
|
||||||
if( KFW.CanRefillSecondaryAmmo() )
|
if(KFW.CanRefillSecondaryAmmo())
|
||||||
{
|
{
|
||||||
// resupply 1 mag for every 5 initial mags
|
// resupply 1 mag for every 5 initial mags
|
||||||
KFW.AddSecondaryAmmo( Max( KFW.InitialSpareMags[1] / 3, 1 ) );
|
KFW.AddSecondaryAmmo(Max(KFW.InitialSpareMags[1] / 3, 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
simulated final function UsedOnClient( Pawn User )
|
simulated final function UsedOnClient(Pawn User)
|
||||||
{
|
{
|
||||||
local ExtPlayerReplicationInfo PRI;
|
local ExtPlayerReplicationInfo PRI;
|
||||||
|
|
||||||
PRI = ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo);
|
PRI = ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo);
|
||||||
if( PRI!=None )
|
if(PRI!=None)
|
||||||
PRI.UsedSupply(User,ReuseTime);
|
PRI.UsedSupply(User,ReuseTime);
|
||||||
SetTimer(ReuseTime+0.1,false,'RecheckUser');
|
SetTimer(ReuseTime+0.1,false,'RecheckUser');
|
||||||
|
|
||||||
if( WorldInfo.NetMode==NM_Client && KFPlayerController(User.Controller)!=None )
|
if(WorldInfo.NetMode==NM_Client && KFPlayerController(User.Controller)!=None)
|
||||||
KFPlayerController(User.Controller).SetPendingInteractionMessage();
|
KFPlayerController(User.Controller).SetPendingInteractionMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ var float HandleRadius;
|
|||||||
function PostBeginPlay()
|
function PostBeginPlay()
|
||||||
{
|
{
|
||||||
PawnOwner = Pawn(Owner);
|
PawnOwner = Pawn(Owner);
|
||||||
if( PawnOwner==None )
|
if(PawnOwner==None)
|
||||||
Destroy();
|
Destroy();
|
||||||
else SetTimer(0.5+FRand()*0.1,true);
|
else SetTimer(0.5+FRand()*0.1,true);
|
||||||
}
|
}
|
||||||
@ -15,12 +15,12 @@ function Timer()
|
|||||||
{
|
{
|
||||||
local KFPawn_Monster M;
|
local KFPawn_Monster M;
|
||||||
|
|
||||||
if( PawnOwner==None || PawnOwner.Health<=0 )
|
if(PawnOwner==None || PawnOwner.Health<=0)
|
||||||
Destroy();
|
Destroy();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach WorldInfo.AllPawns(class'KFPawn_Monster',M,PawnOwner.Location,HandleRadius)
|
foreach WorldInfo.AllPawns(class'KFPawn_Monster',M,PawnOwner.Location,HandleRadius)
|
||||||
if( M.bCanCloak )
|
if(M.bCanCloak)
|
||||||
M.CallOutCloaking();
|
M.CallOutCloaking();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ function PostBeginPlay()
|
|||||||
{
|
{
|
||||||
PawnOwner = Pawn(Owner);
|
PawnOwner = Pawn(Owner);
|
||||||
bNeedsKillZed = true;
|
bNeedsKillZed = true;
|
||||||
if( PawnOwner==None )
|
if(PawnOwner==None)
|
||||||
Destroy();
|
Destroy();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -30,30 +30,30 @@ function PostBeginPlay()
|
|||||||
}
|
}
|
||||||
function Timer()
|
function Timer()
|
||||||
{
|
{
|
||||||
if( PawnOwner==None || PawnOwner.Health<=0 || PawnOwner.PlayerReplicationInfo==None )
|
if(PawnOwner==None || PawnOwner.Health<=0 || PawnOwner.PlayerReplicationInfo==None)
|
||||||
Destroy();
|
Destroy();
|
||||||
else if( bNeedsKillZed )
|
else if(bNeedsKillZed)
|
||||||
{
|
{
|
||||||
if( RespawnHelperTime>1 )
|
if(RespawnHelperTime>1)
|
||||||
--RespawnHelperTime;
|
--RespawnHelperTime;
|
||||||
if( OldKillsValue==PawnOwner.PlayerReplicationInfo.Kills )
|
if(OldKillsValue==PawnOwner.PlayerReplicationInfo.Kills)
|
||||||
return;
|
return;
|
||||||
bNeedsKillZed = false;
|
bNeedsKillZed = false;
|
||||||
}
|
}
|
||||||
else if( RespawnHelperTime>0 )
|
else if(RespawnHelperTime>0)
|
||||||
{
|
{
|
||||||
if( --RespawnHelperTime==0 )
|
if(--RespawnHelperTime==0)
|
||||||
SpawnHelper();
|
SpawnHelper();
|
||||||
}
|
}
|
||||||
else if( LiveHelper==None || LiveHelper.Health<=0 )
|
else if(LiveHelper==None || LiveHelper.Health<=0)
|
||||||
{
|
{
|
||||||
OldKillsValue = PawnOwner.PlayerReplicationInfo.Kills;
|
OldKillsValue = PawnOwner.PlayerReplicationInfo.Kills;
|
||||||
bNeedsKillZed = true;
|
bNeedsKillZed = true;
|
||||||
RespawnHelperTime = 60;
|
RespawnHelperTime = 60;
|
||||||
}
|
}
|
||||||
else if( !HasLiveZeds() )
|
else if(!HasLiveZeds())
|
||||||
{
|
{
|
||||||
if( NoLiveCounter==0 )
|
if(NoLiveCounter==0)
|
||||||
{
|
{
|
||||||
PrevMonster = LiveHelper.Class;
|
PrevMonster = LiveHelper.Class;
|
||||||
PrevMonsterHP = (float(LiveHelper.Health) / LiveHelper.HealthMax);
|
PrevMonsterHP = (float(LiveHelper.Health) / LiveHelper.HealthMax);
|
||||||
@ -66,18 +66,18 @@ function Timer()
|
|||||||
}
|
}
|
||||||
function Destroyed()
|
function Destroyed()
|
||||||
{
|
{
|
||||||
if( LiveHelper!=None && LiveHelper.Health>0 )
|
if(LiveHelper!=None && LiveHelper.Health>0)
|
||||||
LiveHelper.Died(None,class'DmgType_Suicided',vect(0,0,0));
|
LiveHelper.Died(None,class'DmgType_Suicided',vect(0,0,0));
|
||||||
}
|
}
|
||||||
final function bool HasLiveZeds()
|
final function bool HasLiveZeds()
|
||||||
{
|
{
|
||||||
local KFPawn_Monster M;
|
local KFPawn_Monster M;
|
||||||
|
|
||||||
if( KFGameReplicationInfo(WorldInfo.GRI).WaveNum>=KFGameReplicationInfo(WorldInfo.GRI).WaveMax ) // No pets on possible bonus waves.
|
if(KFGameReplicationInfo(WorldInfo.GRI).WaveNum>=KFGameReplicationInfo(WorldInfo.GRI).WaveMax) // No pets on possible bonus waves.
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
foreach WorldInfo.AllPawns(Class'KFPawn_Monster',M)
|
foreach WorldInfo.AllPawns(Class'KFPawn_Monster',M)
|
||||||
if( M.Health>0 && M.GetTeamNum()!=0 )
|
if(M.Health>0 && M.GetTeamNum()!=0)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -92,41 +92,41 @@ final function SpawnHelper()
|
|||||||
local AkBaseSoundObject TempSound;
|
local AkBaseSoundObject TempSound;
|
||||||
local bool bFinalWave;
|
local bool bFinalWave;
|
||||||
|
|
||||||
if( PawnOwner.PlayerReplicationInfo==None || !HasLiveZeds() )
|
if(PawnOwner.PlayerReplicationInfo==None || !HasLiveZeds())
|
||||||
{
|
{
|
||||||
RespawnHelperTime = 3;
|
RespawnHelperTime = 3;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NoLiveCounter = 5;
|
NoLiveCounter = 5;
|
||||||
bFinalWave = KFGameReplicationInfo(WorldInfo.GRI).IsFinalWave();
|
bFinalWave = KFGameReplicationInfo(WorldInfo.GRI).IsFinalWave();
|
||||||
if( bFinalWave && Class<KFPawn_MonsterBoss>(PrevMonster)!=None )
|
if(bFinalWave && Class<KFPawn_MonsterBoss>(PrevMonster)!=None)
|
||||||
PrevMonster = None;
|
PrevMonster = None;
|
||||||
MC = (PrevMonster!=None ? PrevMonster : PickRandomMonster(CurLevel,bFinalWave));
|
MC = (PrevMonster!=None ? PrevMonster : PickRandomMonster(CurLevel,bFinalWave));
|
||||||
|
|
||||||
if( MC!=None )
|
if(MC!=None)
|
||||||
{
|
{
|
||||||
R.Yaw = Rand(65536);
|
R.Yaw = Rand(65536);
|
||||||
if( MC.Default.SoundGroupArch!=None )
|
if(MC.Default.SoundGroupArch!=None)
|
||||||
{
|
{
|
||||||
// Make no entrance roam (for FP's and Scrakes).
|
// Make no entrance roam (for FP's and Scrakes).
|
||||||
TempSound = MC.Default.SoundGroupArch.EntranceSound;
|
TempSound = MC.Default.SoundGroupArch.EntranceSound;
|
||||||
MC.Default.SoundGroupArch.EntranceSound = None;
|
MC.Default.SoundGroupArch.EntranceSound = None;
|
||||||
}
|
}
|
||||||
for( i=0; i<40; ++i )
|
for(i=0; i<40; ++i)
|
||||||
{
|
{
|
||||||
V = PawnOwner.Location;
|
V = PawnOwner.Location;
|
||||||
V.X += (FRand()*300.f-150.f);
|
V.X += (FRand()*300.f-150.f);
|
||||||
V.Y += (FRand()*300.f-150.f);
|
V.Y += (FRand()*300.f-150.f);
|
||||||
if( !PawnOwner.FastTrace(V,PawnOwner.Location) )
|
if(!PawnOwner.FastTrace(V,PawnOwner.Location))
|
||||||
continue;
|
continue;
|
||||||
LiveHelper = Spawn(MC,,,V,R);
|
LiveHelper = Spawn(MC,,,V,R);
|
||||||
if( LiveHelper!=None )
|
if(LiveHelper!=None)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if( MC.Default.SoundGroupArch!=None )
|
if(MC.Default.SoundGroupArch!=None)
|
||||||
MC.Default.SoundGroupArch.EntranceSound = TempSound;
|
MC.Default.SoundGroupArch.EntranceSound = TempSound;
|
||||||
}
|
}
|
||||||
if( LiveHelper==None )
|
if(LiveHelper==None)
|
||||||
RespawnHelperTime = 2;
|
RespawnHelperTime = 2;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -136,7 +136,7 @@ final function SpawnHelper()
|
|||||||
|
|
||||||
// Setup AI
|
// Setup AI
|
||||||
C = Spawn(LiveHelper.ControllerClass);
|
C = Spawn(LiveHelper.ControllerClass);
|
||||||
if( KFAIController(C)!=None )
|
if(KFAIController(C)!=None)
|
||||||
{
|
{
|
||||||
KFAIController(C).bCanTeleportCloser = false;
|
KFAIController(C).bCanTeleportCloser = false;
|
||||||
KFAIController(C).DefaultCommandClass = class'Ext_AICommandBasePet';
|
KFAIController(C).DefaultCommandClass = class'Ext_AICommandBasePet';
|
||||||
@ -155,14 +155,14 @@ final function SpawnHelper()
|
|||||||
LiveHelper.bCanGrabAttack = false;
|
LiveHelper.bCanGrabAttack = false;
|
||||||
|
|
||||||
// Scale by previous zed HP.
|
// Scale by previous zed HP.
|
||||||
if( PrevMonster!=None )
|
if(PrevMonster!=None)
|
||||||
{
|
{
|
||||||
LiveHelper.Health *= PrevMonsterHP;
|
LiveHelper.Health *= PrevMonsterHP;
|
||||||
PrevMonster = None;
|
PrevMonster = None;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup PRI.
|
// Setup PRI.
|
||||||
if( C.PlayerReplicationInfo!=None )
|
if(C.PlayerReplicationInfo!=None)
|
||||||
C.PlayerReplicationInfo.Destroy();
|
C.PlayerReplicationInfo.Destroy();
|
||||||
PRI = Spawn(class'Ext_T_MonsterPRI',LiveHelper);
|
PRI = Spawn(class'Ext_T_MonsterPRI',LiveHelper);
|
||||||
LiveHelper.PlayerReplicationInfo = PRI;
|
LiveHelper.PlayerReplicationInfo = PRI;
|
||||||
@ -174,21 +174,21 @@ final function SpawnHelper()
|
|||||||
PRI.MonsterType = MC;
|
PRI.MonsterType = MC;
|
||||||
PRI.PlayerName = PawnOwner.PlayerReplicationInfo.PlayerName$"'s "$PRI.MonsterName;
|
PRI.PlayerName = PawnOwner.PlayerReplicationInfo.PlayerName$"'s "$PRI.MonsterName;
|
||||||
PRI.OwnerController = PawnOwner.Controller;
|
PRI.OwnerController = PawnOwner.Controller;
|
||||||
if( PawnOwner.PlayerReplicationInfo.Team!=None )
|
if(PawnOwner.PlayerReplicationInfo.Team!=None)
|
||||||
PawnOwner.PlayerReplicationInfo.Team.AddToTeam(C);
|
PawnOwner.PlayerReplicationInfo.Team.AddToTeam(C);
|
||||||
PRI.Timer();
|
PRI.Timer();
|
||||||
if( WorldInfo.NetMode!=NM_DedicatedServer )
|
if(WorldInfo.NetMode!=NM_DedicatedServer)
|
||||||
PRI.NotifyOwner();
|
PRI.NotifyOwner();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final function SetDamageScale( float Sc )
|
final function SetDamageScale(float Sc)
|
||||||
{
|
{
|
||||||
DamageScale = Default.DamageScale*Sc;
|
DamageScale = Default.DamageScale*Sc;
|
||||||
if( LiveHelper!=None )
|
if(LiveHelper!=None)
|
||||||
LiveHelper.DamageScaling = DamageScale;
|
LiveHelper.DamageScaling = DamageScale;
|
||||||
}
|
}
|
||||||
final function SetHealthScale( float Sc )
|
final function SetHealthScale(float Sc)
|
||||||
{
|
{
|
||||||
HPScale = Default.HPScale*Sc;
|
HPScale = Default.HPScale*Sc;
|
||||||
}
|
}
|
||||||
@ -201,35 +201,35 @@ static final function LoadMonsterList()
|
|||||||
|
|
||||||
Default.ZedTypes.Length = class'Ext_TraitZED_Summon'.Default.ZedTypes.Length;
|
Default.ZedTypes.Length = class'Ext_TraitZED_Summon'.Default.ZedTypes.Length;
|
||||||
|
|
||||||
for( i=0; i<Default.ZedTypes.Length; ++i )
|
for(i=0; i<Default.ZedTypes.Length; ++i)
|
||||||
{
|
{
|
||||||
SA.Length = 0;
|
SA.Length = 0;
|
||||||
ParseStringIntoArray(class'Ext_TraitZED_Summon'.Default.ZedTypes[i],SA,",",true);
|
ParseStringIntoArray(class'Ext_TraitZED_Summon'.Default.ZedTypes[i],SA,",",true);
|
||||||
|
|
||||||
for( j=0; j<SA.Length; ++j )
|
for(j=0; j<SA.Length; ++j)
|
||||||
{
|
{
|
||||||
C = class<KFPawn_Monster>(DynamicLoadObject(SA[j],Class'Class'));
|
C = class<KFPawn_Monster>(DynamicLoadObject(SA[j],Class'Class'));
|
||||||
if( C==None )
|
if(C==None)
|
||||||
continue;
|
continue;
|
||||||
Default.ZedTypes[i].Zeds[Default.ZedTypes[i].Zeds.Length] = C;
|
Default.ZedTypes[i].Zeds[Default.ZedTypes[i].Zeds.Length] = C;
|
||||||
}
|
}
|
||||||
if( Default.ZedTypes[i].Zeds.Length==0 )
|
if(Default.ZedTypes[i].Zeds.Length==0)
|
||||||
Default.ZedTypes[i].Zeds[Default.ZedTypes[i].Zeds.Length] = Class'KFPawn_ZedClot_Alpha';
|
Default.ZedTypes[i].Zeds[Default.ZedTypes[i].Zeds.Length] = Class'KFPawn_ZedClot_Alpha';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static final function class<KFPawn_Monster> PickRandomMonster( byte Level, bool bNotBoss )
|
static final function class<KFPawn_Monster> PickRandomMonster(byte Level, bool bNotBoss)
|
||||||
{
|
{
|
||||||
local byte i;
|
local byte i;
|
||||||
local class<KFPawn_Monster> Res;
|
local class<KFPawn_Monster> Res;
|
||||||
|
|
||||||
Level = Min(Default.ZedTypes.Length-1,Level);
|
Level = Min(Default.ZedTypes.Length-1,Level);
|
||||||
for( i=0; i<5; ++i )
|
for(i=0; i<5; ++i)
|
||||||
{
|
{
|
||||||
Res = Default.ZedTypes[Level].Zeds[Rand(Default.ZedTypes[Level].Zeds.Length)];
|
Res = Default.ZedTypes[Level].Zeds[Rand(Default.ZedTypes[Level].Zeds.Length)];
|
||||||
if( !bNotBoss || class<KFPawn_MonsterBoss>(Res)==None )
|
if(!bNotBoss || class<KFPawn_MonsterBoss>(Res)==None)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if( bNotBoss && class<KFPawn_MonsterBoss>(Res)!=None )
|
if(bNotBoss && class<KFPawn_MonsterBoss>(Res)!=None)
|
||||||
Res = Class'KFPawn_ZedFleshpound';
|
Res = Class'KFPawn_ZedFleshpound';
|
||||||
return Res;
|
return Res;
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
Class Ext_TraitAPShots extends Ext_TraitBase;
|
Class Ext_TraitAPShots extends Ext_TraitBase;
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkSupport(Perk).APShotMul = 1 + (0.25 + (((float(Level) - 1.f) * 5.f) / 100.f));
|
Ext_PerkSupport(Perk).APShotMul = 1 + (0.25 + (((float(Level) - 1.f) * 5.f) / 100.f));
|
||||||
}
|
}
|
||||||
|
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkSupport(Perk).APShotMul = 0.f;
|
Ext_PerkSupport(Perk).APShotMul = 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkSupport(Perk).bUseAPShot = true;
|
Ext_PerkSupport(Perk).bUseAPShot = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkSupport(Perk).bUseAPShot = false;
|
Ext_PerkSupport(Perk).bUseAPShot = false;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Class Ext_TraitAcidicCompound extends Ext_TraitBase;
|
Class Ext_TraitAcidicCompound extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkFieldMedic(Perk).bUseToxicDamage = true;
|
Ext_PerkFieldMedic(Perk).bUseToxicDamage = true;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkFieldMedic(Perk).bUseToxicDamage = false;
|
Ext_PerkFieldMedic(Perk).bUseToxicDamage = false;
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,12 @@ Class Ext_TraitAirborne extends Ext_TraitBase;
|
|||||||
|
|
||||||
var array<float> HealRates;
|
var array<float> HealRates;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkFieldMedic(Perk).AirborneAgentHealRate = Default.HealRates[Level-1];
|
Ext_PerkFieldMedic(Perk).AirborneAgentHealRate = Default.HealRates[Level-1];
|
||||||
Ext_PerkFieldMedic(Perk).AirborneAgentLevel = (Level<4 ? 1 : 2);
|
Ext_PerkFieldMedic(Perk).AirborneAgentLevel = (Level<4 ? 1 : 2);
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkFieldMedic(Perk).AirborneAgentLevel = 0;
|
Ext_PerkFieldMedic(Perk).AirborneAgentLevel = 0;
|
||||||
}
|
}
|
||||||
|
@ -9,18 +9,18 @@ static function string GetPerkDescription()
|
|||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk )
|
static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
if( Perk.CurrentLevel<Default.MinLevel || Perk.CurrentPrestige<1 )
|
if(Perk.CurrentLevel<Default.MinLevel || Perk.CurrentPrestige<1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for( i=0; i<Perk.PerkTraits.Length; ++i )
|
for(i=0; i<Perk.PerkTraits.Length; ++i)
|
||||||
{
|
{
|
||||||
if( Perk.PerkTraits[i].TraitType==Class'Ext_TraitGrenadeUpg' )
|
if(Perk.PerkTraits[i].TraitType==Class'Ext_TraitGrenadeUpg')
|
||||||
{
|
{
|
||||||
if( Perk.PerkTraits[i].CurrentLevel <= 0 )
|
if(Perk.PerkTraits[i].CurrentLevel <= 0)
|
||||||
return false;
|
return false;
|
||||||
else break;
|
else break;
|
||||||
}
|
}
|
||||||
@ -29,11 +29,11 @@ static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkFieldMedic(Perk).bUseAirborneAgent = true;
|
Ext_PerkFieldMedic(Perk).bUseAirborneAgent = true;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkFieldMedic(Perk).bUseAirborneAgent = false;
|
Ext_PerkFieldMedic(Perk).bUseAirborneAgent = false;
|
||||||
}
|
}
|
||||||
|
@ -2,15 +2,15 @@ Class Ext_TraitAmmoReg extends Ext_TraitBase;
|
|||||||
|
|
||||||
var array<float> RegenValues;
|
var array<float> RegenValues;
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local Ext_T_AmmoRegHelp H;
|
local Ext_T_AmmoRegHelp H;
|
||||||
|
|
||||||
H = Player.Spawn(class'Ext_T_AmmoRegHelp',Player);
|
H = Player.Spawn(class'Ext_T_AmmoRegHelp',Player);
|
||||||
if( H!=None )
|
if(H!=None)
|
||||||
H.RegCount = Default.RegenValues[Level-1];
|
H.RegCount = Default.RegenValues[Level-1];
|
||||||
}
|
}
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local Ext_T_AmmoRegHelp H;
|
local Ext_T_AmmoRegHelp H;
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
Class Ext_TraitArmorReg extends Ext_TraitHealthReg;
|
Class Ext_TraitArmorReg extends Ext_TraitHealthReg;
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local Ext_T_ArmorRegHelp H;
|
local Ext_T_ArmorRegHelp H;
|
||||||
|
|
||||||
H = Player.Spawn(class'Ext_T_ArmorRegHelp',Player);
|
H = Player.Spawn(class'Ext_T_ArmorRegHelp',Player);
|
||||||
if( H!=None )
|
if(H!=None)
|
||||||
H.RegCount = Default.RegenValues[Level-1];
|
H.RegCount = Default.RegenValues[Level-1];
|
||||||
}
|
}
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local Ext_T_ArmorRegHelp H;
|
local Ext_T_ArmorRegHelp H;
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Class Ext_TraitArmorRep extends Ext_TraitBase;
|
Class Ext_TraitArmorRep extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkFieldMedic(Perk).RepairArmorRate = float(Level)*0.05f;
|
Ext_PerkFieldMedic(Perk).RepairArmorRate = float(Level)*0.05f;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkFieldMedic(Perk).RepairArmorRate = 0;
|
Ext_PerkFieldMedic(Perk).RepairArmorRate = 0;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
Class Ext_TraitAutoFire extends Ext_TraitBase;
|
Class Ext_TraitAutoFire extends Ext_TraitBase;
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local Ext_T_AutoFireHelper H;
|
local Ext_T_AutoFireHelper H;
|
||||||
|
|
||||||
H = Player.Spawn(class'Ext_T_AutoFireHelper',Player);
|
H = Player.Spawn(class'Ext_T_AutoFireHelper',Player);
|
||||||
H.AssociatedPerkClass = Perk.BasePerk;
|
H.AssociatedPerkClass = Perk.BasePerk;
|
||||||
}
|
}
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local Ext_T_AutoFireHelper H;
|
local Ext_T_AutoFireHelper H;
|
||||||
|
|
||||||
|
@ -27,20 +27,20 @@ var() bool bGroupLimitToOne, // TraitGroup should limit so you can only buy one
|
|||||||
bPostApplyEffect; // Apply effects on second pass (relies on that another trait is activated first).
|
bPostApplyEffect; // Apply effects on second pass (relies on that another trait is activated first).
|
||||||
|
|
||||||
// Check if trait is enabled and usable on this perk.
|
// Check if trait is enabled and usable on this perk.
|
||||||
static function bool IsEnabled( Ext_PerkBase Perk )
|
static function bool IsEnabled(Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
return !Default.bDisabled && (Default.SupportedPerk==None || ClassIsChildOf(Perk.Class,Default.SupportedPerk));
|
return !Default.bDisabled && (Default.SupportedPerk==None || ClassIsChildOf(Perk.Class,Default.SupportedPerk));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if player meets the requirements to buy this trait.
|
// Check if player meets the requirements to buy this trait.
|
||||||
static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk )
|
static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
// First check level.
|
// First check level.
|
||||||
if( Perk.CurrentLevel<Default.MinLevel )
|
if(Perk.CurrentLevel<Default.MinLevel)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Then check grouping.
|
// Then check grouping.
|
||||||
if( Lvl==0 && Default.TraitGroup!=None && Default.TraitGroup.Static.GroupLimited(Perk,Default.Class) )
|
if(Lvl==0 && Default.TraitGroup!=None && Default.TraitGroup.Static.GroupLimited(Perk,Default.Class))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -51,14 +51,14 @@ static function string GetPerkDescription()
|
|||||||
local string S;
|
local string S;
|
||||||
local byte i;
|
local byte i;
|
||||||
|
|
||||||
for( i=0; i<Default.NumLevels; ++i )
|
for(i=0; i<Default.NumLevels; ++i)
|
||||||
{
|
{
|
||||||
if( i==0 )
|
if(i==0)
|
||||||
S = string(GetTraitCost(i));
|
S = string(GetTraitCost(i));
|
||||||
else S $= ", "$GetTraitCost(i);
|
else S $= ", "$GetTraitCost(i);
|
||||||
}
|
}
|
||||||
S = "Max level: #{9FF781}"$Default.NumLevels$"#{DEF}|Level costs: #{F3F781}"$S$"#{DEF}";
|
S = "Max level: #{9FF781}"$Default.NumLevels$"#{DEF}|Level costs: #{F3F781}"$S$"#{DEF}";
|
||||||
if( Default.MinLevel>0 )
|
if(Default.MinLevel>0)
|
||||||
S = "Min perk level: #{FF4000}"$Default.MinLevel$"#{DEF}|"$S;
|
S = "Min perk level: #{FF4000}"$Default.MinLevel$"#{DEF}|"$S;
|
||||||
return Default.Description$"||"$S;
|
return Default.Description$"||"$S;
|
||||||
}
|
}
|
||||||
@ -70,11 +70,11 @@ static function string GetTooltipInfo()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return level specific trait prices.
|
// Return level specific trait prices.
|
||||||
static function int GetTraitCost( byte LevelNum )
|
static function int GetTraitCost(byte LevelNum)
|
||||||
{
|
{
|
||||||
if( Default.LevelCosts.Length>0 )
|
if(Default.LevelCosts.Length>0)
|
||||||
{
|
{
|
||||||
if( LevelNum<Default.LevelCosts.Length )
|
if(LevelNum<Default.LevelCosts.Length)
|
||||||
return Default.LevelCosts[LevelNum];
|
return Default.LevelCosts[LevelNum];
|
||||||
return Default.LevelCosts[Default.LevelCosts.Length-1];
|
return Default.LevelCosts[Default.LevelCosts.Length-1];
|
||||||
}
|
}
|
||||||
@ -82,12 +82,12 @@ static function int GetTraitCost( byte LevelNum )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Trait initialization/cleanup.
|
// Trait initialization/cleanup.
|
||||||
static function Ext_TraitDataStore InitializeFor( Ext_PerkBase Perk, ExtPlayerController Player )
|
static function Ext_TraitDataStore InitializeFor(Ext_PerkBase Perk, ExtPlayerController Player)
|
||||||
{
|
{
|
||||||
local Ext_TraitDataStore T;
|
local Ext_TraitDataStore T;
|
||||||
|
|
||||||
T = None;
|
T = None;
|
||||||
if( Default.TraitData!=None )
|
if(Default.TraitData!=None)
|
||||||
{
|
{
|
||||||
T = Player.Spawn(Default.TraitData,Player);
|
T = Player.Spawn(Default.TraitData,Player);
|
||||||
T.Perk = Perk;
|
T.Perk = Perk;
|
||||||
@ -96,33 +96,33 @@ static function Ext_TraitDataStore InitializeFor( Ext_PerkBase Perk, ExtPlayerCo
|
|||||||
}
|
}
|
||||||
return T;
|
return T;
|
||||||
}
|
}
|
||||||
static function CleanupTrait( ExtPlayerController Player, Ext_PerkBase Perk, optional Ext_TraitDataStore Data )
|
static function CleanupTrait(ExtPlayerController Player, Ext_PerkBase Perk, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
if( Data!=None )
|
if(Data!=None)
|
||||||
Data.Destroy();
|
Data.Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when trait is first activated/deactivated (might even have a dead pawn).
|
// Called when trait is first activated/deactivated (might even have a dead pawn).
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data );
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data);
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data );
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data);
|
||||||
|
|
||||||
// Called everytime player spawns in on the game (cancel effect is called on level up/level reset/perk change).
|
// Called everytime player spawns in on the game (cancel effect is called on level up/level reset/perk change).
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data );
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data);
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data );
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data);
|
||||||
|
|
||||||
// Owner died with this trait active.
|
// Owner died with this trait active.
|
||||||
static function PlayerDied( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data );
|
static function PlayerDied(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data);
|
||||||
|
|
||||||
// Prevent death.
|
// Prevent death.
|
||||||
static function bool PreventDeath( KFPawn_Human Player, Controller Instigator, Class<DamageType> DamType, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data );
|
static function bool PreventDeath(KFPawn_Human Player, Controller Instigator, Class<DamageType> DamType, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data);
|
||||||
|
|
||||||
// Give/modify default inventory.
|
// Give/modify default inventory.
|
||||||
static function AddDefaultInventory( KFPawn Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data );
|
static function AddDefaultInventory(KFPawn Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data);
|
||||||
|
|
||||||
// Data that server should replicate to client.
|
// Data that server should replicate to client.
|
||||||
static final function string IntToStr( int Value, optional byte MaxVal ) // Helper function to put integer into one character of string.
|
static final function string IntToStr(int Value, optional byte MaxVal) // Helper function to put integer into one character of string.
|
||||||
{
|
{
|
||||||
switch( MaxVal )
|
switch(MaxVal)
|
||||||
{
|
{
|
||||||
case 0: // 0-65535
|
case 0: // 0-65535
|
||||||
return Chr(Max(Value,0)+1);
|
return Chr(Max(Value,0)+1);
|
||||||
@ -130,15 +130,15 @@ static final function string IntToStr( int Value, optional byte MaxVal ) // Help
|
|||||||
return Chr((Value & 32767)+1) $ Chr(((Value >> 15) & 32767)+1);
|
return Chr((Value & 32767)+1) $ Chr(((Value >> 15) & 32767)+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static final function string InlineString( string Str ) // Helper function to append a string line to a text using a length char in front.
|
static final function string InlineString(string Str) // Helper function to append a string line to a text using a length char in front.
|
||||||
{
|
{
|
||||||
return IntToStr(Len(Str))$Str;
|
return IntToStr(Len(Str))$Str;
|
||||||
}
|
}
|
||||||
static final function int StrToInt( out string Value, optional byte MaxVal ) // Reverse.
|
static final function int StrToInt(out string Value, optional byte MaxVal) // Reverse.
|
||||||
{
|
{
|
||||||
local int Res;
|
local int Res;
|
||||||
|
|
||||||
switch( MaxVal )
|
switch(MaxVal)
|
||||||
{
|
{
|
||||||
case 0: // 0-65535
|
case 0: // 0-65535
|
||||||
Res = Asc(Left(Value,1))-1;
|
Res = Asc(Left(Value,1))-1;
|
||||||
@ -151,7 +151,7 @@ static final function int StrToInt( out string Value, optional byte MaxVal ) //
|
|||||||
}
|
}
|
||||||
return Res;
|
return Res;
|
||||||
}
|
}
|
||||||
static final function string GetInlineStr( out string S ) // Reverse.
|
static final function string GetInlineStr(out string S) // Reverse.
|
||||||
{
|
{
|
||||||
local int l;
|
local int l;
|
||||||
local string Res;
|
local string Res;
|
||||||
@ -168,17 +168,17 @@ static function string GetRepData()
|
|||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
S = IntToStr(Default.MinLevel)$IntToStr(Default.LevelCosts.Length);
|
S = IntToStr(Default.MinLevel)$IntToStr(Default.LevelCosts.Length);
|
||||||
for( i=0; i<Default.LevelCosts.Length; ++i )
|
for(i=0; i<Default.LevelCosts.Length; ++i)
|
||||||
S $= IntToStr(Default.LevelCosts[i]);
|
S $= IntToStr(Default.LevelCosts[i]);
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
static function string ClientSetRepData( string S )
|
static function string ClientSetRepData(string S)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
Default.MinLevel = StrToInt(S);
|
Default.MinLevel = StrToInt(S);
|
||||||
Default.LevelCosts.Length = StrToInt(S);
|
Default.LevelCosts.Length = StrToInt(S);
|
||||||
for( i=0; i<Default.LevelCosts.Length; ++i )
|
for(i=0; i<Default.LevelCosts.Length; ++i)
|
||||||
Default.LevelCosts[i] = StrToInt(S);
|
Default.LevelCosts[i] = StrToInt(S);
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
@ -186,16 +186,16 @@ static function string ClientSetRepData( string S )
|
|||||||
// Configure initialization.
|
// Configure initialization.
|
||||||
static function CheckConfig()
|
static function CheckConfig()
|
||||||
{
|
{
|
||||||
if( Default.ConfigVersion!=Default.CurrentConfigVer )
|
if(Default.ConfigVersion!=Default.CurrentConfigVer)
|
||||||
{
|
{
|
||||||
UpdateConfigs(Default.ConfigVersion);
|
UpdateConfigs(Default.ConfigVersion);
|
||||||
Default.ConfigVersion = Default.CurrentConfigVer;
|
Default.ConfigVersion = Default.CurrentConfigVer;
|
||||||
StaticSaveConfig();
|
StaticSaveConfig();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static function UpdateConfigs( int OldVer )
|
static function UpdateConfigs(int OldVer)
|
||||||
{
|
{
|
||||||
if( OldVer==0 )
|
if(OldVer==0)
|
||||||
{
|
{
|
||||||
Default.LevelCosts = Default.DefLevelCosts;
|
Default.LevelCosts = Default.DefLevelCosts;
|
||||||
Default.MinLevel = Default.DefMinLevel;
|
Default.MinLevel = Default.DefMinLevel;
|
||||||
@ -203,13 +203,13 @@ static function UpdateConfigs( int OldVer )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// WebAdmin UI
|
// WebAdmin UI
|
||||||
static function InitWebAdmin( ExtWebAdmin_UI UI )
|
static function InitWebAdmin(ExtWebAdmin_UI UI)
|
||||||
{
|
{
|
||||||
UI.AddSettingsPage("Trait "$Default.TraitName,Default.Class,Default.WebConfigs,GetValue,ApplyValue);
|
UI.AddSettingsPage("Trait "$Default.TraitName,Default.Class,Default.WebConfigs,GetValue,ApplyValue);
|
||||||
}
|
}
|
||||||
static function string GetValue( name PropName, int ElementIndex )
|
static function string GetValue(name PropName, int ElementIndex)
|
||||||
{
|
{
|
||||||
switch( PropName )
|
switch(PropName)
|
||||||
{
|
{
|
||||||
case 'MinLevel':
|
case 'MinLevel':
|
||||||
return string(Default.MinLevel);
|
return string(Default.MinLevel);
|
||||||
@ -219,15 +219,15 @@ static function string GetValue( name PropName, int ElementIndex )
|
|||||||
return string(Default.bDisabled);
|
return string(Default.bDisabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static function ApplyValue( name PropName, int ElementIndex, string Value )
|
static function ApplyValue(name PropName, int ElementIndex, string Value)
|
||||||
{
|
{
|
||||||
switch( PropName )
|
switch(PropName)
|
||||||
{
|
{
|
||||||
case 'MinLevel':
|
case 'MinLevel':
|
||||||
Default.MinLevel = int(Value); break;
|
Default.MinLevel = int(Value); break;
|
||||||
case 'LevelCosts':
|
case 'LevelCosts':
|
||||||
Default.LevelCosts.Length = Default.DefLevelCosts.Length;
|
Default.LevelCosts.Length = Default.DefLevelCosts.Length;
|
||||||
if( Value!="#DELETE" && ElementIndex<Default.LevelCosts.Length )
|
if(Value!="#DELETE" && ElementIndex<Default.LevelCosts.Length)
|
||||||
Default.LevelCosts[ElementIndex] = int(Value);
|
Default.LevelCosts[ElementIndex] = int(Value);
|
||||||
break;
|
break;
|
||||||
case 'bDisabled':
|
case 'bDisabled':
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
Class Ext_TraitBoomWeld extends Ext_TraitBase
|
Class Ext_TraitBoomWeld extends Ext_TraitBase
|
||||||
abstract;
|
abstract;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.bExplosiveWeld = true;
|
Perk.bExplosiveWeld = true;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.bExplosiveWeld = false;
|
Perk.bExplosiveWeld = false;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
Class Ext_TraitBunnyHop extends Ext_TraitBase;
|
Class Ext_TraitBunnyHop extends Ext_TraitBase;
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
if( ExtHumanPawn(Player)!=None )
|
if(ExtHumanPawn(Player)!=None)
|
||||||
ExtHumanPawn(Player).bHasBunnyHop = true;
|
ExtHumanPawn(Player).bHasBunnyHop = true;
|
||||||
}
|
}
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
if( ExtHumanPawn(Player)!=None )
|
if(ExtHumanPawn(Player)!=None)
|
||||||
ExtHumanPawn(Player).bHasBunnyHop = false;
|
ExtHumanPawn(Player).bHasBunnyHop = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,20 +2,20 @@ Class Ext_TraitCarryCap extends Ext_TraitBase;
|
|||||||
|
|
||||||
var array<byte> CarryAdds;
|
var array<byte> CarryAdds;
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local KFInventoryManager M;
|
local KFInventoryManager M;
|
||||||
|
|
||||||
M = KFInventoryManager(Player.InvManager);
|
M = KFInventoryManager(Player.InvManager);
|
||||||
if( M!=None )
|
if(M!=None)
|
||||||
M.MaxCarryBlocks = M.Default.MaxCarryBlocks+Default.CarryAdds[Level-1];
|
M.MaxCarryBlocks = M.Default.MaxCarryBlocks+Default.CarryAdds[Level-1];
|
||||||
}
|
}
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local KFInventoryManager M;
|
local KFInventoryManager M;
|
||||||
|
|
||||||
M = KFInventoryManager(Player.InvManager);
|
M = KFInventoryManager(Player.InvManager);
|
||||||
if( M!=None )
|
if(M!=None)
|
||||||
M.MaxCarryBlocks = M.Default.MaxCarryBlocks;
|
M.MaxCarryBlocks = M.Default.MaxCarryBlocks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Class Ext_TraitContactNade extends Ext_TraitBase;
|
Class Ext_TraitContactNade extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.bExplodeOnContact = true;
|
Perk.bExplodeOnContact = true;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.bExplodeOnContact = false;
|
Perk.bExplodeOnContact = false;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
Class Ext_TraitDemoAOE extends Ext_TraitBase;
|
Class Ext_TraitDemoAOE extends Ext_TraitBase;
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkDemolition(Perk).AOEMult = 1 + (0.15 + (((float(Level) - 1.f) * 5.f) / 100.f));
|
Ext_PerkDemolition(Perk).AOEMult = 1 + (0.15 + (((float(Level) - 1.f) * 5.f) / 100.f));
|
||||||
}
|
}
|
||||||
|
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkDemolition(Perk).AOEMult = 1.0f;
|
Ext_PerkDemolition(Perk).AOEMult = 1.0f;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Class Ext_TraitDemoCriticalHit extends Ext_TraitBase;
|
Class Ext_TraitDemoCriticalHit extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkDemolition(Perk).bCriticalHit = true;
|
Ext_PerkDemolition(Perk).bCriticalHit = true;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkDemolition(Perk).bCriticalHit = false;
|
Ext_PerkDemolition(Perk).bCriticalHit = false;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Class Ext_TraitDemoDirectHit extends Ext_TraitBase;
|
Class Ext_TraitDemoDirectHit extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkDemolition(Perk).bDirectHit = true;
|
Ext_PerkDemolition(Perk).bDirectHit = true;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkDemolition(Perk).bDirectHit = false;
|
Ext_PerkDemolition(Perk).bDirectHit = false;
|
||||||
}
|
}
|
||||||
|
@ -9,41 +9,41 @@ static function string GetPerkDescription()
|
|||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk )
|
static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
if( Perk.CurrentLevel<Default.MinLevel || Perk.CurrentPrestige<3 )
|
if(Perk.CurrentLevel<Default.MinLevel || Perk.CurrentPrestige<3)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( Lvl==0 )
|
if(Lvl==0)
|
||||||
{
|
{
|
||||||
i = Perk.PerkStats.Find('StatType','Damage');
|
i = Perk.PerkStats.Find('StatType','Damage');
|
||||||
if( i>=0 )
|
if(i>=0)
|
||||||
return (Perk.PerkStats[i].CurrentValue>=30);
|
return (Perk.PerkStats[i].CurrentValue>=30);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local ExtPlayerReplicationInfo MyPRI;
|
local ExtPlayerReplicationInfo MyPRI;
|
||||||
|
|
||||||
MyPRI = ExtPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo);
|
MyPRI = ExtPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo);
|
||||||
if( MyPRI == None || Ext_PerkDemolition(Perk) == None )
|
if(MyPRI == None || Ext_PerkDemolition(Perk) == None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MyPRI.bNukeActive = true;
|
MyPRI.bNukeActive = true;
|
||||||
Ext_PerkDemolition(Perk).NukeDamageMult = 1.0 + (((float(Level) - 1.f) * 5.f) / 100.f);
|
Ext_PerkDemolition(Perk).NukeDamageMult = 1.0 + (((float(Level) - 1.f) * 5.f) / 100.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local ExtPlayerReplicationInfo MyPRI;
|
local ExtPlayerReplicationInfo MyPRI;
|
||||||
|
|
||||||
MyPRI = ExtPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo);
|
MyPRI = ExtPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo);
|
||||||
if( MyPRI == None || Ext_PerkDemolition(Perk) == None )
|
if(MyPRI == None || Ext_PerkDemolition(Perk) == None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MyPRI.bNukeActive = false;
|
MyPRI.bNukeActive = false;
|
||||||
|
@ -9,29 +9,29 @@ static function string GetPerkDescription()
|
|||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk )
|
static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
|
|
||||||
if( Perk.CurrentLevel<Default.MinLevel || Perk.CurrentPrestige<3 )
|
if(Perk.CurrentLevel<Default.MinLevel || Perk.CurrentPrestige<3)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( Lvl==0 )
|
if(Lvl==0)
|
||||||
{
|
{
|
||||||
i = Perk.PerkStats.Find('StatType','Reload');
|
i = Perk.PerkStats.Find('StatType','Reload');
|
||||||
if( i>=0 )
|
if(i>=0)
|
||||||
return (Perk.PerkStats[i].CurrentValue>=30);
|
return (Perk.PerkStats[i].CurrentValue>=30);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkDemolition(Perk).bProfessionalActive = true;
|
Ext_PerkDemolition(Perk).bProfessionalActive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkDemolition(Perk).bProfessionalActive = false;
|
Ext_PerkDemolition(Perk).bProfessionalActive = false;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Class Ext_TraitDemoReactiveArmor extends Ext_TraitBase;
|
Class Ext_TraitDemoReactiveArmor extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkDemolition(Perk).bCanUseSacrifice = true;
|
Ext_PerkDemolition(Perk).bCanUseSacrifice = true;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkDemolition(Perk).bCanUseSacrifice = false;
|
Ext_PerkDemolition(Perk).bCanUseSacrifice = false;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Class Ext_TraitDireReload extends Ext_TraitBase;
|
Class Ext_TraitDireReload extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkSharpshooter(Perk).bHasDireReload = true;
|
Ext_PerkSharpshooter(Perk).bHasDireReload = true;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkSharpshooter(Perk).bHasDireReload = false;
|
Ext_PerkSharpshooter(Perk).bHasDireReload = false;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
Class Ext_TraitDoorRepair extends Ext_TraitBase;
|
Class Ext_TraitDoorRepair extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkSupport(Perk).bCanRepairDoors = true;
|
Ext_PerkSupport(Perk).bCanRepairDoors = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkSupport(Perk).bCanRepairDoors = false;
|
Ext_PerkSupport(Perk).bCanRepairDoors = false;
|
||||||
}
|
}
|
||||||
|
@ -2,14 +2,14 @@ Class Ext_TraitDuracell extends Ext_TraitBase;
|
|||||||
|
|
||||||
var array<float> BatteryCharges;
|
var array<float> BatteryCharges;
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
if( ExtHumanPawn(Player)!=None )
|
if(ExtHumanPawn(Player)!=None)
|
||||||
ExtHumanPawn(Player).SetBatteryRate(Default.BatteryCharges[Level-1]);
|
ExtHumanPawn(Player).SetBatteryRate(Default.BatteryCharges[Level-1]);
|
||||||
}
|
}
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
if( ExtHumanPawn(Player)!=None )
|
if(ExtHumanPawn(Player)!=None)
|
||||||
ExtHumanPawn(Player).SetBatteryRate(1.f);
|
ExtHumanPawn(Player).SetBatteryRate(1.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Class Ext_TraitEliteReload extends Ext_TraitBase;
|
Class Ext_TraitEliteReload extends Ext_TraitBase;
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.bTacticalReload = true;
|
Perk.bTacticalReload = true;
|
||||||
}
|
}
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.bTacticalReload = false;
|
Perk.bTacticalReload = false;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Class Ext_TraitEnemyHP extends Ext_TraitBase;
|
Class Ext_TraitEnemyHP extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.EnemyHealthRange = Level;
|
Perk.EnemyHealthRange = Level;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.EnemyHealthRange = 0;
|
Perk.EnemyHealthRange = 0;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Class Ext_TraitFanfire extends Ext_TraitBase;
|
Class Ext_TraitFanfire extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkGunslinger(Perk).bHasFanfire = true;
|
Ext_PerkGunslinger(Perk).bHasFanfire = true;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkGunslinger(Perk).bHasFanfire = false;
|
Ext_PerkGunslinger(Perk).bHasFanfire = false;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Class Ext_TraitFireExplode extends Ext_TraitBase;
|
Class Ext_TraitFireExplode extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.bFireExplode = true;
|
Perk.bFireExplode = true;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.bFireExplode = false;
|
Perk.bFireExplode = false;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Class Ext_TraitFireRange extends Ext_TraitBase;
|
Class Ext_TraitFireRange extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
KFPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo).bExtraFireRange = true;
|
KFPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo).bExtraFireRange = true;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
KFPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo).bExtraFireRange = false;
|
KFPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo).bExtraFireRange = false;
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
Class Ext_TraitGhost extends Ext_TraitBase;
|
Class Ext_TraitGhost extends Ext_TraitBase;
|
||||||
|
|
||||||
static function bool PreventDeath( KFPawn_Human Player, Controller Instigator, Class<DamageType> DamType, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function bool PreventDeath(KFPawn_Human Player, Controller Instigator, Class<DamageType> DamType, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local Controller C;
|
local Controller C;
|
||||||
|
|
||||||
if( (Instigator==None || Instigator==Player.Controller) && DamType==Class'DmgType_Suicided' )
|
if((Instigator==None || Instigator==Player.Controller) && DamType==Class'DmgType_Suicided')
|
||||||
return false; // Allow normal suicide to go ahead.
|
return false; // Allow normal suicide to go ahead.
|
||||||
|
|
||||||
if( Ext_T_GhostHelper(Data).CanResPlayer(Player,Level) )
|
if(Ext_T_GhostHelper(Data).CanResPlayer(Player,Level))
|
||||||
{
|
{
|
||||||
// Abort current special move
|
// Abort current special move
|
||||||
if( Player.IsDoingSpecialMove() )
|
if(Player.IsDoingSpecialMove())
|
||||||
Player.SpecialMoveHandler.EndSpecialMove();
|
Player.SpecialMoveHandler.EndSpecialMove();
|
||||||
|
|
||||||
// Notify AI to stop hunting me.
|
// Notify AI to stop hunting me.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
Class Ext_TraitGrenadeCap extends Ext_TraitCarryCap;
|
Class Ext_TraitGrenadeCap extends Ext_TraitCarryCap;
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data );
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data);
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data );
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data);
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.PerkManager.SetGrenadeCap(Default.CarryAdds[Level-1]);
|
Perk.PerkManager.SetGrenadeCap(Default.CarryAdds[Level-1]);
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.PerkManager.SetGrenadeCap(0);
|
Perk.PerkManager.SetGrenadeCap(0);
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
Class Ext_TraitGrenadeSUpg extends Ext_TraitBase;
|
Class Ext_TraitGrenadeSUpg extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
if( Level==1 )
|
if(Level==1)
|
||||||
Perk.GrenadeClass = Perk.SuperGrenade;
|
Perk.GrenadeClass = Perk.SuperGrenade;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.GrenadeClass = Perk.Default.GrenadeClass;
|
Perk.GrenadeClass = Perk.Default.GrenadeClass;
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
Class Ext_TraitGrenadeUpg extends Ext_TraitBase;
|
Class Ext_TraitGrenadeUpg extends Ext_TraitBase;
|
||||||
|
|
||||||
static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk )
|
static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
if( Lvl>=1 && Perk.CurrentLevel<50 )
|
if(Lvl>=1 && Perk.CurrentLevel<50)
|
||||||
return false;
|
return false;
|
||||||
return Super.MeetsRequirements(Lvl,Perk);
|
return Super.MeetsRequirements(Lvl,Perk);
|
||||||
}
|
}
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
if( Level==1 )
|
if(Level==1)
|
||||||
Perk.GrenadeClass = Perk.PerkGrenade;
|
Perk.GrenadeClass = Perk.PerkGrenade;
|
||||||
else if( Level==2 )
|
else if(Level==2)
|
||||||
Perk.GrenadeClass = Perk.SuperGrenade;
|
Perk.GrenadeClass = Perk.SuperGrenade;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.GrenadeClass = Perk.Default.GrenadeClass;
|
Perk.GrenadeClass = Perk.Default.GrenadeClass;
|
||||||
}
|
}
|
||||||
|
@ -2,15 +2,15 @@ Class Ext_TraitHealthReg extends Ext_TraitBase;
|
|||||||
|
|
||||||
var array<byte> RegenValues;
|
var array<byte> RegenValues;
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local Ext_T_HealthRegHelp H;
|
local Ext_T_HealthRegHelp H;
|
||||||
|
|
||||||
H = Player.Spawn(class'Ext_T_HealthRegHelp',Player);
|
H = Player.Spawn(class'Ext_T_HealthRegHelp',Player);
|
||||||
if( H!=None )
|
if(H!=None)
|
||||||
H.RegCount = Default.RegenValues[Level-1];
|
H.RegCount = Default.RegenValues[Level-1];
|
||||||
}
|
}
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
local Ext_T_HealthRegHelp H;
|
local Ext_T_HealthRegHelp H;
|
||||||
|
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
Class Ext_TraitHeavyArmor extends Ext_TraitBase;
|
Class Ext_TraitHeavyArmor extends Ext_TraitBase;
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.bHeavyArmor = true;
|
Perk.bHeavyArmor = true;
|
||||||
}
|
}
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Perk.bHeavyArmor = false;
|
Perk.bHeavyArmor = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
if( Level <= 1 )
|
if(Level <= 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Level == 2 ? Player.AddArmor(50) : Player.AddArmor(Player.MaxArmor);
|
Level == 2 ? Player.AddArmor(50) : Player.AddArmor(Player.MaxArmor);
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
Class Ext_TraitKnockback extends Ext_TraitRagdoll;
|
Class Ext_TraitKnockback extends Ext_TraitRagdoll;
|
||||||
|
|
||||||
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
if( ExtHumanPawn(Player)!=None )
|
if(ExtHumanPawn(Player)!=None)
|
||||||
ExtHumanPawn(Player).KnockbackResist = Default.ChanceValues[Level-1];
|
ExtHumanPawn(Player).KnockbackResist = Default.ChanceValues[Level-1];
|
||||||
}
|
}
|
||||||
static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
if( ExtHumanPawn(Player)!=None )
|
if(ExtHumanPawn(Player)!=None)
|
||||||
ExtHumanPawn(Player).KnockbackResist = 1.f;
|
ExtHumanPawn(Player).KnockbackResist = 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,20 +9,20 @@ static function string GetPerkDescription()
|
|||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk )
|
static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
if( Perk.CurrentLevel<Default.MinLevel || Perk.CurrentPrestige<2 )
|
if(Perk.CurrentLevel<Default.MinLevel || Perk.CurrentPrestige<2)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkCommando(Perk).bUseMachineGunner = true;
|
Ext_PerkCommando(Perk).bUseMachineGunner = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
Ext_PerkCommando(Perk).bUseMachineGunner = false;
|
Ext_PerkCommando(Perk).bUseMachineGunner = false;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user