===================== CL_ParseCommandString Command strings are just saved off until cgame asks for them when it transitions a snapshot ===================== */
| 734 | ===================== |
| 735 | */ |
| 736 | void CL_ParseCommandString( msg_t *msg ) { |
| 737 | char *s; |
| 738 | int seq; |
| 739 | int index; |
| 740 | |
| 741 | seq = MSG_ReadLong( msg ); |
| 742 | s = MSG_ReadString( msg ); |
| 743 | |
| 744 | // see if we have already executed stored it off |
| 745 | if ( clc.serverCommandSequence >= seq ) { |
| 746 | return; |
| 747 | } |
| 748 | clc.serverCommandSequence = seq; |
| 749 | |
| 750 | index = seq & (MAX_RELIABLE_COMMANDS-1); |
| 751 | /* |
| 752 | if (s[0] == 'c' && s[1] == 's' && s[2] == ' ' && s[3] == '0' && s[4] == ' ') |
| 753 | { //yes.. we seem to have an incoming server info. |
| 754 | char *f = strstr(s, "g_debugMelee"); |
| 755 | if (f) |
| 756 | { |
| 757 | while (*f && *f != '\\') |
| 758 | { //find the \ after it |
| 759 | f++; |
| 760 | } |
| 761 | if (*f == '\\') |
| 762 | { //got it |
| 763 | int i = 0; |
| 764 | |
| 765 | f++; |
| 766 | while (*f && *f != '\\' && i < 128) |
| 767 | { |
| 768 | hiddenCvarVal[i] = *f; |
| 769 | i++; |
| 770 | f++; |
| 771 | } |
| 772 | hiddenCvarVal[i] = 0; |
| 773 | |
| 774 | //don't worry about backing over beginning of string I guess, |
| 775 | //we already know we successfully strstr'd the initial string |
| 776 | //which exceeds this length. |
| 777 | //MSG_ReadString appears to just return a static buffer so I |
| 778 | //can stomp over its contents safely. |
| 779 | f--; |
| 780 | *f = '\"'; |
| 781 | f--; |
| 782 | *f = ' '; |
| 783 | f--; |
| 784 | *f = '0'; |
| 785 | f--; |
| 786 | *f = ' '; |
| 787 | f--; |
| 788 | *f = 's'; |
| 789 | f--; |
| 790 | *f = 'c'; |
| 791 | |
| 792 | //the normal configstring gets to start here... |
| 793 | s = f; |
no test coverage detected