Skip to content

Commit

Permalink
fix: Game crashed when ponytail in extended variants is enabled and p…
Browse files Browse the repository at this point in the history
…layer is in feather
  • Loading branch information
WEGFan committed Jan 9, 2022
1 parent bb03d74 commit 43af627
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/Modules/TrailineTrailManager.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
Expand Down Expand Up @@ -70,8 +71,7 @@ private void BeforeRender() {

// count how many hair nodes should be used to draw trail
int drawNodesCount = 1;
int originalHairCount = hair.Sprite.HairCount;
for (int j = 1; j < originalHairCount; j++) {
for (int j = 1; j < Math.Min(hair.Sprite.HairCount, nodes.Count); j++) {
// calculate node's position and size
MTexture hairTexture = hair.GetHairTexture(j);
Vector2 hairScale = hair.PublicGetHairScale(j).Abs();
Expand Down

0 comments on commit 43af627

Please sign in to comment.