From 1f24c4da3ce28e56729934e4d458b879a5ec1920 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 5 Jul 2001 21:22:51 +0000 Subject: [PATCH] fix pingpong for Win32 --- panda/src/chan/animControl.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/panda/src/chan/animControl.cxx b/panda/src/chan/animControl.cxx index 5215ebfd19..980eeeb066 100644 --- a/panda/src/chan/animControl.cxx +++ b/panda/src/chan/animControl.cxx @@ -199,6 +199,11 @@ loop(bool restart, int from, int to) { //////////////////////////////////////////////////////////////////// void AnimControl:: pingpong(bool restart, int from, int to) { + if (from == to) { + pose(from); + return; + } + nassertv(get_num_frames() > 0); nassertv(from >= 0 && from < get_num_frames()); @@ -596,10 +601,9 @@ do_actions_forward(int from, int to) { //////////////////////////////////////////////////////////////////// bool AnimControl:: do_actions_backward(int from, int to) { -#ifndef WIN32_VC if (from >= to) { #if defined(WIN32_VC) && !defined(NO_PCH) - typedef reverse_iterator Action_reverse_iterator; + typedef Actions::const_reverse_iterator Action_reverse_iterator; #else typedef reverse_iterator Action_reverse_iterator; #endif @@ -631,7 +635,6 @@ do_actions_backward(int from, int to) { return false; } } -#endif return true; }