summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-02-08 03:21:57 +0000
committerTim Angus <tim@ngus.net>2003-02-08 03:21:57 +0000
commit5518e5d914226796eb560f2f261f0c2d8854022f (patch)
tree4f7ae92bd8e15baf46b6aa4898d8e9e2d5586b62 /src
parentc73f0471bb1f1e085318c756a957783d8111faeb (diff)
* Hacked up vsprintf to support vec3_t
Diffstat (limited to 'src')
-rw-r--r--src/game/bg_lib.c27
-rw-r--r--src/game/g_cmds.c4
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;*/
}
/*