-
Notifications
You must be signed in to change notification settings - Fork 85
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
debug switches UI #1696
debug switches UI #1696
Conversation
/// <summary> | ||
/// Indexes into Debug.Switches | ||
/// </summary> | ||
[Flags] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why bit flags and not multiple boolean? Is there any need to pack all bits into 1 integer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it makes more sense this way. why to write extra code? why to have code duplication?
and we are not serializing anything anymore so there is no need for array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason is that checking a processor-register wide boolean (64 bit) is faster than reading and masking a bit, with same result. Not important if all code for this is deleted in a Release build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that code won't run in Release build, at least it shouldn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just trying to keep it simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick review, testing in game...
5ae5733
to
4d107d0
Compare
@kianzarrin build is failing because: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok, fix build error :)
Debug switches are now handled by in game UI interface from the options panel and from the debug panel (code copied despawn panel).
They are not longer saved to XML since they can now be set using the UI interface.
changed debug switches to flags.
TrafficManager.zip