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
7 changes: 4 additions & 3 deletions src/public/jigglebones.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,14 +588,15 @@ void CJiggleBones::BuildJiggleTransformations( int boneIndex, float currenttime,

data->lastBoingPos = goalBasePosition;

float speed = vel.NormalizeInPlace();
if ( speed < 0.00001f )
float speed;
if ( vel.IsZero() )
Comment on lines +591 to +592

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the whitespace

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not to be rude at all, just because the author is not a developer, I would recommend to "suggest" changes directly on the comment, so the author only has to "accept" the change and that's it! Github has the suggestion usage on the markdown code and comment formatting section, and it is awesome!

Suggested change
float speed;
if ( vel.IsZero() )
float speed;
if ( vel.IsZero() )

{
vel = Vector( 0, 0, 1.0f );
speed = 0.0f;
}
else
{
speed = vel.NormalizeInPlace();
speed /= deltaT;
}

Expand Down Expand Up @@ -674,7 +675,7 @@ void CJiggleBones::BuildJiggleTransformations( int boneIndex, float currenttime,
boingSide = CrossProduct( data->boingDir, Vector( 0, 0, 1.0f ) );
}
boingSide.NormalizeInPlace();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the whitespace/unrelated change

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Vector boingOtherSide = CrossProduct( data->boingDir, boingSide );

matrix3x4_t xfrmToBoingCoordsMX;
Expand Down