Skip to content

Commit

Permalink
Align random treasure to surface below, not just marker
Browse files Browse the repository at this point in the history
Some markers in gamedata are not well aligned. This second alignment will make treasure flush with surface below.
  • Loading branch information
Interkarma committed May 4, 2022
1 parent 30cfde2 commit 923e1f7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Assets/Scripts/Utility/RDBLayout.cs
Expand Up @@ -1620,6 +1620,14 @@ private static void AddFixedRDBEnemy(DFBlock.RdbObject obj, Transform parent, re
adjustPosition);
}

// Also Adjust random treasure to surface below so it doesn't end up floating if marker is floating
if (adjustPosition && loot)
{
Billboard dfBillboard = loot.gameObject.GetComponent<Billboard>();
if (dfBillboard)
GameObjectHelper.AlignBillboardToGround(dfBillboard.gameObject, dfBillboard.Summary.Size, 4);
}

// Get dungeon type index
int dungeonIndex = (int)dungeonType;

Expand Down

0 comments on commit 923e1f7

Please sign in to comment.