summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/mvd_game.c21
-rw-r--r--source/mvd_local.h2
-rw-r--r--wiki/doc/server.mdwn18
3 files changed, 19 insertions, 22 deletions
diff --git a/source/mvd_game.c b/source/mvd_game.c
index aa55926..04fc4ca 100644
--- a/source/mvd_game.c
+++ b/source/mvd_game.c
@@ -34,6 +34,7 @@ static cvar_t *mvd_flood_mute;
static cvar_t *mvd_filter_version;
static cvar_t *mvd_stats_hack;
static cvar_t *mvd_freeze_hack;
+static cvar_t *mvd_chase_prefix;
udpClient_t *mvd_clients;
@@ -270,8 +271,8 @@ static void MVD_LayoutFollow( udpClient_t *client ) {
size_t total;
total = Q_snprintf( layout, sizeof( layout ),
- "xv 0 yb -64 string \"[%s] Chasing %s\"",
- mvd->name, name );
+ "%s string \"[%s] Chasing %s\"",
+ mvd_chase_prefix->string, mvd->name, name );
if( total >= sizeof( layout ) ) {
return;
}
@@ -1150,6 +1151,7 @@ static void MVD_GameInit( void ) {
mvd_default_map = Cvar_Get( "mvd_default_map", "q2dm1", CVAR_LATCH );
mvd_stats_hack = Cvar_Get( "mvd_stats_hack", "0", 0 );
mvd_freeze_hack = Cvar_Get( "mvd_freeze_hack", "1", 0 );
+ mvd_chase_prefix = Cvar_Get( "mvd_chase_prefix", "xv 0 yb -64", 0 );
Cvar_Set( "g_features", va( "%d", MVD_FEATURES ) );
Z_TagReserve( ( sizeof( edict_t ) +
@@ -1265,7 +1267,7 @@ static void MVD_GameClientBegin( edict_t *ent ) {
client->floodHead = 0;
memset( &client->lastcmd, 0, sizeof( client->lastcmd ) );
memset( &client->ps, 0, sizeof( client->ps ) );
- client->jump_held = qfalse;
+ client->jump_held = 0;
client->layout_type = LAYOUT_NONE;
client->layout_time = 0;
client->layout_cursor = 0;
@@ -1378,14 +1380,21 @@ static void MVD_GameClientThink( edict_t *ent, usercmd_t *cmd ) {
if( client->target ) {
if( cmd->upmove >= 10 ) {
- if( !client->jump_held ) {
+ if( client->jump_held < 1 ) {
if( !client->mvd->intermission ) {
MVD_FollowNext( client );
}
- client->jump_held = qtrue;
+ client->jump_held = 1;
+ }
+ } else if( cmd->upmove <= -10 ) {
+ if( client->jump_held > -1 ) {
+ if( !client->mvd->intermission ) {
+ MVD_FollowPrev( client );
+ }
+ client->jump_held = -1;
}
} else {
- client->jump_held = qfalse;
+ client->jump_held = 0;
}
} else {
memset( &pm, 0, sizeof( pm ) );
diff --git a/source/mvd_local.h b/source/mvd_local.h
index 8af34fb..d96779b 100644
--- a/source/mvd_local.h
+++ b/source/mvd_local.h
@@ -96,7 +96,7 @@ typedef struct {
usercmd_t lastcmd;
//short delta_angles[3];
- qboolean jump_held;
+ int jump_held;
} udpClient_t;
typedef struct mvd_s {
diff --git a/wiki/doc/server.mdwn b/wiki/doc/server.mdwn
index 25c8071..fe28e7d 100644
--- a/wiki/doc/server.mdwn
+++ b/wiki/doc/server.mdwn
@@ -146,14 +146,6 @@ Each `wait` cycle lasts 0.1 second here.
MVD client
----------
-- `set mvd_shownet 0` (integer)
-Dump contents of the MVD stream as it is parsed.
-Higher values mean higher verbosity.
-
-- `set mvd_debug 0` (integer)
-Display some MVD client related development information.
-Higher values mean higher verbosity.
-
- `set mvd_timeout 120` (float)
Specifies MVD connection timeout value, in seconds.
@@ -168,6 +160,9 @@ into running state to prevent buffer overrun.
- `set mvd_default_map "q2dm1"` (string)
Specifies default map used for the Waiting Room channel.
+- `set mvd_chase_prefix "xv 0 yb -64"` (string)
+Specifies POV info string position on the screen.
+
Hacks
----------
@@ -194,13 +189,6 @@ is searched. If this file exists, then entity lump of the map being loaded
is replaced with the contents of this file. Use this feature _only_ if you
know what you are doing.
-Macros
-==========
-
-- `$sv_client` Expands to the name of the client currently being processed.
-- `$sv_clientnum` Expands to the numeric ID of the client currently being processed.
-
-
Commands
==========