aboutsummaryrefslogtreecommitdiff
path: root/src/client/render/plain.cpp
diff options
context:
space:
mode:
authorx2048 <codeforsmile@gmail.com>2023-03-19 21:31:15 +0100
committerGitHub <noreply@github.com>2023-03-19 21:31:15 +0100
commit6cd2eea48781dd7318b6ea78c5cdea4a3ee5db02 (patch)
treea5d0da127c7b4637adefde7a80e72580dff68484 /src/client/render/plain.cpp
parent09342c0811bb8d035e012a79dce714a6b63722e4 (diff)
downloadminetest-6cd2eea48781dd7318b6ea78c5cdea4a3ee5db02.tar.xz
Move drawing of wield tool into a dedicated step of the pipeline (#13338)
Diffstat (limited to 'src/client/render/plain.cpp')
-rw-r--r--src/client/render/plain.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/render/plain.cpp b/src/client/render/plain.cpp
index 11378b165..60abbb97a 100644
--- a/src/client/render/plain.cpp
+++ b/src/client/render/plain.cpp
@@ -39,6 +39,13 @@ void Draw3D::run(PipelineContext &context)
return;
context.hud->drawBlockBounds();
context.hud->drawSelectionMesh();
+}
+
+void DrawWield::run(PipelineContext &context)
+{
+ if (m_target)
+ m_target->activate(context);
+
if (context.draw_wield_tool)
context.client->getCamera()->drawWieldedTool();
}
@@ -144,6 +151,7 @@ void populatePlainPipeline(RenderPipeline *pipeline, Client *client)
auto downscale_factor = getDownscaleFactor();
auto step3D = pipeline->own(create3DStage(client, downscale_factor));
pipeline->addStep(step3D);
+ pipeline->addStep<DrawWield>();
pipeline->addStep<MapPostFxStep>();
step3D = addUpscaling(pipeline, step3D, downscale_factor);