mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-05 06:44:56 +08:00
[c][cpp] Fix path constraint for when path length is NaN.
This commit is contained in:
parent
55f4a2968b
commit
503cdb81f4
@ -267,7 +267,7 @@ float* spPathConstraint_computeWorldPositions(spPathConstraint* self, spPathAtta
|
||||
pathLength = lengths[curveCount];
|
||||
if (percentPosition) position *= pathLength;
|
||||
if (percentSpacing) {
|
||||
for (i = 0; i < spacesCount; i++)
|
||||
for (i = 1; i < spacesCount; i++)
|
||||
spaces[i] *= pathLength;
|
||||
}
|
||||
if (self->worldCount != 8) {
|
||||
@ -397,7 +397,7 @@ float* spPathConstraint_computeWorldPositions(spPathConstraint* self, spPathAtta
|
||||
else
|
||||
position *= pathLength / path->lengths[curveCount - 1];
|
||||
if (percentSpacing) {
|
||||
for (i = 0; i < spacesCount; i++)
|
||||
for (i = 1; i < spacesCount; i++)
|
||||
spaces[i] *= pathLength;
|
||||
}
|
||||
|
||||
|
||||
@ -288,7 +288,7 @@ PathConstraint::computeWorldPositions(PathAttachment &path, int spacesCount, boo
|
||||
}
|
||||
|
||||
if (percentSpacing) {
|
||||
for (int i = 0; i < spacesCount; ++i) {
|
||||
for (int i = 1; i < spacesCount; ++i) {
|
||||
_spaces[i] *= pathLength;
|
||||
}
|
||||
}
|
||||
@ -417,7 +417,7 @@ PathConstraint::computeWorldPositions(PathAttachment &path, int spacesCount, boo
|
||||
}
|
||||
|
||||
if (percentSpacing) {
|
||||
for (int i = 0; i < spacesCount; ++i) {
|
||||
for (int i = 1; i < spacesCount; ++i) {
|
||||
_spaces[i] *= pathLength;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user