Skip to content

Commit

Permalink
World|Plane: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Apr 21, 2014
1 parent dddece7 commit bb21ca2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions doomsday/client/src/world/plane.cpp
Expand Up @@ -263,7 +263,7 @@ void Plane::lerpSmoothedHeight()
{
d->heightSmoothed = newHeightSmoothed;
d->notifySmoothedHeightChanged();
d->surface._needDecorationUpdate = true;
d->surface.markAsNeedingDecorationUpdate();
}
}

Expand All @@ -279,24 +279,22 @@ void Plane::resetSmoothedHeight()
d->notifySmoothedHeightChanged();
}

d->surface._needDecorationUpdate = true;
d->surface.markAsNeedingDecorationUpdate();
}

void Plane::updateHeightTracking()
{
d->oldHeight[0] = d->oldHeight[1];
d->oldHeight[1] = d->height;

d->surface._needDecorationUpdate = true;
d->surface.markAsNeedingDecorationUpdate();

if(!de::fequal(d->oldHeight[0], d->oldHeight[1]))
{
if(de::abs(d->oldHeight[0] - d->oldHeight[1]) >= MAX_SMOOTH_MOVE)
{
// Too fast: make an instantaneous jump.
d->oldHeight[0] = d->oldHeight[1];

d->surface._needDecorationUpdate = true;
}
}
}
Expand Down

0 comments on commit bb21ca2

Please sign in to comment.