Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions FA2sp/Ext/CLoading/Body.LoadObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,15 @@ void CLoadingExt::LoadBuilding_Normal(const FString& ID, bool loadAsGarrisonDama
FString TurName = Variables::RulesMap.GetString(ID, "TurretAnim", ID + "TUR");
int nStartFrame = CINI::Art->GetInteger(TurName, "LoopStart");
bool shadow = bHasShadow && CINI::Art->GetBool(TurName, "Shadow", true) && ExtConfigs::InGameDisplay_Shadow;
int actualFacings = CINI::Art->GetInteger(TurName, "Facings", 32);
int actualFacings = 0;
if (CINI::Art->KeyExists(TurName, "LoopEnd"))
{
actualFacings = CINI::Art->GetInteger(TurName, "LoopEnd") - nStartFrame;
}
if (actualFacings <= 0)
{
actualFacings = CINI::Art->GetInteger(TurName, "Facings", 32);
}
int idleFrames = Variables::RulesMap.GetInteger(ID, "TurretAnim.IdleFrames", 1);

bool hasBarl = false;
Expand Down Expand Up @@ -1549,7 +1557,15 @@ void CLoadingExt::LoadBuilding_Damaged(const FString& ID, bool loadAsRubble)
ID + "TUR");
int nStartFrame = CINI::Art->GetInteger(TurName, "LoopStart");
bool shadow = bHasShadow && CINI::Art->GetBool(TurName, "Shadow", true) && ExtConfigs::InGameDisplay_Shadow;
int actualFacings = CINI::Art->GetInteger(TurName, "Facings", 32);
int actualFacings = 0;
if (CINI::Art->KeyExists(TurName, "LoopEnd"))
{
actualFacings = CINI::Art->GetInteger(TurName, "LoopEnd") - nStartFrame;
}
if (actualFacings <= 0)
{
actualFacings = CINI::Art->GetInteger(TurName, "Facings", 32);
}
int idleFrames = Variables::RulesMap.GetInteger(ID, "TurretAnim.IdleFrames", 1);

bool hasBarl = false;
Expand Down
Loading