summaryrefslogtreecommitdiff
path: root/source/sv_main.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2009-07-03 20:07:58 +0000
committerAndrey Nazarov <skuller@skuller.net>2009-07-03 20:07:58 +0000
commitb8a99ae139b62ce1b152fbca4b56b69818f12a46 (patch)
treefb4cf9cde47c8b2a5f29c55140620a747fb913ca /source/sv_main.c
parentc0c85e61cdaa1dbe7fb8990cea0938413c1568a2 (diff)
Don't write entity angles as shorts, wasting around 16 bytes per frame is too much.
Marked Q2PRO protocol version 1016 as reserved, reverted current version to 1015. Save 2 bytes for Q2PRO clients on entities with EF_QUAD by sending ‘effects’ as shorts. Read U_SKIN16 as unsigned short (hardly ever used though).
Diffstat (limited to 'source/sv_main.c')
-rw-r--r--source/sv_main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/sv_main.c b/source/sv_main.c
index b708b3f..e6d8ed4 100644
--- a/source/sv_main.c
+++ b/source/sv_main.c
@@ -673,6 +673,9 @@ static void SVC_DirectConnect( void ) {
version = atoi( s );
clamp( version, PROTOCOL_VERSION_Q2PRO_MINIMUM,
PROTOCOL_VERSION_Q2PRO_CURRENT );
+ if( version == PROTOCOL_VERSION_Q2PRO_RESERVED ) {
+ version--; // never use this version
+ }
} else {
version = PROTOCOL_VERSION_Q2PRO_MINIMUM;
}
@@ -861,15 +864,13 @@ static void SVC_DirectConnect( void ) {
}
newcl->pmp.flyhack = qtrue;
newcl->pmp.flyfriction = 4;
+ newcl->esFlags |= MSG_ES_UMASK;
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;