Use thief_message_str instead of thief_message where possible

This commit is contained in:
Kp 2013-12-08 23:37:40 +00:00
parent be742f8848
commit 150281ac28

View file

@ -423,8 +423,15 @@ void buddy_message_str(const char *str)
}
// -----------------------------------------------------------------------------
static void thief_message_str(const char * str) __attribute_nonnull();
static void thief_message_str(const char * str)
{
HUD_init_message(HM_DEFAULT, "%c%cTHIEF:%c%c %s", 1, BM_XRGB(28, 0, 0), 1, BM_XRGB(0, 31, 0), str);
}
static void thief_message(const char * format, ... ) __attribute_format_printf(1, 2);
static void thief_message(const char * format, ... )
#define thief_message(F,...) dxx_call_printf_checked(thief_message,thief_message_str,(),(F),##__VA_ARGS__)
{
char new_format[128];
@ -433,8 +440,7 @@ static void thief_message(const char * format, ... )
va_start(args, format );
vsnprintf(new_format, sizeof(new_format), format, args);
va_end(args);
HUD_init_message(HM_DEFAULT, "%c%cTHIEF:%c%c %s", 1, BM_XRGB(28, 0, 0), 1, BM_XRGB(0, 31, 0), new_format);
thief_message_str(new_format);
}
// -----------------------------------------------------------------------------