diff --git a/include/engine/util.h b/include/engine/util.h index 6618254..e0a387d 100644 --- a/include/engine/util.h +++ b/include/engine/util.h @@ -173,6 +173,7 @@ typedef struct hudtextparms_s #define VEC_DUCK_VIEW Vector( 0, 0, 12 ) #define SVC_TEMPENTITY 23 +#define SVC_CENTERPRINT 26 #define SVC_INTERMISSION 30 #define SVC_CDTRACK 32 #define SVC_WEAPONANIM 35 diff --git a/source/engine.cpp b/source/engine.cpp index c6bb169..71a6435 100644 --- a/source/engine.cpp +++ b/source/engine.cpp @@ -81,6 +81,7 @@ void Engine::ChatPrintf (const char *fmt, ...) MESSAGE_BEGIN (MSG_BROADCAST, FindMessageId (NETMSG_TEXTMSG)); WRITE_BYTE (HUD_PRINTTALK); + WRITE_STRING ("%s"); WRITE_STRING (string); MESSAGE_END (); } @@ -101,8 +102,7 @@ void Engine::CenterPrintf (const char *fmt, ...) } strcat (string, "\n"); - MESSAGE_BEGIN (MSG_BROADCAST, FindMessageId (NETMSG_TEXTMSG)); - WRITE_BYTE (HUD_PRINTCENTER); + MESSAGE_BEGIN (MSG_BROADCAST, SVC_CENTERPRINT); WRITE_STRING (string); MESSAGE_END (); }