Skip to content

Commit

Permalink
fix hud model/sprite rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 committed Jan 19, 2025
1 parent 4f5f485 commit b93f362
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/rendering/hwrenderer/scene/hw_weapon.cpp
Original file line number Diff line number Diff line change
@@ -87,11 +87,13 @@ void HWDrawInfo::DrawPSprite(HUDSprite *huds, FRenderState &state)

if (huds->mframe)
{
state.SetShadeVertex(get_gl_spritelight() == 1);
state.AlphaFunc(Alpha_GEqual, 0);

FHWModelRenderer renderer(this, state, huds->lightindex);
RenderHUDModel(&renderer, huds->weapon, huds->translation, huds->rotation + FVector3(huds->mx / 4., (huds->my - WEAPONTOP) / -4., 0), huds->pivot, huds->mframe);
state.SetFlatVertexBuffer();
state.SetShadeVertex(false);
}
else
{
@@ -740,10 +742,6 @@ void HWDrawInfo::PreparePlayerSprites2D(sector_t * viewsector, area_t in_area, F
if (hudsprite.RenderStyle.BlendOp != STYLEOP_Shadow && Level->HasDynamicLights && !isFullbrightScene() && gl_light_sprites)
{
GetDynSpriteLight(playermo, nullptr, nullptr, hudsprite.dynrgb);
if (get_gl_spritelight() > 0)
{
GetDynSpriteLightList(playermo, lightdata);
}
}

if (!hudsprite.GetWeaponRect(this, state, psp, spos.X, spos.Y, player, vp.TicFrac)) continue;

0 comments on commit b93f362

Please sign in to comment.