mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #3895 from AndrewMeadows/thermonuclear
fix for non-animating models
This commit is contained in:
commit
c901b8d1eb
1 changed files with 3 additions and 11 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
void ModelEntityItem::update(const quint64& updateTime) {
|
||||
|
|
Loading…
Reference in a new issue