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

add "special warp physics" to custom warpin parameters #5561

Merged
merged 1 commit into from
Oct 15, 2023

Conversation

Goober5000
Copy link
Contributor

Supercaps use a physics flag on warpin that makes them slow down faster than they would under the normal physics code. This adds that flag as an option for custom warp parameters.

Since flags are not yet parsed when warp parameters are parsed, the code needs to skip ahead and peek at the flags in the same way as the weapon override.

Supercaps use a physics flag on warpin that makes them slow down faster than they would under the normal physics code.  This adds that flag as an option for custom warp parameters.

Since flags are not yet parsed when warp parameters are parsed, the code needs to skip ahead and peek at the flags in the same way as the weapon override.
@Goober5000 Goober5000 added enhancement A new feature or upgrade of an existing feature to add additional functionality. Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle labels Aug 16, 2023
@Goober5000 Goober5000 requested a review from Baezon September 26, 2023 17:11
@@ -2728,7 +2728,7 @@ int parse_warp_params(const WarpParams *inherit_from, WarpDirection direction, c
if (accel_exp >= 0.0f)
params.accel_exp = accel_exp;
else
Warning(LOCATION, "%s specified as less than 0 on %s '%s'; value ignored", str, info_type_name, info_name);
error_display(0, "%s specified as less than 0 on %s '%s'; value ignored", str, info_type_name, info_name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to prefer error_display? I'll admit that Warning(.. is much more intuitive to me than error_display(0, .., I can never remember which one 0 or 1 is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Increasing number = increasing severity, so 0 = warning and 1 = error.

The error_display function is specifically intended to be used while parsing. It displays the file name and line number of the file being parsed; and it also maintains warning and error counts for parsing, distinct from "all" warning and error counts.

Regular Warning and Error do not display anything about the file being parsed.

@Goober5000 Goober5000 merged commit a20f3ca into scp-fs2open:master Oct 15, 2023
@Goober5000 Goober5000 deleted the special_warp_physics branch October 15, 2023 16:42
@Goober5000 Goober5000 removed the Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle label Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or upgrade of an existing feature to add additional functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants