When updating redundant HUD messages check the for-loop not the start with a negative number - causes too long message display and negative array index
This commit is contained in:
parent
651e6db699
commit
9f25721f8a
|
@ -1,5 +1,9 @@
|
||||||
D2X-Rebirth Changelog
|
D2X-Rebirth Changelog
|
||||||
|
|
||||||
|
20100803
|
||||||
|
--------
|
||||||
|
main/hud.c: When updating redundant HUD messages check the for-loop not the start with a negative number - causes too long message display and negative array index
|
||||||
|
|
||||||
20100801
|
20100801
|
||||||
--------
|
--------
|
||||||
main/menu.c, main/songs.c, main/songs.h, main/gameseq.c, main/digi.h, arch/sdl/digi.c: Builtin music list now dynamically allocated and not limited to 30 songs; Instead of never loading new level when loading savestate ingame, only do this for Redbook and Custom Music playing order 'continously'; if no endlevel song is specified in Custom Music continue with level music
|
main/menu.c, main/songs.c, main/songs.h, main/gameseq.c, main/digi.h, arch/sdl/digi.c: Builtin music list now dynamically allocated and not limited to 30 songs; Instead of never loading new level when loading savestate ingame, only do this for Redbook and Custom Music playing order 'continously'; if no endlevel song is specified in Custom Music continue with level music
|
||||||
|
|
|
@ -128,7 +128,7 @@ int HUD_init_message_va(char * format, va_list args)
|
||||||
{
|
{
|
||||||
HUD_messages[i].time = F1_0*2; // keep redundant message in list
|
HUD_messages[i].time = F1_0*2; // keep redundant message in list
|
||||||
if (i >= HUD_nmessages-HUD_MAX_NUM_DISP) // if redundant message on display, update them all
|
if (i >= HUD_nmessages-HUD_MAX_NUM_DISP) // if redundant message on display, update them all
|
||||||
for (i = HUD_nmessages-HUD_MAX_NUM_DISP, j = 1; i < HUD_nmessages; i++, j++)
|
for (i = (HUD_nmessages-HUD_MAX_NUM_DISP<0?0:HUD_nmessages-HUD_MAX_NUM_DISP), j = 1; i < HUD_nmessages; i++, j++)
|
||||||
HUD_messages[i].time = F1_0*(j*2);
|
HUD_messages[i].time = F1_0*(j*2);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue