Game Development Community

Purpose Of didRenderLastRender Function

by Scott Doerrfeld · in Torque Game Engine · 08/09/2007 (2:07 pm) · 1 replies

What is the purpose of using the 'didRenderLastRender' function here:

In Player.cc:

void Player::processTick(const Move* move)
{
.
.
.
      PROFILE_START(Player_PhysicsSection);
      if(isServerObject() || (didRenderLastRender() || getControllingClient()))
      {
         updateWorkingCollisionSet();

         updateState();
         updateMove(move);
         updateLookAnimation();
         updateDeathOffsets();
         updatePos();
      }
      PROFILE_END();
.
.
.
}

Would it be much of a problem if I took it out of this check?

#1
08/09/2007 (2:25 pm)
If the object is on client and not has been seen in the last render pass, there is no need to update it as the client won't see a difference to the current screen in case it is rendering it now.

Thats to save processing time on the client side.