Introduce API events & functions to work w/replays #358
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New Functions
bool bz_isReplayServer(void)Returns true if the current BZFS process runs with the
-replayflag.bool bz_loadReplay(const char* _filename, int playerIndex = BZ_SERVERPLAYER)The BZFS API equivalent of a player running
/replay load.bool bz_replayExists(const char* _filename)Check to see if a given replay filename exists on the server.
bool bz_unloadReplay(int playerIndex = BZ_SERVERPLAYER)Reset the replay server's status and unload the current replay. This is no slash-command equivalent of this (as far as I know).
New Server Events
bz_eReplayRequestedEventReplay::loadFile-> called from/replay loadbz_eReplayLoadedEvent; any errors that happen in loading replays will be reported herebz_eReplayLoadedEventReplay::loadFile-> called from/replay loadbz_eRecordingStartedEventRecord::start/record startbz_startRecBuf()253if the server starts itbz_eRecordingEndedEventRecord:stop/record stopbz_stopRecBuf()Data fields are the same as
bz_eRecordingStartedEvent