Fence legacy peers from an unrepresentable custody publication

This commit is contained in:
faumaray committed 2026-12-02 23:13:59 +03:00
1 parent 1b57183939
commit 83a57cbe46
7 files changed
+256 -21

No files matched your search

+5 -1
View File
@@ -76,7 +76,11 @@ bool ViewerSession::can_submit() const {
bool ViewerSession::can_host_legacy() const {
const auto current = runtime_.view();
return !guest_ && !changing_world_ && current.state == RuntimeState::Running &&
current.snapshot->rules && *current.snapshot->rules == supported_rules_;
current.snapshot && current.snapshot->rules && *current.snapshot->rules == supported_rules_ &&
current.snapshot->world && current.snapshot->world->scenario_active() &&
current.snapshot->world->width() == first_colony_map_size &&
current.snapshot->world->height() == first_colony_map_size &&
current.snapshot->world->legacy_representable();
}
std::optional<std::uint64_t> ViewerSession::submit(SessionPayload payload) {