mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-27 03:47:40 +00:00
nilrider:: do not allow saving to short replays
This commit is contained in:
@@ -196,6 +196,7 @@ void level::load_manual_as_ghost(manual_replay& r) {
|
|||||||
|
|
||||||
void save_manual_replay() {
|
void save_manual_replay() {
|
||||||
vector<int> ang;
|
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);
|
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)});
|
curlev->manual_replays.emplace_back(manual_replay{new_replay_name(), my_scheme, apply_rle(ang)});
|
||||||
save();
|
save();
|
||||||
|
|||||||
Reference in New Issue
Block a user