summaryrefslogtreecommitdiff
path: root/source/sv_game.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2008-08-21 12:07:42 +0000
committerAndrey Nazarov <skuller@skuller.net>2008-08-21 12:07:42 +0000
commit6464d32435c9b42d0a02501d019fc271f7c91ceb (patch)
treef5288308b20d0261f0ac528b34eaa34b3ce7c81b /source/sv_game.c
parentbabc9ddfcd2f123f919d6586d84580698488a968 (diff)
Reworked the way datagram is built for protocol 36 clients.
Server now tries to preserve exact order of all kids of unreliable messages if entire datagram fits into network message.
Diffstat (limited to 'source/sv_game.c')
-rw-r--r--source/sv_game.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/sv_game.c b/source/sv_game.c
index 9cfb42c..fa0aefe 100644
--- a/source/sv_game.c
+++ b/source/sv_game.c
@@ -486,7 +486,7 @@ static void PF_StartSound( edict_t *edict, int channel,
mleaf_t *leaf;
int area;
player_state_t *ps;
- sound_packet_t *msg;
+ message_packet_t *msg;
if( !edict )
return;
@@ -586,9 +586,9 @@ static void PF_StartSound( edict_t *edict, int channel,
continue;
}
- msg = LIST_FIRST( sound_packet_t, &client->msg_free, entry );
+ msg = LIST_FIRST( message_packet_t, &client->msg_free, entry );
- msg->cursize = 0; // !!! make sure this does not get Z_Free'ed
+ msg->cursize = 0;
msg->flags = flags;
msg->index = soundindex;
msg->volume = volume * 255;
@@ -597,7 +597,8 @@ static void PF_StartSound( edict_t *edict, int channel,
msg->sendchan = sendchan;
List_Remove( &msg->entry );
- List_Append( &client->msg_sound, &msg->entry );
+ List_Append( &client->msg_used[0], &msg->entry );
+ client->msg_bytes += MAX_SOUND_PACKET;
}
if( svs.mvd.dummy && sv.mvd.paused < PAUSED_FRAMES ) {