mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-15 16:01:51 +00:00
call on_hud_render before rendering the frame
Hud scripts update the first-person hand skeleton, blockwraps and animations in on_hud_render, which ran after renderFrame, so these changes were drawn one frame late. With fast camera rotation the hand visibly lagged and jittered behind the view.
This commit is contained in:
parent
ca066f46a6
commit
293d68a0fb
1 changed files with 3 additions and 3 deletions
|
|
@ -271,11 +271,11 @@ void LevelScreen::draw(float delta) {
|
|||
|
||||
if (!hud->isPause()) {
|
||||
scripting::on_entities_render(engine.getTime().getDelta());
|
||||
}
|
||||
renderer->renderFrame(ctx, camera, hudVisible, *postProcessing);
|
||||
if (!hud->isPause()) {
|
||||
// before the frame: changes made by hud scripts (hand skeleton,
|
||||
// blockwraps, animations) must be rendered with the current camera
|
||||
scripting::on_frontend_render();
|
||||
}
|
||||
renderer->renderFrame(ctx, camera, hudVisible, *postProcessing);
|
||||
|
||||
if (hudVisible) {
|
||||
hud->draw(ctx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue