mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-05 11:12:49 +00:00
nilrider:: do not allow saving to short replays
This commit is contained in:
parent
da5ba2bf2b
commit
4f27a969e4
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user