X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsnapshot.c;h=1262ee88b2abda4f66173503e70240c2d0f42674;hb=4b722be68436ced0b7bb3eff61ed14d6c66df949;hp=f57cb5fa6dd757f8de167541aecaaf77006d54be;hpb=f6bcc10ce7b517f04eb5cddf01c9ec29ee729b7e;p=rocksndiamonds.git diff --git a/src/libgame/snapshot.c b/src/libgame/snapshot.c index f57cb5fa..1262ee88 100644 --- a/src/libgame/snapshot.c +++ b/src/libgame/snapshot.c @@ -133,11 +133,12 @@ boolean LoadSnapshotSingle() return FALSE; } -boolean LoadSnapshotFromList_Older() +boolean LoadSnapshotFromList_Older(int steps) { if (snapshot_current->next) { - snapshot_current = snapshot_current->next; + while (snapshot_current->next && steps--) + snapshot_current = snapshot_current->next; LoadSnapshotBuffers(snapshot_current->content); @@ -151,11 +152,12 @@ boolean LoadSnapshotFromList_Older() return FALSE; } -boolean LoadSnapshotFromList_Newer() +boolean LoadSnapshotFromList_Newer(int steps) { if (snapshot_current->prev) { - snapshot_current = snapshot_current->prev; + while (snapshot_current->prev && steps--) + snapshot_current = snapshot_current->prev; LoadSnapshotBuffers(snapshot_current->content);