Melchior FRANZ said:

> * Erik Hofman -- Friday 14 May 2004 20:40:
> > Melchior FRANZ wrote:
> > > That's due to Fred's changes in animation.cxx:502. in the
non-_use_personality
> > > if-branch _total_duration_sec is not instantiated and may be zero. This
leads
> > > to a beeping endless loop.
> > 
> > While that does look suspicious, it isn't the problem (at least not for me).
> 
> It is the problem for me. I've added this for now (not thought to be the right
> fix):
> 
> Index: animation.cxx
> ===================================================================
> RCS file: /var/cvs/SimGear-0.3/SimGear/simgear/scene/model/animation.cxx,v
> retrieving revision 1.22
> diff -u -p -r1.22 animation.cxx
> --- a/animation.cxx     11 May 2004 22:21:24 -0000      1.22
> +++ b/animation.cxx     14 May 2004 18:53:48 -0000
> @@ -501,6 +501,10 @@ SGTimedAnimation::update()
>      } else {
>          while ( ( sim_time_sec - _last_time_sec ) >= _total_duration_sec ) {
>              _last_time_sec += _total_duration_sec;
> +            if (_total_duration_sec <= 0.0) {
> +                std::cerr << "animation.cxx:505 _total_duration_sec = " <<
_total_duration_sec << std::endl;
> +                break;
> +            }
>          }
>          double duration = _duration_sec;
>          if ( _step < (int)_branch_duration_sec.size() ) {
> 
> 
> and the error message does show up (with 0), and the break "fixes" the problem.
> 

Ah yes,  thanks for finding this.  I did a different fix and confirmed the
issue,  but I'm not sure what this is supposed to be doing either.

Changed the "subject" to maybe get Fred's attention.

Best,

Jim


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to