diff options
author | Andrey Nazarov <skuller@skuller.net> | 2009-06-19 21:49:15 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2009-06-19 21:49:15 +0000 |
commit | c0c85e61cdaa1dbe7fb8990cea0938413c1568a2 (patch) | |
tree | b421e66a7d802e6802dc375ad578d273d8e6449e /source/sv_main.c | |
parent | 63ff9c8b7a9babeef2823691839e9c157c4d5d8a (diff) |
New minor Q2PRO protocol version 1016.
Write entity angles as shorts for Q2PRO clients for smooth ‘func_rotating’ movement.
Got rid of U_SOLID32/U_MASK, use msgEsFlags_t exclusively.
Always draw ‘paused’ pic when paused.
Fixed server side game pausing.
Use extended ‘solid’ field when creating baselines for clients with MSG_ES_LONGSOLID bit set.
Diffstat (limited to 'source/sv_main.c')
-rw-r--r-- | source/sv_main.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/source/sv_main.c b/source/sv_main.c index afdbb8f..b708b3f 100644 --- a/source/sv_main.c +++ b/source/sv_main.c @@ -847,6 +847,12 @@ static void SVC_DirectConnect( void ) { } newcl->pmp.strafehack = sv_strafejump_hack->integer >= i ? qtrue : qfalse; + if( protocol == PROTOCOL_VERSION_R1Q2 ) { + if( version >= PROTOCOL_VERSION_R1Q2_LONG_SOLID ) { + newcl->esFlags |= MSG_ES_LONGSOLID; + } + } + // q2pro extensions i = 2; if( protocol == PROTOCOL_VERSION_Q2PRO ) { @@ -855,9 +861,15 @@ static void SVC_DirectConnect( void ) { } newcl->pmp.flyhack = qtrue; newcl->pmp.flyfriction = 4; + if( version >= PROTOCOL_VERSION_Q2PRO_LONG_SOLID ) { + newcl->esFlags |= MSG_ES_LONGSOLID; + } if( version >= PROTOCOL_VERSION_Q2PRO_WATERJUMP_HACK ) { i = 1; } + if( version >= PROTOCOL_VERSION_Q2PRO_ANGLES16 ) { + newcl->esFlags |= MSG_ES_ANGLES16; + } } newcl->pmp.waterhack = sv_waterjump_hack->integer >= i ? qtrue : qfalse; @@ -1499,11 +1511,12 @@ void SV_Frame( unsigned msec ) { return; } -#if 0//USE_CLIENT - // pause if there is only local client on the server +#if USE_CLIENT + // pause if there is only local client spawned on the server if( !dedicated->integer && cl_paused->integer && List_Count( &svs.udp_client_list ) == 1 && mvdconns == 0 && - LIST_FIRST( client_t, &svs.udp_client_list, entry )->state == cs_spawned ) + LIST_FIRST( client_t, &svs.udp_client_list, entry )->state == cs_spawned && + LIST_FIRST( client_t, &svs.udp_client_list, entry )->lastframe > 0 ) { if( !sv_paused->integer ) { Cvar_Set( "sv_paused", "1" ); |