Skip to content

Commit 8747521

Browse files
committed
Fix log spam due to bad autosprite configuration
1 parent c44f885 commit 8747521

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/engine/renderer/tr_local.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,6 +1164,7 @@ enum
11641164
bool entitySpriteFaceViewDirection;
11651165

11661166
int autoSpriteMode;
1167+
bool autoSpriteWarned = false;
11671168

11681169
uint8_t numDeforms;
11691170
deformStage_t deforms[ MAX_SHADER_DEFORMS ];

src/engine/renderer/tr_surface.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,12 +586,13 @@ static void Tess_SurfaceSprite()
586586

587587
radius = backEnd.currentEntity->e.radius;
588588

589-
if ( tess.surfaceShader->autoSpriteMode != 0 )
589+
if ( tess.surfaceShader->autoSpriteMode != 0 && !tess.surfaceShader->autoSpriteWarned )
590590
{
591591
// This function does similarly to autosprite mode 1. Autospriting it again would be a
592592
// waste and would probably lose the rotation angle
593593
Log::Warn( "RT_SPRITE entity should NOT configure its shader (%s) as autosprite",
594594
tess.surfaceShader->name );
595+
tess.surfaceShader->autoSpriteWarned = true;
595596
}
596597

597598
VectorSubtract( backEnd.currentEntity->e.origin, backEnd.viewParms.orientation.origin, delta );

0 commit comments

Comments
 (0)