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

Fix being able to pass through invalid ballistic values #6398

Merged
merged 4 commits into from
Aug 9, 2024

Conversation

Garanas
Copy link
Member

@Garanas Garanas commented Aug 9, 2024

Description of the proposed changes

If you pass in an invalid value to SetBallisticAcceleration then the simulation will freeze up. This is a bug in the engine, but we can 'fix' it in Lua by simply error'ing out if we see such a value.

Testing done on the proposed changes

Ran a game and tested/confirmed that regular values are untouched and all variants of invalid values are caught.

Additional context

Possibly related to:

Checklist

  • Changes are annotated, including comments where useful
  • Changes are documented in the changelog for the next game version

Garanas added a commit that referenced this pull request Aug 9, 2024
## Description of the proposed changes

Document the support for method chaining of the projectile engine
methods. I noticed this behavior as I was working on #6398.

## Testing done on the proposed changes

I called every function and checked the output of the log with logging
the instance. If the references match then the function supports method
chaining.

```
LOG(self) -- returns memory reference
LOG("ChangeDetonateAboveHeight", self:ChangeDetonateAboveHeight(0)) -- returns nil
LOG("SetLifetime", self:SetLifetime(10)) -- returns memory reference
```

## Checklist
- [x] Changes are annotated, including comments where useful
- [x] Changes are documented in the changelog for the next game version
@Garanas Garanas merged commit 0a3a52e into develop Aug 9, 2024
5 checks passed
@Garanas Garanas deleted the Fix/invalid-ballistic-values branch August 9, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant