Made a change that I think might fix bug #50644.

This commit is contained in:
onpon4 2017-03-26 23:52:05 -04:00
parent d1ae6f9bb4
commit 9c089a5013
2 changed files with 8 additions and 2 deletions

View File

@ -7,7 +7,7 @@
# information. This file is offered as-is, without any warranty. # information. This file is offered as-is, without any warranty.
AC_PREREQ([2.69]) AC_PREREQ([2.69])
AC_INIT([Project: Starfighter], [1.7], [onpon4@riseup.net], [starfighter]) AC_INIT([Project: Starfighter], [1.7.1-dev], [onpon4@riseup.net], [starfighter])
AM_INIT_AUTOMAKE([foreign -Wall -Werror]) AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_SRCDIR([src/Starfighter.cpp]) AC_CONFIG_SRCDIR([src/Starfighter.cpp])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])

View File

@ -346,8 +346,14 @@ SDL_Surface *gfx_createTextSurface(const char *inString, int color)
void gfx_createTextObject(int index, const char *inString, int x, int y, int fontColor) void gfx_createTextObject(int index, const char *inString, int x, int y, int fontColor)
{ {
// Reset the life of the text object
gfx_textSprites[index].life = 0;
/* Shortcut: if we already rendered the same string in the same color, don't render it again. */ /* Shortcut: if we already rendered the same string in the same color, don't render it again. */
if(gfx_textSprites[index].text && gfx_textSprites[index].image && gfx_textSprites[index].fontColor == fontColor && !strcmp(gfx_textSprites[index].text, inString)) { if (gfx_textSprites[index].text && gfx_textSprites[index].image &&
gfx_textSprites[index].fontColor == fontColor &&
!strcmp(gfx_textSprites[index].text, inString))
{
gfx_textSprites[index].x = x; gfx_textSprites[index].x = x;
gfx_textSprites[index].y = y; gfx_textSprites[index].y = y;
if (x == -1) if (x == -1)