diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj b/Barotrauma/BarotraumaClient/LinuxClient.csproj index 0f4ce6313..582197662 100644 --- a/Barotrauma/BarotraumaClient/LinuxClient.csproj +++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.1100.0.4 + 0.1300.0.0 Copyright © FakeFish 2018-2020 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj b/Barotrauma/BarotraumaClient/MacClient.csproj index 784b6f961..f1b452084 100644 --- a/Barotrauma/BarotraumaClient/MacClient.csproj +++ b/Barotrauma/BarotraumaClient/MacClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.1100.0.4 + 0.1300.0.0 Copyright © FakeFish 2018-2020 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj index 33ca74fff..df309ecde 100644 --- a/Barotrauma/BarotraumaClient/WindowsClient.csproj +++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.1100.0.4 + 0.1300.0.0 Copyright © FakeFish 2018-2020 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaClient/soft_oal_x64.dll b/Barotrauma/BarotraumaClient/soft_oal_x64.dll index 7ca46d8c3..707098d6e 100644 Binary files a/Barotrauma/BarotraumaClient/soft_oal_x64.dll and b/Barotrauma/BarotraumaClient/soft_oal_x64.dll differ diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj b/Barotrauma/BarotraumaServer/LinuxServer.csproj index 6e5118dfc..144798777 100644 --- a/Barotrauma/BarotraumaServer/LinuxServer.csproj +++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 0.1100.0.4 + 0.1300.0.0 Copyright © FakeFish 2018-2020 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj b/Barotrauma/BarotraumaServer/MacServer.csproj index 227414706..948c1a039 100644 --- a/Barotrauma/BarotraumaServer/MacServer.csproj +++ b/Barotrauma/BarotraumaServer/MacServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 0.1100.0.4 + 0.1300.0.0 Copyright © FakeFish 2018-2020 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj b/Barotrauma/BarotraumaServer/WindowsServer.csproj index f210efa42..2bad80822 100644 --- a/Barotrauma/BarotraumaServer/WindowsServer.csproj +++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 0.1100.0.4 + 0.1300.0.0 Copyright © FakeFish 2018-2020 AnyCPU;x64 DedicatedServer diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 23a482301..ed0ef8d52 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,11 +3,14 @@ Welcome to Barotrauma's GitHub repository! If you're here to report an issue or to contribute to the development, please read the instructions below before you do. ## I have a question! -Please check [our FAQ](https://barotraumagame.com/faq/) in case the question has already been answered. If not, you can post the question on the [Barotrauma discussion forum](https://undertowgames.com/forum/viewforum.php?f=17) or stop by at our [Discord Server](discord.gg/undertow). +Please check [our FAQ](https://barotraumagame.com/faq/) in case the question has already been answered. If not, you should stop by at our [Discord Server](discord.gg/undertow) and [Steam forums](https://steamcommunity.com/app/602960/discussions/). ## Reporting a bug If you've encountered a bug, you can report it in the [issue tracker](https://github.com/Regalis11/Barotrauma/issues). Please follow the instructions in the issue template to make it easier for us to diagnose and fix the issue. +## Sharing ideas and suggestions +To keep the number of tickets in the issue tracker manageable, please do not post feature requests as tickets. Instead, you can use the [Discussions section](https://github.com/Regalis11/Barotrauma/discussions) to share and discuss feedback, ideas and suggestions for future development. + ## Code contributions Before you start doing modifications to the code or submitting pull requests to the repository, it is important that you've read and understood (at least the human-readable summary part) of [our EULA](https://github.com/Regalis11/Barotrauma/blob/master/EULA.txt). To sum it up, Barotrauma is not an open source project in the sense of free, open source software that you can freely distribute or reuse. Even though the early versions of the game have been available for free, current versions of the game have a price tag. If you're not comfortable with your contributions potentially being used in a commercial product, do not submit pull requests to the repository. diff --git a/Libraries/Concentus/CSharp/Concentus/Concentus.NetStandard.csproj b/Libraries/Concentus/CSharp/Concentus/Concentus.NetStandard.csproj index 8bdd4fac7..99073a079 100644 --- a/Libraries/Concentus/CSharp/Concentus/Concentus.NetStandard.csproj +++ b/Libraries/Concentus/CSharp/Concentus/Concentus.NetStandard.csproj @@ -12,4 +12,9 @@ https://github.com/lostromb/concentus + + full + true + + diff --git a/Libraries/Facepunch.Steamworks/Structs/LobbyQuery.cs b/Libraries/Facepunch.Steamworks/Structs/LobbyQuery.cs index 384fede30..1401e5820 100644 --- a/Libraries/Facepunch.Steamworks/Structs/LobbyQuery.cs +++ b/Libraries/Facepunch.Steamworks/Structs/LobbyQuery.cs @@ -43,21 +43,44 @@ namespace Steamworks.Data #region String key/value filter internal Dictionary stringFilters; + + internal Dictionary> stringFiltersExclude; + /// /// Filter by specified key/value pair; string parameters /// - public LobbyQuery WithKeyValue( string key, string value ) + public LobbyQuery WithKeyValue(string key, string value) { - if ( string.IsNullOrEmpty( key ) ) - throw new System.ArgumentException( "Key string provided for LobbyQuery filter is null or empty", nameof( key ) ); + if (string.IsNullOrEmpty(key)) + throw new System.ArgumentException("Key string provided for LobbyQuery filter is null or empty", nameof(key)); - if ( key.Length > SteamMatchmaking.MaxLobbyKeyLength ) - throw new System.ArgumentException( $"Key length is longer than {SteamMatchmaking.MaxLobbyKeyLength}", nameof( key ) ); + if (key.Length > SteamMatchmaking.MaxLobbyKeyLength) + throw new System.ArgumentException($"Key length is longer than {SteamMatchmaking.MaxLobbyKeyLength}", nameof(key)); - if ( stringFilters == null ) + if (stringFilters == null) stringFilters = new Dictionary(); - stringFilters.Add( key, value ); + stringFilters.Add(key, value); + + return this; + } + + public LobbyQuery WithoutKeyValue(string key, string value) + { + if (string.IsNullOrEmpty(key)) + throw new System.ArgumentException("Key string provided for LobbyQuery filter is null or empty", nameof(key)); + + if (key.Length > SteamMatchmaking.MaxLobbyKeyLength) + throw new System.ArgumentException($"Key length is longer than {SteamMatchmaking.MaxLobbyKeyLength}", nameof(key)); + + if (stringFiltersExclude == null) + stringFiltersExclude = new Dictionary>(); + + if (!stringFiltersExclude.ContainsKey(key)) + { + stringFiltersExclude.Add(key, new List()); + } + stringFiltersExclude[key].Add(value); return this; } @@ -184,20 +207,26 @@ namespace Steamworks.Data SteamMatchmaking.Internal.AddRequestLobbyListFilterSlotsAvailable( slotsAvailable.Value ); } - if ( maxResults.HasValue ) + if (stringFilters != null) { - SteamMatchmaking.Internal.AddRequestLobbyListResultCountFilter( maxResults.Value ); - } - - if ( stringFilters != null ) - { - foreach ( var k in stringFilters ) + foreach (var k in stringFilters) { - SteamMatchmaking.Internal.AddRequestLobbyListStringFilter( k.Key, k.Value, LobbyComparison.Equal ); + SteamMatchmaking.Internal.AddRequestLobbyListStringFilter(k.Key, k.Value, LobbyComparison.Equal); } } - if( numericalFilters != null ) + if (stringFiltersExclude != null) + { + foreach (var k in stringFiltersExclude) + { + foreach (var v in k.Value) + { + SteamMatchmaking.Internal.AddRequestLobbyListStringFilter(k.Key, v, LobbyComparison.NotEqual); + } + } + } + + if ( numericalFilters != null ) { foreach ( var n in numericalFilters ) { @@ -212,6 +241,11 @@ namespace Steamworks.Data SteamMatchmaking.Internal.AddRequestLobbyListNearValueFilter( v.Key, v.Value ); } } + + if (maxResults.HasValue) + { + SteamMatchmaking.Internal.AddRequestLobbyListResultCountFilter(maxResults.Value); + } } /// @@ -219,6 +253,7 @@ namespace Steamworks.Data /// public async Task RequestAsync() { + await Task.Yield(); ApplyFilters(); LobbyMatchList_t? list = await SteamMatchmaking.Internal.RequestLobbyList(); diff --git a/Libraries/MonoGame.Framework/Src/MonoGame.Framework/Graphics/Texture.cs b/Libraries/MonoGame.Framework/Src/MonoGame.Framework/Graphics/Texture.cs index 95a62e646..4a00e6dad 100644 --- a/Libraries/MonoGame.Framework/Src/MonoGame.Framework/Graphics/Texture.cs +++ b/Libraries/MonoGame.Framework/Src/MonoGame.Framework/Graphics/Texture.cs @@ -24,7 +24,7 @@ namespace Microsoft.Xna.Framework.Graphics /// The value is an implementation detail and may change between application launches or MonoGame versions. /// It is only guaranteed to stay consistent during application lifetime. /// - internal int SortingKey + public int SortingKey { get { return _sortingKey; } } diff --git a/Libraries/OpenAL-Soft/oal_soft.diff b/Libraries/OpenAL-Soft/oal_soft.diff index b43055ca1..27f2f8728 100644 --- a/Libraries/OpenAL-Soft/oal_soft.diff +++ b/Libraries/OpenAL-Soft/oal_soft.diff @@ -163,7 +163,7 @@ index 30d363af..f759a484 100644 return; } diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp -index 8e43aa7c..0f313dea 100644 +index 8e43aa7c..45950062 100644 --- a/alc/backends/wasapi.cpp +++ b/alc/backends/wasapi.cpp @@ -54,6 +54,12 @@ @@ -356,15 +356,24 @@ index 8e43aa7c..0f313dea 100644 ERR("Failed to reactivate audio client: 0x%08lx\n", hr); return hr; } -@@ -1521,6 +1548,7 @@ HRESULT WasapiCapture::resetProxy() +@@ -1521,8 +1548,14 @@ HRESULT WasapiCapture::resetProxy() hr = mClient->IsFormatSupported(AUDCLNT_SHAREMODE_SHARED, &OutputType.Format, &wfx); if(FAILED(hr)) { -+ alcCallErrorReasonCallback(std::string("WASAPI capture proxy reset failed: failed to check format support (HRESULT ")+toStringHex(hr)+")"); - ERR("Failed to check format support: 0x%08lx\n", hr); - return hr; +- ERR("Failed to check format support: 0x%08lx\n", hr); +- return hr; ++ alcCallErrorReasonCallback(std::string("WASAPI capture proxy reset error: failed to check format support (HRESULT ")+toStringHex(hr)+")"); ++ hr = mClient->GetMixFormat(&wfx); ++ if (FAILED(hr)) ++ { ++ alcCallErrorReasonCallback(std::string("WASAPI capture proxy reset failed: failed to get mix format (HRESULT ")+toStringHex(hr)+")"); ++ ERR("Failed to check format support: 0x%08lx\n", hr); ++ return hr; ++ } } -@@ -1619,6 +1647,7 @@ HRESULT WasapiCapture::resetProxy() + + mSampleConv = nullptr; +@@ -1619,6 +1652,7 @@ HRESULT WasapiCapture::resetProxy() buf_time.count(), 0, &OutputType.Format, nullptr); if(FAILED(hr)) { @@ -372,7 +381,7 @@ index 8e43aa7c..0f313dea 100644 ERR("Failed to initialize audio client: 0x%08lx\n", hr); return hr; } -@@ -1630,6 +1659,7 @@ HRESULT WasapiCapture::resetProxy() +@@ -1630,6 +1664,7 @@ HRESULT WasapiCapture::resetProxy() hr = mClient->GetBufferSize(&buffer_len); if(FAILED(hr)) { @@ -380,7 +389,7 @@ index 8e43aa7c..0f313dea 100644 ERR("Failed to get buffer size: 0x%08lx\n", hr); return hr; } -@@ -1641,6 +1671,7 @@ HRESULT WasapiCapture::resetProxy() +@@ -1641,6 +1676,7 @@ HRESULT WasapiCapture::resetProxy() hr = mClient->SetEventHandle(mNotifyEvent); if(FAILED(hr)) { @@ -388,7 +397,7 @@ index 8e43aa7c..0f313dea 100644 ERR("Failed to set event handle: 0x%08lx\n", hr); return hr; } -@@ -1653,7 +1684,10 @@ void WasapiCapture::start() +@@ -1653,7 +1689,10 @@ void WasapiCapture::start() { const HRESULT hr{pushMessage(MsgType::StartDevice).get()}; if(FAILED(hr)) @@ -399,7 +408,7 @@ index 8e43aa7c..0f313dea 100644 } HRESULT WasapiCapture::startProxy() -@@ -1663,6 +1697,7 @@ HRESULT WasapiCapture::startProxy() +@@ -1663,6 +1702,7 @@ HRESULT WasapiCapture::startProxy() HRESULT hr{mClient->Start()}; if(FAILED(hr)) { @@ -407,7 +416,7 @@ index 8e43aa7c..0f313dea 100644 ERR("Failed to start audio client: 0x%08lx\n", hr); return hr; } -@@ -1676,9 +1711,17 @@ HRESULT WasapiCapture::startProxy() +@@ -1676,9 +1716,17 @@ HRESULT WasapiCapture::startProxy() mKillNow.store(false, std::memory_order_release); mThread = std::thread{std::mem_fn(&WasapiCapture::recordProc), this}; } @@ -425,7 +434,7 @@ index 8e43aa7c..0f313dea 100644 ERR("Failed to start thread\n"); hr = E_FAIL; } -@@ -1737,6 +1780,12 @@ bool WasapiBackendFactory::init() +@@ -1737,6 +1785,12 @@ bool WasapiBackendFactory::init() InitResult = future.get(); } catch(...) { diff --git a/Libraries/XNATypes/Rectangle.cs b/Libraries/XNATypes/Rectangle.cs index c9c7b77a2..7929ec0d7 100644 --- a/Libraries/XNATypes/Rectangle.cs +++ b/Libraries/XNATypes/Rectangle.cs @@ -526,6 +526,29 @@ namespace Microsoft.Xna.Framework result.Width = Math.Max(value1.Right, value2.Right) - result.X; result.Height = Math.Max(value1.Bottom, value2.Bottom) - result.Y; } + + public void AddPoint(Point point) + { + if (point.X < X) + { + Width += X - point.X; + X = point.X; + } + else if (point.X > Right) + { + Width += point.X - Right; + } + + if (point.Y < Y) + { + Height += Y - point.Y; + Y = point.Y; + } + else if (point.Y > Bottom) + { + Height += point.Y - Bottom; + } + } #endregion } diff --git a/README.md b/README.md index 1ccc013a4..22318bba2 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you're interested in working on the code, either to develop mods or to contri **Forums:** http://undertowgames.com/forum/ -**Wiki:** http://barotrauma.gamepedia.com/Barotrauma_Wiki +**Wiki:** https://barotraumagame.com/wiki/Main_Page ## Prerequisities: ### Windows