Added guard to prevent a character being reset to a default direction frame after a call to SetDirection if they're already facing in that direction - fixes some characters alternating frames

svn-id: r29514
This commit is contained in:
Paul Gilbert 2007-11-16 07:47:43 +00:00
parent 4bfa437887
commit 6f23a38c12

View File

@ -526,7 +526,7 @@ void Hotspot::endAction() {
}
void Hotspot::setDirection(Direction dir) {
if (_numFrames == 0) return;
if ((_numFrames == 0) || (_direction == dir)) return;
uint8 newFrameNumber = 0;
switch (dir) {