Move some more updates out of the render code, see #43
This commit is contained in:
parent
5e5cfba035
commit
59edf6ea13
1 changed files with 49 additions and 44 deletions
|
@ -1575,9 +1575,9 @@ bool mainLoop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////
|
///////////////////
|
||||||
// RENDER THE FRAME 3D //
|
// SETUP CAMERAS //
|
||||||
//////////////////////////
|
///////////////////
|
||||||
|
|
||||||
if (StereoDisplay)
|
if (StereoDisplay)
|
||||||
{
|
{
|
||||||
|
@ -1603,6 +1603,10 @@ bool mainLoop()
|
||||||
// Commit camera changes
|
// Commit camera changes
|
||||||
commitCamera();
|
commitCamera();
|
||||||
|
|
||||||
|
//////////////////////////
|
||||||
|
// RENDER THE FRAME 3D //
|
||||||
|
//////////////////////////
|
||||||
|
|
||||||
if (!ClientCfg.Light)
|
if (!ClientCfg.Light)
|
||||||
{
|
{
|
||||||
// Render
|
// Render
|
||||||
|
@ -1711,17 +1715,6 @@ bool mainLoop()
|
||||||
// Display some things not in the scene like the name, the entity path, etc.
|
// Display some things not in the scene like the name, the entity path, etc.
|
||||||
EntitiesMngr.updatePostRender();
|
EntitiesMngr.updatePostRender();
|
||||||
|
|
||||||
// R2ED pre render update
|
|
||||||
if (ClientCfg.R2EDEnabled)
|
|
||||||
{
|
|
||||||
// IMPORTANT : this should be called after CEntitiesMngr::updatePostRender() because
|
|
||||||
// entity may be added / removed there !
|
|
||||||
R2::getEditor().updateAfterRender();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update FXs (remove them).
|
|
||||||
FXMngr.update();
|
|
||||||
|
|
||||||
// Render the stat graphs if needed
|
// Render the stat graphs if needed
|
||||||
{
|
{
|
||||||
H_AUTO_USE ( RZ_Client_Main_Loop_Debug )
|
H_AUTO_USE ( RZ_Client_Main_Loop_Debug )
|
||||||
|
@ -1738,6 +1731,7 @@ bool mainLoop()
|
||||||
Driver->drawQuad(0, 0, 1, 1, ThunderColor);
|
Driver->drawQuad(0, 0, 1, 1, ThunderColor);
|
||||||
|
|
||||||
// TODO : boris : add sound here !
|
// TODO : boris : add sound here !
|
||||||
|
// Needs more explosions
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the contextual menu
|
// Update the contextual menu
|
||||||
|
@ -1827,6 +1821,8 @@ bool mainLoop()
|
||||||
Driver->drawBitmap(x/(float)ClientCfg.Width, y/(float)ClientCfg.Height, width/(float)ClientCfg.Width, height/(float)ClientCfg.Height, *LogoBitmaps[i]);
|
Driver->drawBitmap(x/(float)ClientCfg.Width, y/(float)ClientCfg.Height, width/(float)ClientCfg.Width, height/(float)ClientCfg.Height, *LogoBitmaps[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// FPS
|
// FPS
|
||||||
{
|
{
|
||||||
|
@ -1844,6 +1840,17 @@ bool mainLoop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// R2ED post render update
|
||||||
|
if (ClientCfg.R2EDEnabled)
|
||||||
|
{
|
||||||
|
// IMPORTANT : this should be called after CEntitiesMngr::updatePostRender() because
|
||||||
|
// entity may be added / removed there !
|
||||||
|
R2::getEditor().updateAfterRender();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update FXs (remove them).
|
||||||
|
FXMngr.update();
|
||||||
|
|
||||||
// Detect disconnection / server down: display information text
|
// Detect disconnection / server down: display information text
|
||||||
// but keep the rendering so that the player can remember where he is
|
// but keep the rendering so that the player can remember where he is
|
||||||
// and what he was doing. He can't move because the connection quality returns false.
|
// and what he was doing. He can't move because the connection quality returns false.
|
||||||
|
@ -1857,8 +1864,6 @@ bool mainLoop()
|
||||||
// from the EGS, resume the sequence because the EGS is down and won't reply.
|
// from the EGS, resume the sequence because the EGS is down and won't reply.
|
||||||
FarTP.onServerQuitOk();
|
FarTP.onServerQuitOk();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Yoyo: MovieShooter.
|
// Yoyo: MovieShooter.
|
||||||
if(MovieShooterSaving)
|
if(MovieShooterSaving)
|
||||||
|
|
Loading…
Reference in a new issue