fix for non-animating models

Animating models need ModelEntityItem::update() called every so often.  This means animating entities need to be categorized as "Moving" in the EntitySimulation.
Ahh. That would explain Philip's bug since he had a mortal animating entity. Cool. Good find!



> On Dec 3, 2014, at 6:05 PM, AndrewMeadows <notifications@github.com> wrote:
> 
> In libraries/entities/src/ModelEntityItem.cpp:
> 
> > @@ -374,17 +374,9 @@ bool ModelEntityItem::isAnimatingSomething() const {
> >  }
> >  
> >  EntityItem::SimulationState ModelEntityItem::computeSimulationState() const {
> > -    EntityItem::SimulationState baseClassState = EntityItem::computeSimulationState();
> > -    
> > -    // if the base class is static, then consider our animation state, and upgrade to changing if
> > -    // we are animating. If the base class has a higher simulation state than static, then
> > -    // use the base class state.
> > -    if (baseClassState == EntityItem::Static) {
> > -        if (isAnimatingSomething()) {
> > -            return EntityItem::Moving;
> > -        }
> > -    }
> > -    return baseClassState;
> > +    // if we're animating then we need to have update() periodically called on this entity
> > +    // which means we need to categorized as Moving
> > +    return isAnimatingSomething() ?  EntityItem::Moving : EntityItem::computeSimulationState();
> No, because the old code would only return Moving when the entity had been categorized as Static. There is a third category (Mortal) that would not be handled. I just simplified the code to always return Moving if it needs animation, otherwise defer to the base class's calculation -- no special logic pivot on Static.
> 
> —
> Reply to this email directly or view it on GitHub.
>