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

MP: PM_VehicleViewAngles: fix use of uninitialized variables #665

Merged
merged 1 commit into from Aug 9, 2015

Conversation

smcv
Copy link
Contributor

@smcv smcv commented May 8, 2015

We shouldn't use clampMin or clampMax until they have been set,
at which point setAngles is set to true. Initializing it to true
defeats that.

We shouldn't use clampMin or clampMax until they have been set,
at which point setAngles is set to true. Initializing it to true
defeats that.
@ensiform
Copy link
Member

ensiform commented May 8, 2015

Certain this won't affect the cgame<>game being in sync? Being that its a bg_pmove change.

@smcv
Copy link
Contributor Author

smcv commented May 8, 2015

In the cases where it matters (if such cases exist in practice), they'd be out of sync anyway, because the game code would be using uninitialized stack memory for the view angles; that seems unlikely to yield consistent results.

@xycaleth
Copy link
Member

xycaleth commented Aug 9, 2015

I think this change makes sense. Without the change, the client and server may have been out of sync anyway if neither clampMin nor clampMax were set.

xycaleth added a commit that referenced this pull request Aug 9, 2015
MP: PM_VehicleViewAngles: fix use of uninitialized variables
@xycaleth xycaleth merged commit bf48278 into JACoders:master Aug 9, 2015
@smcv smcv deleted the uninitialized branch August 9, 2015 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants