Fix render artifacts around health points when the HUD is scaled.

In SCR_DrawFieldScaled() the HUD scale factor wasn't taken into account
when calculating the screen area affected by the change. Therefor wrong
coordinates were passed to SCR_AddDirtyPoint() and a part of the changed
area wasn't marked dirty, leading to render artifacts.

This bug was present since HUD scaling was first introduced.
This commit is contained in:
Yamagi Burmeister 2017-04-10 14:20:49 +02:00 committed by Daniel Gibson
parent 7b5e13d4ff
commit e510bfc281

View file

@ -949,7 +949,7 @@ SCR_DrawFieldScaled(int x, int y, int color, int width, int value, float factor)
}
SCR_AddDirtyPoint(x, y);
SCR_AddDirtyPoint(x + (width * CHAR_WIDTH + 2)*factor, y + 23);
SCR_AddDirtyPoint(x + (width * CHAR_WIDTH + 2)*factor, y + factor*24);
Com_sprintf(num, sizeof(num), "%i", value);
l = (int)strlen(num);