Fix cs enabled for session state not being preserved between reloads
This commit is contained in:
@@ -129,7 +129,7 @@ namespace Barotrauma
|
||||
new GUITextBlock(new RectTransform(new Vector2(1f, 1f), packageFrame.RectTransform), package.Name);
|
||||
}
|
||||
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0f), msgBoxLayout.RectTransform), "CSharp mods are not sandboxed, meaning that they have unrestrictive access to your computer, please make sure you trust these mods before you continue. If you are not hosting a server, selecting cancel will only run Lua-mods.", wrap: true)
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0f), msgBoxLayout.RectTransform), "C# mods are not sandboxed, meaning that they have unrestrictive access to your computer, please make sure you trust these mods before you continue. If you are not hosting a server, selecting cancel will only run Lua mods.", wrap: true)
|
||||
{
|
||||
Wrap = true
|
||||
};
|
||||
|
||||
@@ -230,8 +230,14 @@ namespace Barotrauma
|
||||
|
||||
CoroutineManager.Invoke(() =>
|
||||
{
|
||||
#if CLIENT
|
||||
bool prevCsEnabled = _isCsEnabledForSession;
|
||||
#endif
|
||||
var state = CurrentRunState;
|
||||
SetRunState(RunState.Unloaded);
|
||||
#if CLIENT
|
||||
_isCsEnabledForSession = prevCsEnabled;
|
||||
#endif
|
||||
SetRunState(state);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user