Skip to content

Commit

Permalink
fix crash from partIdx -1 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmriggs authored May 25, 2021
1 parent cc7bbfc commit 9559027
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ACViewer/Physics/PhysicsObj.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ public void TurnToObject_Internal(uint objectID, uint topLevelID, MovementParame

public void UpdateChild(PhysicsObj childObj, int partIdx, AFrame childFrame)
{
var frame = partIdx >= PartArray.NumParts ?
var frame = partIdx == -1 || partIdx >= PartArray.NumParts ?
AFrame.Combine(Position.Frame, childFrame) : AFrame.Combine(PartArray.Parts[partIdx].Pos.Frame, childFrame);

childObj.set_frame(frame);
Expand Down

0 comments on commit 9559027

Please sign in to comment.