diff options
-rw-r--r-- | source/cl_main.c | 1 | ||||
-rw-r--r-- | source/cl_parse.c | 4 | ||||
-rw-r--r-- | source/g_public.h | 1 | ||||
-rw-r--r-- | source/pmove.c | 8 | ||||
-rw-r--r-- | source/sv_game.c | 2 | ||||
-rw-r--r-- | source/sv_main.c | 6 | ||||
-rw-r--r-- | source/sv_mvd.c | 2 | ||||
-rw-r--r-- | source/ui_multiplayer.c | 8 |
8 files changed, 20 insertions, 12 deletions
diff --git a/source/cl_main.c b/source/cl_main.c index 9b9356c..db106fe 100644 --- a/source/cl_main.c +++ b/source/cl_main.c @@ -1085,7 +1085,6 @@ qboolean CL_SendStatusRequest( char *buffer, int bufferSize ) { Com_ProcessEvents(); return qtrue; - } diff --git a/source/cl_parse.c b/source/cl_parse.c index abf1257..98f3ba4 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -844,7 +844,9 @@ static void CL_ParseServerData( void ) { cl.pmp.flyfriction = 9; cl.pmp.airaccelerate = 0; cl.gametype = GT_DEATHMATCH; - //cl.pmp.highprec=qtrue; +#ifdef PMOVE_HACK + cl.pmp.highprec = qtrue; +#endif if( cls.serverProtocol == PROTOCOL_VERSION_R1Q2 ) { i = MSG_ReadByte(); if( i ) { diff --git a/source/g_public.h b/source/g_public.h index 4e61e7b..3a07639 100644 --- a/source/g_public.h +++ b/source/g_public.h @@ -42,6 +42,7 @@ SOLID_BSP // bsp clip, touch on edge #define GAME_FEATURE_CLIENTNUM 1 #define GAME_FEATURE_PROPERINUSE 2 +#define GAME_FEATURE_MVDSPEC 4 //=============================================================== diff --git a/source/pmove.c b/source/pmove.c index 9903574..8d5a8f8 100644 --- a/source/pmove.c +++ b/source/pmove.c @@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "config.h" #include "com_local.h" @@ -585,6 +586,7 @@ void PM_AirMove (void) pml.velocity[2] = 0; //!!! this is before the accel PM_Accelerate (wishdir, wishspeed, pm_accelerate); + // PGM -- fix for negative trigger_gravity fields // pml.velocity[2] = 0; if(pm->s.gravity > 0) @@ -1031,7 +1033,7 @@ void PM_SnapPosition (void) int i, j, bits; short base[3]; // try all single bits first - static int jitterbits[8] = {0,4,1,2,3,5,6,7}; + static const int jitterbits[8] = {0,4,1,2,3,5,6,7}; #ifdef PMOVE_HACK if( pmp->highprec ) { @@ -1051,7 +1053,7 @@ void PM_SnapPosition (void) else sign[i] = -1; pm->s.origin[i] = (int)(pml.origin[i]*8); - if (pm->s.origin[i]*0.125 == pml.origin[i]) + if (pm->s.origin[i]*0.125f == pml.origin[i]) sign[i] = 0; } VectorCopy (pm->s.origin, base); @@ -1095,7 +1097,7 @@ void PM_InitialSnapPosition(void) { int x, y, z; short base[3]; - static int offset[3] = { 0, -1, 1 }; + static const int offset[3] = { 0, -1, 1 }; VectorCopy (pm->s.origin, base); diff --git a/source/sv_game.c b/source/sv_game.c index d2c4eba..e3bcd54 100644 --- a/source/sv_game.c +++ b/source/sv_game.c @@ -938,7 +938,7 @@ void SV_InitGameProgs ( void ) // get features ggf = Sys_GetProcAddress( game_library, "GetGameFeatures" ); if( ggf ) { - gameFeatures = ggf( GAME_FEATURE_CLIENTNUM ); + gameFeatures = ggf( GAME_FEATURE_CLIENTNUM|GAME_FEATURE_MVDSPEC ); } else { gameFeatures = 0; } diff --git a/source/sv_main.c b/source/sv_main.c index 58c1c59..21d2935 100644 --- a/source/sv_main.c +++ b/source/sv_main.c @@ -723,6 +723,9 @@ static void SVC_DirectConnect( void ) { Q_strncpyz( userinfo, info, sizeof( userinfo ) ); + // make sure mvdspec key is not set + Info_RemoveKey( userinfo, "mvdspec" ); + // force the IP key/value pair so the game can filter based on ip s = NET_AdrToString( &net_from ); if( !Info_AttemptSetValueForKey( userinfo, "ip", s ) ) { @@ -793,6 +796,9 @@ static void SVC_DirectConnect( void ) { newcl->pmp.flyfriction = 9; newcl->pmp.waterfriction = 1; newcl->pmp.airaccelerate = sv_airaccelerate->integer ? qtrue : qfalse; +#ifdef PMOVE_HACK + newcl->pmp.highprec = qtrue; +#endif // r1q2 extensions if( protocol == PROTOCOL_VERSION_R1Q2 || diff --git a/source/sv_mvd.c b/source/sv_mvd.c index ed6711f..1e38f6c 100644 --- a/source/sv_mvd.c +++ b/source/sv_mvd.c @@ -374,7 +374,7 @@ qboolean SV_MvdCreateDummy( void ) { List_Init( &newcl->entry ); Com_sprintf( userinfo, sizeof( userinfo ), - "\\name\\[MVDSPEC]\\skin\\male/grunt\\mvdversion\\%d\\ip\\loopback", + "\\name\\[MVDSPEC]\\skin\\male/grunt\\mvdspec\\%d\\ip\\loopback", PROTOCOL_VERSION_MVD_MINOR ); svs.mvd.dummy = newcl; diff --git a/source/ui_multiplayer.c b/source/ui_multiplayer.c index a256ae6..ff92d33 100644 --- a/source/ui_multiplayer.c +++ b/source/ui_multiplayer.c @@ -250,17 +250,15 @@ static void AddUnlistedServers( void ) { // save original address strcpy( slot->address, address ); - - // resolve real ip - client.SendStatusRequest( address, sizeof( address ) ); - - // save real ip strcpy( slot->realAddress, address ); s = UI_FormatColumns( 3, slot->address, "???", "?/?" ); m_join.names[m_join.list.numItems++] = s; m_join.names[m_join.list.numItems] = NULL; + // ping and resolve real ip + client.SendStatusRequest( slot->realAddress, sizeof( slot->realAddress ) ); + client.UpdateScreen(); } } |