Esempio n. 1
0
/*
====================
CG_ExecuteNewServerCommands

Execute all of the server commands that were received along
with this this snapshot.
====================
*/
void CG_ExecuteNewServerCommands( int latestSequence ) {
	while ( cgs.serverCommandSequence < latestSequence ) {
		if ( trap->GetServerCommand( ++cgs.serverCommandSequence ) ) {
			CG_ServerCommand();
		}
	}
}
/*
====================
CG_ExecuteServerCommands

Execute all of the server commands that were received along
with this this snapshot.
====================
*/
void CG_ExecuteServerCommands(snapshot_t* snap) {
    for (const auto& command: snap->serverCommands) {
        Cmd::PushArgs(command);
        CG_ServerCommand();
        Cmd::PopArgs();
    }
}