Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 394e02e

Browse files
committed
Remove weird three-quarters-step
It was causing objects to embed inside terrain without successful penetration.
1 parent 8b583f6 commit 394e02e

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

Entities/AtomGroup.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,17 +1192,10 @@ float AtomGroup::Travel(Vector &position,
11921192
// Special case of being at rest
11931193
if (stepCount == 0 && stepsOnSeg == 1)
11941194
{
1195-
segProgress = 0.0F;
11961195
halted = true;
11971196
// m_pOwnerMO->SetToSettle(true);
1198-
}
1199-
// Normal travel
1200-
else if (stepCount == 0) {
1201-
// Hit on first atom, but has farther to go
1202-
segProgress = 0.75F / static_cast<float>(stepsOnSeg);
1203-
} else {
1204-
segProgress = static_cast<float>(stepCount) / static_cast<float>(stepsOnSeg);
12051197
}
1198+
segProgress = static_cast<float>(stepCount) / static_cast<float>(stepsOnSeg);
12061199

12071200
// Move position forward to the hit position.
12081201
preHitPos = position;
@@ -1298,8 +1291,6 @@ float AtomGroup::Travel(Vector &position,
12981291
// Calc and store the collision response effects.
12991292
for (Atom *penetratingAtom : penetratingAtoms)
13001293
{
1301-
1302-
13031294
// This gets re-set later according to the ortho pixel edges hit.
13041295
// hitData.BitmapNormal = -(hitData.HitVel[HITOR].GetNormalized());
13051296
// hitData.SquaredMIHandle[HITOR] = hitData.HitRadius[HITOR].GetPerpendicular()/*.Dot(hitData.BitmapNormal)*/;

0 commit comments

Comments
 (0)