1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-10-18 06:30:41 +00:00

nilrider:: do not allow saving to short replays

This commit is contained in:
Zeno Rogue 2024-08-20 19:13:51 +02:00
parent da5ba2bf2b
commit 4f27a969e4

View File

@ -196,6 +196,7 @@ void level::load_manual_as_ghost(manual_replay& r) {
void save_manual_replay() {
vector<int> ang;
if(curlev->history.back().timer < 5) { addMessage("too short -- not saving"); return; }
for(auto& h: curlev->history) ang.push_back(h.on_surface ? heading_to_int(h.heading_angle) : 0);
curlev->manual_replays.emplace_back(manual_replay{new_replay_name(), my_scheme, apply_rle(ang)});
save();