diff --git a/nzportable.3dsx b/nzportable.3dsx index 6f1efcb..ebba525 100644 Binary files a/nzportable.3dsx and b/nzportable.3dsx differ diff --git a/nzportable.elf b/nzportable.elf index 0ca7526..cdcbb49 100755 Binary files a/nzportable.elf and b/nzportable.elf differ diff --git a/source/cl_parse.c b/source/cl_parse.c index e408a8c..11a3c97 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -952,11 +952,7 @@ void CL_ParseLimbUpdate (void) #define SHOWNET(x) if(cl_shownet.value==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x); -/* -===================== -CL_ParseServerMessage -===================== -*/ + void CL_ParseServerMessage (void) { int cmd; @@ -1087,14 +1083,6 @@ void CL_ParseServerMessage (void) Host_Error ("CL_ParseServerMessage: svc_updatename > MAX_SCOREBOARD"); strcpy (cl.scores[i].name, MSG_ReadString ()); break; - - case svc_updatefrags: - Sbar_Changed (); - i = MSG_ReadByte (); - if (i >= cl.maxclients) - Host_Error ("CL_ParseServerMessage: svc_updatefrags > MAX_SCOREBOARD"); - MSG_ReadShort (); - break; case svc_updatecolors: Sbar_Changed (); @@ -1204,6 +1192,21 @@ void CL_ParseServerMessage (void) case svc_limbupdate: CL_ParseLimbUpdate(); break; + + case svc_updatepoints: + i = MSG_ReadByte (); + if (i >= cl.maxclients) + Host_Error ("CL_ParseServerMessage: svc_updatepoints > MAX_SCOREBOARD"); + cl.scores[i].points = MSG_ReadLong (); + + break; + + case svc_updatekills: + i = MSG_ReadByte (); + if (i >= cl.maxclients) + Host_Error ("CL_ParseServerMessage: svc_updatekills > MAX_SCOREBOARD"); + cl.scores[i].kills = MSG_ReadShort (); + break; } } } diff --git a/source/host.c b/source/host.c index 059ed62..807c3f6 100644 --- a/source/host.c +++ b/source/host.c @@ -375,7 +375,8 @@ void SV_DropClient (qboolean crash) // free the client (the body stays around) host_client->active = false; host_client->name[0] = 0; - host_client->old_frags = -999999; + host_client->old_points = -999999; + host_client->old_kills = -999999; net_activeconnections--; // send notification to all clients @@ -386,12 +387,12 @@ void SV_DropClient (qboolean crash) MSG_WriteByte (&client->message, svc_updatename); MSG_WriteByte (&client->message, host_client - svs.clients); MSG_WriteString (&client->message, ""); - MSG_WriteByte (&client->message, svc_updatefrags); + MSG_WriteByte (&client->message, svc_updatepoints); + MSG_WriteByte (&client->message, host_client - svs.clients); + MSG_WriteLong (&client->message, 0); + MSG_WriteByte (&client->message, svc_updatekills); MSG_WriteByte (&client->message, host_client - svs.clients); MSG_WriteShort (&client->message, 0); - MSG_WriteByte (&client->message, svc_updatecolors); - MSG_WriteByte (&client->message, host_client - svs.clients); - MSG_WriteByte (&client->message, 0); } } diff --git a/source/host_cmd.c b/source/host_cmd.c index 278b9bf..d33fe6e 100644 --- a/source/host_cmd.c +++ b/source/host_cmd.c @@ -1328,12 +1328,12 @@ void Host_Spawn_f (void) MSG_WriteByte (&host_client->message, svc_updatename); MSG_WriteByte (&host_client->message, i); MSG_WriteString (&host_client->message, client->name); - MSG_WriteByte (&host_client->message, svc_updatefrags); + MSG_WriteByte (&host_client->message, svc_updatepoints); MSG_WriteByte (&host_client->message, i); - MSG_WriteShort (&host_client->message, client->old_frags); - MSG_WriteByte (&host_client->message, svc_updatecolors); + MSG_WriteLong (&host_client->message, client->old_points); + MSG_WriteByte (&host_client->message, svc_updatekills); MSG_WriteByte (&host_client->message, i); - MSG_WriteByte (&host_client->message, client->colors); + MSG_WriteShort (&host_client->message, client->old_kills); } // send all current light styles diff --git a/source/protocol.h b/source/protocol.h index c4f5e8f..f2e4936 100644 --- a/source/protocol.h +++ b/source/protocol.h @@ -101,7 +101,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // [string]...[0]sounds cache #define svc_lightstyle 12 // [byte] [string] #define svc_updatename 13 // [byte] [string] -#define svc_updatefrags 14 // [byte] [short] +#define svc_updatepoints 14 // [byte] [short] + #define svc_clientdata 15 // #define svc_stopsound 16 // #define svc_updatecolors 17 // [byte] [byte] diff --git a/source/server.h b/source/server.h index 092f1f7..e7c2070 100644 --- a/source/server.h +++ b/source/server.h @@ -105,7 +105,11 @@ typedef struct client_s float spawn_parms[NUM_SPAWN_PARMS]; // client known data for deltas - int old_frags; + //int old_frags; + + int old_points; + int old_kills; + } client_t; diff --git a/source/sv_main.c b/source/sv_main.c index da3e5d5..175ff56 100644 --- a/source/sv_main.c +++ b/source/sv_main.c @@ -746,7 +746,36 @@ void SV_UpdateToReliableMessages (void) // check for changes to be sent over the reliable streams for (i=0, host_client = svs.clients ; iold_points != host_client->edict->v.points) + { + for (j=0, client = svs.clients ; jactive) + continue; + MSG_WriteByte (&client->message, svc_updatepoints); + MSG_WriteByte (&client->message, i); + MSG_WriteLong (&client->message, host_client->edict->v.points); + } + host_client->old_points = host_client->edict->v.points; + } + } + + for (i=0, host_client = svs.clients ; iold_kills != host_client->edict->v.kills) + { + for (j=0, client = svs.clients ; jactive) + continue; + MSG_WriteByte (&client->message, svc_updatekills); + MSG_WriteByte (&client->message, i); + MSG_WriteShort (&client->message, host_client->edict->v.kills); + } + + host_client->old_points = host_client->edict->v.points; + } } for (j=0, client = svs.clients ; j