Skip to content

Commit 95798d4

Browse files
committed
Should scale pre, not post-rotation
1 parent ed8b5e4 commit 95798d4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Source/Entities/LimbPath.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ void LimbPath::Destroy(bool notInherited) {
202202
Vector LimbPath::GetProgressPos() {
203203
Vector returnVec(m_Start);
204204
if (IsStaticPoint()) {
205-
return m_JointPos + (RotatePoint(returnVec) * GetTotalScaleMultiplier());
205+
return m_JointPos + (RotatePoint(returnVec * GetTotalScaleMultiplier()));
206206
}
207207

208208
// Add all the segments before the current one
@@ -216,13 +216,13 @@ Vector LimbPath::GetProgressPos() {
216216
returnVec += *m_CurrentSegment * m_SegProgress;
217217
}
218218

219-
return m_JointPos + (RotatePoint(returnVec) * GetTotalScaleMultiplier());
219+
return m_JointPos + (RotatePoint(returnVec * GetTotalScaleMultiplier()));
220220
}
221221

222222
Vector LimbPath::GetCurrentSegTarget() {
223223
Vector returnVec(m_Start);
224224
if (IsStaticPoint()) {
225-
return m_JointPos + (RotatePoint(returnVec) * GetTotalScaleMultiplier());
225+
return m_JointPos + (RotatePoint(returnVec * GetTotalScaleMultiplier()));
226226
}
227227

228228
std::deque<Vector>::const_iterator itr;
@@ -235,7 +235,7 @@ Vector LimbPath::GetCurrentSegTarget() {
235235
returnVec += *m_CurrentSegment;
236236
}
237237

238-
return m_JointPos + (RotatePoint(returnVec) * GetTotalScaleMultiplier());
238+
return m_JointPos + (RotatePoint(returnVec * GetTotalScaleMultiplier()));
239239
}
240240

241241
Vector LimbPath::GetCurrentVel(const Vector& limbPos) {
@@ -379,7 +379,7 @@ bool LimbPath::RestartFree(Vector& limbPos, MOID MOIDToIgnore, int ignoreTeam) {
379379

380380
if (IsStaticPoint()) {
381381
Vector notUsed;
382-
Vector targetPos = m_JointPos + (RotatePoint(m_Start) * GetTotalScaleMultiplier());
382+
Vector targetPos = m_JointPos + (RotatePoint(m_Start * GetTotalScaleMultiplier()));
383383
Vector beginPos = targetPos;
384384
// TODO: don't hardcode the beginpos
385385
beginPos.m_Y -= 24;
@@ -508,8 +508,8 @@ void LimbPath::Draw(BITMAP* pTargetBitmap,
508508
for (std::deque<Vector>::const_iterator itr = m_Segments.begin(); itr != m_Segments.end(); ++itr) {
509509
nextPoint += *itr;
510510

511-
Vector prevWorldPosition = m_JointPos + (RotatePoint(prevPoint) * GetTotalScaleMultiplier());
512-
Vector nextWorldPosition = m_JointPos + (RotatePoint(nextPoint) * GetTotalScaleMultiplier());
511+
Vector prevWorldPosition = m_JointPos + (RotatePoint(prevPoint * GetTotalScaleMultiplier()));
512+
Vector nextWorldPosition = m_JointPos + (RotatePoint(nextPoint * GetTotalScaleMultiplier()));
513513
line(pTargetBitmap, prevWorldPosition.m_X, prevWorldPosition.m_Y, nextWorldPosition.m_X, nextWorldPosition.m_Y, color);
514514

515515
Vector min(std::min(prevWorldPosition.m_X, nextWorldPosition.m_X), std::min(prevWorldPosition.m_Y, nextWorldPosition.m_Y));

0 commit comments

Comments
 (0)