Fix TODO note about too many wandering monsters

This commit is contained in:
2025-04-21 10:35:41 -05:00
parent acc1b0d40a
commit acee151bf2
2 changed files with 10 additions and 1 deletions

View File

@@ -110,7 +110,8 @@ std::map<std::string,std::vector<std::string>> feature_flags = {
{"file-picker-dialog", {"V1"}},
{"scenario-meta-format", {"V2"}},
// Bugs required for several VoDT test replays to run faithfully
{"empty-wandering-monster-bug", {"fixed"}}
{"empty-wandering-monster-bug", {"fixed"}},
{"too-many-extra-wandering-monsters-bug", {"fixed"}}
};
struct cParseEntrance {

View File

@@ -81,6 +81,14 @@ void create_wand_monst() {
if(!is_blocked(p_loc))
place_monster(univ.town->wandering[r1].monst[i],p_loc);
}
// Buggy behavior of this code, preserved so old replays will run correctly,
// would create more than 1-2 of the last monster type, contradicting the
// documentation.
if(!has_feature_flag("too-many-extra-wandering-monsters-bug", "fixed")){
try_place_extra_monster();
}
}
if(has_feature_flag("too-many-extra-wandering-monsters", "fixed")){
try_place_extra_monster();
}
}