Skip to content

Commit

Permalink
PEGASUS: Fix auto dragging
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Hoops committed Sep 30, 2011
1 parent b5af4bf commit 9be43b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engines/pegasus/items/autodragger.cpp
Expand Up @@ -73,9 +73,9 @@ void AutoDragger::useIdleTime() {
TimeValue thisTime = getTime();

if (thisTime != _lastTime) {
uint32 offsetX = (_stopLocation.x - _startLocation.x) * thisTime / getDuration();
uint32 offsetY = (_stopLocation.y - _startLocation.y) * thisTime / getDuration();
_draggingElement->moveElementTo(_startLocation.x + offsetX, _startLocation.x + offsetY);
int32 offsetX = (_stopLocation.x - _startLocation.x) * (int32)thisTime / (int32)getDuration();
int32 offsetY = (_stopLocation.y - _startLocation.y) * (int32)thisTime / (int32)getDuration();
_draggingElement->moveElementTo(_startLocation.x + offsetX, _startLocation.y + offsetY);
_lastTime = thisTime;
}

Expand Down

0 comments on commit 9be43b2

Please sign in to comment.