From 1c8fe772e30a0fa9934e8ca2a42bf5f2ff477bb4 Mon Sep 17 00:00:00 2001 From: g-cont Date: Thu, 15 Sep 2016 00:00:00 +0300 Subject: [PATCH] 15 Sep 2016 --- engine/client/gl_warp.c | 2 +- engine/common/build.c | 4 ++-- engine/server/sv_game.c | 14 +++++++------- engine/server/sv_main.c | 13 ++++++++++++- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/engine/client/gl_warp.c b/engine/client/gl_warp.c index 4c7a1061..0e37c64f 100644 --- a/engine/client/gl_warp.c +++ b/engine/client/gl_warp.c @@ -539,7 +539,7 @@ void R_CloudTexCoord( vec3_t v, float speed, float *s, float *t ) /* =============== -Sky_DrawFaceQuad +R_CloudDrawPoly =============== */ void R_CloudDrawPoly( glpoly_t *p ) diff --git a/engine/common/build.c b/engine/common/build.c index 1a8ca7a3..7ba22144 100644 --- a/engine/common/build.c +++ b/engine/common/build.c @@ -23,7 +23,7 @@ static char mond[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int Q_buildnum( void ) { // do not touch this! Only author of Xash3D can increase buildnumbers! -#if 1 +#if 0 int m = 0, d = 0, y = 0; static int b = 0; @@ -48,6 +48,6 @@ int Q_buildnum( void ) return b; #else - return 3477; + return 3509; #endif } \ No newline at end of file diff --git a/engine/server/sv_game.c b/engine/server/sv_game.c index 6f3786e2..0ce2bd41 100644 --- a/engine/server/sv_game.c +++ b/engine/server/sv_game.c @@ -266,7 +266,7 @@ MSG_PVS send to clients potentially visible from org MSG_PHS send to clients potentially hearable from org ================= */ -qboolean SV_Send( int dest, const vec3_t origin, const edict_t *ent ) +qboolean SV_Send( int dest, const vec3_t origin, const edict_t *ent, qboolean usermessage ) { byte *mask = NULL; int j, numclients = sv_maxclients->integer; @@ -333,7 +333,7 @@ qboolean SV_Send( int dest, const vec3_t origin, const edict_t *ent ) if( cl->state == cs_free || cl->state == cs_zombie ) continue; - if( cl->state != cs_spawned && !reliable ) + if( cl->state != cs_spawned && ( !reliable || usermessage )) continue; if( specproxy && !cl->hltv_proxy ) @@ -1999,7 +1999,7 @@ void SV_StartSound( edict_t *ent, int chan, const char *sample, float vol, float BF_WriteWord( &sv.multicast, entityIndex ); BF_WriteVec3Coord( &sv.multicast, origin ); - SV_Send( msg_dest, origin, NULL ); + SV_Send( msg_dest, origin, NULL, false ); } /* @@ -2079,7 +2079,7 @@ void pfnEmitAmbientSound( edict_t *ent, float *pos, const char *sample, float vo BF_WriteWord( &sv.multicast, number ); BF_WriteVec3Coord( &sv.multicast, pos ); - SV_Send( msg_dest, pos, NULL ); + SV_Send( msg_dest, pos, NULL, false ); } /* @@ -2092,7 +2092,7 @@ void SV_StartMusic( const char *curtrack, const char *looptrack, fs_offset_t pos { BF_WriteByte( &sv.multicast, svc_stufftext ); BF_WriteString( &sv.multicast, va( "music \"%s\" \"%s\" %i\n", curtrack, looptrack, position )); - SV_Send( MSG_ALL, NULL, NULL ); + SV_Send( MSG_ALL, NULL, NULL, false ); } /* @@ -2617,7 +2617,7 @@ void pfnMessageEnd( void ) if( !VectorIsNull( svgame.msg_org )) org = svgame.msg_org; svgame.msg_dest = bound( MSG_BROADCAST, svgame.msg_dest, MSG_SPEC ); - SV_Send( svgame.msg_dest, org, svgame.msg_ent ); + SV_Send( svgame.msg_dest, org, svgame.msg_ent, true ); } /* @@ -3115,7 +3115,7 @@ int pfnRegUserMsg( const char *pszName, int iSize ) BF_WriteByte( &sv.multicast, svgame.msg[i].number ); BF_WriteByte( &sv.multicast, (byte)iSize ); BF_WriteString( &sv.multicast, svgame.msg[i].name ); - SV_Send( MSG_ALL, NULL, NULL ); + SV_Send( MSG_ALL, NULL, NULL, false ); } return svgame.msg[i].number; diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 2e989a31..0a6f34a5 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -208,7 +208,18 @@ void SV_UpdateMovevars( qboolean initialize ) // check range if( sv_zmax->value < 256.0f ) Cvar_SetFloat( "sv_zmax", 256.0f ); - if( sv_zmax->value > 131070.0f ) Cvar_SetFloat( "sv_zmax", 131070.0f ); + + // clamp it right + if( host.features & ENGINE_WRITE_LARGE_COORD ) + { + if( sv_zmax->value > 131070.0f ) + Cvar_SetFloat( "sv_zmax", 131070.0f ); + } + else + { + if( sv_zmax->value > 32767.0f ) + Cvar_SetFloat( "sv_zmax", 32767.0f ); + } svgame.movevars.gravity = sv_gravity->value; svgame.movevars.stopspeed = sv_stopspeed->value;