mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Rumors: avoid repeating of same rumor twice in a row
Multiple rumors of same type can go in a row, but not identical rumors.
This commit is contained in:
@@ -219,6 +219,7 @@ struct DLL_LINKAGE RumorState
|
||||
std::map<ERumorType, std::pair<int, int>> last;
|
||||
|
||||
RumorState(){type = RUMOR_NONE; last = {};};
|
||||
bool update(int id, int player);
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int version)
|
||||
{
|
||||
@@ -371,7 +372,7 @@ public:
|
||||
{
|
||||
h & rumor;
|
||||
}
|
||||
else
|
||||
else if(!h.saving)
|
||||
rumor = RumorState();
|
||||
|
||||
BONUS_TREE_DESERIALIZATION_FIX
|
||||
|
||||
Reference in New Issue
Block a user