Skip to content

Commit

Permalink
Solves Issue X2CommunityCore#271
Browse files Browse the repository at this point in the history
Adds a DLCInfo hook to XComHumanPawn:UpdateAnimations
  • Loading branch information
Musashi1584 committed Aug 1, 2017
1 parent 8f2cf29 commit 4ddf650
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
10 changes: 5 additions & 5 deletions X2CommunityHighlander.XCOM_sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# XCOM ModBuddy Solution File, Format Version 11.00
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{5DAE07AF-E217-45C1-8DE7-FF99D6011E8A}") = "X2CommunityHighlander", "X2CommunityHighlander\X2CommunityHighlander.x2proj", "{D9823686-9E9B-480A-8036-FD6C01870FF8}"
Project("{5DAE07AF-E217-45C1-8DE7-FF99D6011E8A}") = "X2CommunityHighlander", "X2CommunityHighlander\X2CommunityHighlander.x2proj", "{63822BD3-E02C-499B-9328-628A89D1DFE1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|XCOM 2 = Debug|XCOM 2
Default|XCOM 2 = Default|XCOM 2
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D9823686-9E9B-480A-8036-FD6C01870FF8}.Debug|XCOM 2.ActiveCfg = Debug|XCOM 2
{D9823686-9E9B-480A-8036-FD6C01870FF8}.Debug|XCOM 2.Build.0 = Debug|XCOM 2
{D9823686-9E9B-480A-8036-FD6C01870FF8}.Default|XCOM 2.ActiveCfg = Default|XCOM 2
{D9823686-9E9B-480A-8036-FD6C01870FF8}.Default|XCOM 2.Build.0 = Default|XCOM 2
{63822BD3-E02C-499B-9328-628A89D1DFE1}.Debug|XCOM 2.ActiveCfg = Debug|XCOM 2
{63822BD3-E02C-499B-9328-628A89D1DFE1}.Debug|XCOM 2.Build.0 = Debug|XCOM 2
{63822BD3-E02C-499B-9328-628A89D1DFE1}.Default|XCOM 2.ActiveCfg = Default|XCOM 2
{63822BD3-E02C-499B-9328-628A89D1DFE1}.Default|XCOM 2.Build.0 = Default|XCOM 2
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,3 +451,14 @@ static function int RemoveDoomFromFortress(XComGameState_HeadquartersAlien Alien
return 0;
}
/// End Issue #230

/// Start Issue #271
/// <summary>
/// Called from XComHumanPawn:UpdateAnimations
/// CustomAnimSets will be added to the pawns animsets
/// </summary>
static function UpdateAnimations(out array<AnimSet> CustomAnimSets, XComGameState_Unit UnitState, XComHumanPawn Pawn)
{

}
/// End Issue #271
18 changes: 18 additions & 0 deletions X2CommunityHighlander/Src/XComGame/Classes/XComHumanPawn.uc
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,12 @@ simulated exec function UpdateAnimations()
{
local CustomAnimParams AnimParams, RemoveParams;

// Variables for Issue #271
local array<X2DownloadableContentInfo> DLCInfos;
local array<AnimSet> CustomAnimSets;
local XComGameState_Unit UnitState;
local int i;

super.UpdateAnimations();

if( TorsoContent != none && TorsoContent.UnitPawnAnimSets.Length > 0 )
Expand All @@ -452,6 +458,18 @@ simulated exec function UpdateAnimations()
}

XComReaddCarryAnimSets();

// Start Issue #271
DLCInfos = `ONLINEEVENTMGR.GetDLCInfos(false);
UnitState = XComGameState_Unit(`XCOMHISTORY.GetGameStateForObjectID(ObjectID));
for(i = 0; i < DLCInfos.Length; ++i)
{
CustomAnimSets.Length = 0;
DLCInfos[i].UpdateAnimations(CustomAnimSets, UnitState, self);
if (CustomAnimSets.Length > 0)
XComAddAnimSetsExternal(CustomAnimSets);
}
// End Issue #271
}

simulated function AddRequiredAnimSets()
Expand Down

0 comments on commit 4ddf650

Please sign in to comment.