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

Causes error on world gen without check #212

Open
wants to merge 1 commit into
base: 1.4
Choose a base branch
from

Conversation

hiilikewiki
Copy link

Receive index out of bounds on world gen due to no dedicated server check on this.

Comment on lines +24 to +25
if (Main.dedServ)
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this and instead override IsLoadingEnabled to return !Main.dedServ

Copy link
Author

Choose a reason for hiding this comment

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

Remove this and instead override IsLoadingEnabled to return !Main.dedServ

That's not overrided in the Edit class so I assumed the authors didn't want it this way.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why would Edit need to override it?

Copy link
Author

Choose a reason for hiding this comment

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

So inheriting classes could implement it...?

Copy link
Contributor

@ExterminatorX99 ExterminatorX99 Sep 2, 2022

Choose a reason for hiding this comment

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

IsLoadingEnabled is a virtual method on ILoadable
Edit implements ILoadable, therefore IsLoadingEnabled is available to override in Edit and classes that inherit from Edit

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.

2 participants