Renaming a unit no longer genarates an OOS error (bug #7864).
This commit is contained in:
parent
29dd806f2c
commit
880bc75c98
2 changed files with 9 additions and 4 deletions
|
@ -1,6 +1,8 @@
|
|||
Version 1.3.13+svn:
|
||||
* language and i18n:
|
||||
* updated translations: Chinese, Lithuanian
|
||||
* multiplayer:
|
||||
* renaming a unit no longer genarates an OOS error (bug #7864)
|
||||
* sound:
|
||||
* timer bell in MP starts when there are 20 seconds left and fades in
|
||||
gradually for 10 seconds (fr #10559)
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include <sstream>
|
||||
|
||||
#define LOG_REPLAY LOG_STREAM(info, replay)
|
||||
#define WRN_REPLAY LOG_STREAM(warn, replay)
|
||||
#define ERR_REPLAY LOG_STREAM(err, replay)
|
||||
|
||||
std::string replay::last_replay_error;
|
||||
|
@ -803,10 +804,12 @@ bool do_replay(game_display& disp, const gamemap& map, const game_data& gameinfo
|
|||
}
|
||||
u->second.rename(name);
|
||||
} else {
|
||||
std::stringstream errbuf;
|
||||
errbuf << "attempt to rename unit at location: "
|
||||
<< loc << ", where none exists.\n";
|
||||
replay::throw_error(errbuf.str());
|
||||
// Users can rename units while it's being killed at another machine.
|
||||
// This since the player can rename units when it's not his/her turn.
|
||||
// There's not a simple way to prevent that so in that case ignore the
|
||||
// rename instead of throwing an OOS.
|
||||
WRN_REPLAY << "attempt to rename unit at location: "
|
||||
<< loc << ", where none exists (anymore).\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue