fix pingpong for Win32

This commit is contained in:
David Rose 2001-07-05 21:22:51 +00:00
parent 0cba400ac0
commit 1f24c4da3c
1 changed files with 6 additions and 3 deletions

View File

@ -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<Actions::const_iterator, Actions::value_type> Action_reverse_iterator;
typedef Actions::const_reverse_iterator Action_reverse_iterator;
#else
typedef reverse_iterator<Actions::const_iterator> Action_reverse_iterator;
#endif
@ -631,7 +635,6 @@ do_actions_backward(int from, int to) {
return false;
}
}
#endif
return true;
}