diff options
Diffstat (limited to 'src/game/bg_lib.c')
-rw-r--r-- | src/game/bg_lib.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/game/bg_lib.c b/src/game/bg_lib.c index f5aea779..1b594eb2 100644 --- a/src/game/bg_lib.c +++ b/src/game/bg_lib.c @@ -1709,6 +1709,28 @@ void AddFloat( char **buf_p, float fval, int width, int prec ) } } +void AddVec3_t( char **buf_p, vec3_t v, int width, int prec ) +{ + char *buf; + + buf = *buf_p; + + *buf++ = '['; + + AddFloat( &buf, v[ 0 ], width, prec ); + buf += width; + *buf++ = ' '; + + AddFloat( &buf, v[ 1 ], width, prec ); + buf += width; + *buf++ = ' '; + + AddFloat( &buf, v[ 2 ], width, prec ); + buf += width; + *buf++ = ']'; + + *buf_p = buf; +} void AddString( char **buf_p, char *string, int width, int prec ) { @@ -1850,6 +1872,11 @@ reswitch: arg++; break; + case 'v': + AddVec3_t( &buf_p, (vec_t *)*arg, width, prec ); + arg++; + break; + case '%': *buf_p++ = ch; break; |