1
0
forked from mirrors/0ad

Only use interpolation for moving objects in VisualActor. Patch by sbte. Fixes #1846.

This was SVN commit r13223.
This commit is contained in:
quantumstate
2013-03-05 20:02:16 +00:00
parent 121fb35f72
commit 21f13f9683
5 changed files with 26 additions and 0 deletions
@@ -44,6 +44,8 @@
#include "ps/CLogger.h"
#include "renderer/Scene.h"
#include "tools/atlas/GameInterface/GameLoop.h"
class CCmpVisualActor : public ICmpVisual
{
public:
@@ -733,6 +735,14 @@ void CCmpVisualActor::Interpolate(float frameTime, float frameOffset)
UpdateVisibility();
m_PreviouslyRendered = true;
}
else if (!cmpPosition->GetReinterpolate() && m_ConstructionProgress.IsZero() &&
!g_AtlasGameLoop->running)
{
// Position hasn't changed so skip most of the work. Special cases are when placing a building or being
// in atlas (since terrain height can change in atlas)
m_Unit->UpdateModel(frameTime);
return;
}
// Even if HIDDEN due to LOS, we need to set up the transforms
// so that projectiles will be launched from the right place