mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-01 11:00:41 +00:00
add [start] tag to server replays as needed by gfgtdf
this should have been part of 121, but wasn't digest from irc logs: post PR 121, all [replay]'s are expected to begin with an item [command] [start] [/start] [/command] which may also contain some [checkup] children which help to ensure that we didnt go OOS in prestart. these commands are not generated by the server and distributed, because we want the clients to begin loading the game without waiting for the server to finish. all clients, including observers, will add them automatically. the server therefore should not add them to the history, and rather just prepend them to [replay] when generating the savefile.
This commit is contained in:
parent
4c9c25ade1
commit
f25511d2ee
@ -1418,7 +1418,10 @@ void game::save_replay() {
|
||||
<< "mp_game_title=\"" << name_ << "\"\n"
|
||||
<< "random_seed=\"" << level_["random_seed"] << "\"\n"
|
||||
<< "version=\"" << level_["version"] << "\"\n"
|
||||
<< "[replay]\n" << replay_commands << "[/replay]\n"
|
||||
<< "[replay]\n"
|
||||
<< "\t[command]\n\t\t[start]\n\t\t[/start]\n\t[/command]\n" //this is required by gfgtdf's sync mechanism, in PR 121
|
||||
<< replay_commands
|
||||
<< "[/replay]\n"
|
||||
<< "[replay_start]\n" << level_.output() << "[/replay_start]\n";
|
||||
|
||||
name << " (" << id_ << ").bz2";
|
||||
|
Loading…
x
Reference in New Issue
Block a user