Skip to content

Commit 80b0084

Browse files
committed
d3d11: do not draw powerup overlay in railgun scope
1 parent d932d68 commit 80b0084

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

game_patch/graphics/d3d11/gr_d3d11_mesh.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ namespace df::gr::d3d11
438438
render_context_.set_primitive_topology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
439439

440440
std::optional<gr::Mode> forced_mode;
441-
if (params.flags & 1) {
441+
bool ir_scanner = (params.flags & 1) != 0;
442+
if (ir_scanner) {
442443
// used by rail gun scanner for heat overlays
443444
forced_mode.emplace(
444445
TEXTURE_SOURCE_NONE,
@@ -486,7 +487,7 @@ namespace df::gr::d3d11
486487
render_context_.set_textures(texture, -1);
487488
render_context_.draw_indexed(b.num_indices, b.start_index, b.base_vertex);
488489
}
489-
if (params.powerup_bitmaps[0] != -1) {
490+
if (params.powerup_bitmaps[0] != -1 && !ir_scanner) {
490491
gr::Mode powerup_mode{
491492
gr::TEXTURE_SOURCE_CLAMP,
492493
gr::COLOR_SOURCE_TEXTURE,

0 commit comments

Comments
 (0)