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

Unable to set fs_userpath or fs_basepath #121

Closed
DeathByDenim opened this issue Jul 29, 2022 · 0 comments · Fixed by #124
Closed

Unable to set fs_userpath or fs_basepath #121

DeathByDenim opened this issue Jul 29, 2022 · 0 comments · Fixed by #124

Comments

@DeathByDenim
Copy link
Contributor

DeathByDenim commented Jul 29, 2022

Commit 055d2a6 broke the parameters fs_userpath and fs_basepath. There used to be functions called fs_basepathChange and fs_userpathChange that would update BaseDirectory and UserDirectory, but they were replaced by CommandLineOnlyChange which doesn't update those variables.

This causes UserDirectory to be nil when running opensoldat like this:

./bin/opensoldat -fs_portable 0 -fs_userpath ~/temp/soldat/ -join 127.0.0.1 23073

Possible solution would be changing client/Client.pas:607--612 to this:

  begin
    if fs_userpath.Value = '' then
      UserDirectory := UserPathSDL
    else
      UserDirectory := IncludeTrailingPathDelimiter(fs_userpath.Value);
    if fs_basepath.Value = '' then
      BaseDirectory := BasePathSDL
    else
      BaseDirectory := IncludeTrailingPathDelimiter(fs_basepath.Value);
  end;

Though you may want to expand on that to create the directories if they don't exist.

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 a pull request may close this issue.

1 participant