From 5518e5d914226796eb560f2f261f0c2d8854022f Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sat, 8 Feb 2003 03:21:57 +0000 Subject: * Hacked up vsprintf to support vec3_t --- src/game/bg_lib.c | 27 +++++++++++++++++++++++++++ src/game/g_cmds.c | 4 ++-- 2 files changed, 29 insertions(+), 2 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; diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index ed269e34..04888634 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1862,7 +1862,7 @@ void Cmd_Test_f( gentity_t *ent ) if( !CheatsOk( ent ) ) return; - ent->client->ps.stats[ STAT_STATE ] |= SS_KNOCKEDOVER; +/* ent->client->ps.stats[ STAT_STATE ] |= SS_KNOCKEDOVER; ent->client->lastKnockedOverTime = level.time; G_AddPredictableEvent( ent, EV_KNOCKOVER, 0 ); VectorCopy( ent->client->ps.viewangles, ent->client->ps.grapplePoint ); @@ -1870,7 +1870,7 @@ void Cmd_Test_f( gentity_t *ent ) ent->client->ps.legsAnim = ( ( ent->client->ps.legsAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) | BOTH_DEATH1; ent->client->ps.torsoAnim = - ( ( ent->client->ps.torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) | BOTH_DEATH1; + ( ( ent->client->ps.torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) | BOTH_DEATH1;*/ } /* -- cgit