]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
protocol: Stub DP8 protocol
authorCloudwalk <cloudwalk009@gmail.com>
Thu, 22 Jul 2021 01:22:37 +0000 (21:22 -0400)
committerCloudwalk <cloudwalk009@gmail.com>
Thu, 22 Jul 2021 01:22:37 +0000 (21:22 -0400)
cl_input.c
common.h
protocol.c

index 651e9d28ee56f6b4e928cde0458d76266de82786..ebc508677d81f36c3608f95132fb8654c26be23b 100644 (file)
@@ -1829,6 +1829,7 @@ void CL_SendMove(void)
                break;
        case PROTOCOL_DARKPLACES6:
        case PROTOCOL_DARKPLACES7:
+       case PROTOCOL_DARKPLACES8:
                cl.cmd.predicted = cl_movement.integer != 0;
                break;
        default:
@@ -1860,6 +1861,7 @@ void CL_SendMove(void)
                break;
        case PROTOCOL_DARKPLACES6:
        case PROTOCOL_DARKPLACES7:
+       case PROTOCOL_DARKPLACES8:
                // FIXME: cl.cmd.buttons & 16 is +button5, Nexuiz/Xonotic specific
                cl.cmd.crouch = (cl.cmd.buttons & 16) != 0;
                break;
@@ -1938,6 +1940,7 @@ void CL_SendMove(void)
        // PROTOCOL_DARKPLACES5  clc_move = 19 bytes total
        // PROTOCOL_DARKPLACES6  clc_move = 52 bytes total
        // PROTOCOL_DARKPLACES7  clc_move = 56 bytes total per move (can be up to 16 moves)
+       // PROTOCOL_DARKPLACES8  clc_move = 56 bytes total per move (can be up to 16 moves)
        // PROTOCOL_QUAKEWORLD   clc_move = 34 bytes total (typically, but can reach 43 bytes, or even 49 bytes with roll)
 
        // set prydon cursor info
@@ -2039,6 +2042,7 @@ void CL_SendMove(void)
                        MSG_WriteByte (&buf, cl.cmd.impulse);
                case PROTOCOL_DARKPLACES6:
                case PROTOCOL_DARKPLACES7:
+               case PROTOCOL_DARKPLACES8:
                        // set the maxusercmds variable to limit how many should be sent
                        maxusercmds = bound(1, cl_netrepeatinput.integer + 1, min(3, CL_MAX_USERCMDS));
                        // when movement prediction is off, there's not much point in repeating old input as it will just be ignored
index fa826e6025b6852d4475f61893ec9bfb031865e6..95a12ab3b98c081c04573ab7e9531df8262a8e79 100644 (file)
--- a/common.h
+++ b/common.h
@@ -131,6 +131,7 @@ void StoreLittleShort (unsigned char *buffer, unsigned short i);
 typedef enum protocolversion_e
 {
        PROTOCOL_UNKNOWN,
+       PROTOCOL_DARKPLACES8, ///< wip
        PROTOCOL_DARKPLACES7, ///< added QuakeWorld-style movement protocol to allow more consistent prediction
        PROTOCOL_DARKPLACES6, ///< various changes
        PROTOCOL_DARKPLACES5, ///< uses EntityFrame5 entity snapshot encoder/decoder which is based on a Tribes networking article at http://www.garagegames.com/articles/networking1/
index 8bdb00514a07270a93d30062deb92ea4cc1672f0..5685675562e0e51096425f306fcbf741129f09f2 100644 (file)
@@ -47,6 +47,7 @@ struct protocolversioninfo_s
 }
 protocolversioninfo[] =
 {
+       { 3505, PROTOCOL_DARKPLACES8 , "DP8"},
        { 3504, PROTOCOL_DARKPLACES7 , "DP7"},
        { 3503, PROTOCOL_DARKPLACES6 , "DP6"},
        { 3502, PROTOCOL_DARKPLACES5 , "DP5"},