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

Respect game mapgen flags and save world noise params #2404

Closed
wants to merge 0 commits into from

Conversation

ShadowNinja
Copy link
Member

Rebase of #2211.

Also adds some const keywords where appropriate.

@paramat
Copy link
Contributor

paramat commented Feb 28, 2015

This is beyond my knowledge and i trust ShadowNinja has done this correctly, so approved.

@nerzhul
Copy link
Member

nerzhul commented Mar 2, 2015

Seems good for me. You can merge after fixing some comments:

override_default_settings(g_settings, &gamedefaults);
// Create world if it doesn't exist
if(!initializeWorld(m_path_world, m_gamespec.id))
throw ServerError("Failed to initialize world");
Copy link
Member

Choose a reason for hiding this comment

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

No, don't use an exception, please set a proper message and exit(1);

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with this (no need for an exception... just msg and abort)

In general I think that exceptions are used in a way that is not "good practice" throughout minetest. We shouldn't be adding/throwing more exceptions. All exceptions should follow "termination semantics" (rather than "resumption semantics" as they are in many instances throughout minetest) and in that case you may as well just... well, print a msg and abort. If resumption is appropriate then it should not be an exception at all, the "error" handled in some way and program resumes

Copy link
Member Author

Choose a reason for hiding this comment

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

  • I just moved this.
  • The client can't catch and display abort()/exit().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants