Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.6.1: disable hardcoded SetRestartPoint #2172

Merged

Conversation

ivan-mogilko
Copy link
Contributor

@ivan-mogilko ivan-mogilko commented Oct 10, 2023

Resolve #1306.

The purpose of this change is to remove a hardcoded call to SetRestartPoint at the start of the game, which may be unwanted if the game uses its own save rules or custom saves.

Users should be advised to call SetRestartPoint manually at the end of game_start() instead: that will have equivalent result.
This change needs to be added to every template, and also noted in the manual.

  1. Disables hardcoded SetRestartPoint at the game start in the engine.
    NOTE: pre-3.6.1 games still have it run, for backwards compatibility.
  2. On project upgrade, insert a SetRestartPoint() call to the game_start() found in GlobalScript.asc. This is for user's convenience. Ironically this is 99% of the changes in this PR. But I may disable or remove this if it's found to be not a good addition.

NOTE 2: for ags4 we should perhaps simply deprecate SetRestartPoint and remove it from use, but that's another problem.

@ivan-mogilko ivan-mogilko added type: enhancement a suggestion or necessity to have something improved context: game logic labels Oct 10, 2023
@ivan-mogilko ivan-mogilko force-pushed the 361--noautorestorepoint branch from 46d00db to 419f3c9 Compare October 13, 2023 10:03
@ivan-mogilko ivan-mogilko force-pushed the 361--noautorestorepoint branch from e063526 to d9c12f0 Compare October 13, 2023 10:15
@ivan-mogilko ivan-mogilko merged commit 9adc7ea into adventuregamestudio:master Oct 15, 2023
20 checks passed
@ivan-mogilko ivan-mogilko deleted the 361--noautorestorepoint branch October 15, 2023 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context: game logic type: enhancement a suggestion or necessity to have something improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A way to disable automatic save at startup
1 participant