====================== CL_AddReliableCommand The given command will be transmitted to the server, and is gauranteed to not have future usercmd_t executed before it is executed ====================== */
| 113 | ====================== |
| 114 | */ |
| 115 | void CL_AddReliableCommand( const char *cmd ) { |
| 116 | int index; |
| 117 | |
| 118 | // if we would be losing an old command that hasn't been acknowledged, |
| 119 | // we must drop the connection |
| 120 | if ( clc.reliableSequence - clc.reliableAcknowledge > MAX_RELIABLE_COMMANDS ) { |
| 121 | Com_Error( ERR_DROP, "Client command overflow" ); |
| 122 | } |
| 123 | clc.reliableSequence++; |
| 124 | index = clc.reliableSequence & ( MAX_RELIABLE_COMMANDS - 1 ); |
| 125 | if ( clc.reliableCommands[ index ] ) { |
| 126 | Z_Free( clc.reliableCommands[ index ] ); |
| 127 | } |
| 128 | clc.reliableCommands[ index ] = CopyString( cmd ); |
| 129 | } |
| 130 | |
| 131 | //====================================================================== |
| 132 |
no test coverage detected