Backported vsync changes from new-netcode, WIP hull visibility culling

The hull culling functions are there, they just aren't being used right now because there are some annoying bugs.
This commit is contained in:
juanjp600
2016-10-02 22:24:31 -03:00
parent 75e7b3a94e
commit e1296e4a8e
27 changed files with 316 additions and 99 deletions

View File

@@ -197,22 +197,23 @@ namespace Barotrauma.Networking
request.AddParameter("password", string.IsNullOrWhiteSpace(password) ? 0 : 1);
// execute the request
RestResponse response = (RestResponse)restClient.Execute(request);
if (response.StatusCode != System.Net.HttpStatusCode.OK)
restClient.ExecuteAsync(request, response =>
{
DebugConsole.ThrowError("Error while connecting to master server (" +response.StatusCode+": "+response.StatusDescription+")");
return;
}
if (response.StatusCode != System.Net.HttpStatusCode.OK)
{
DebugConsole.ThrowError("Error while connecting to master server (" + response.StatusCode + ": " + response.StatusDescription + ")");
return;
}
if (response != null && !string.IsNullOrWhiteSpace(response.Content))
{
DebugConsole.ThrowError("Error while connecting to master server (" +response.Content+")");
return;
}
if (response != null && !string.IsNullOrWhiteSpace(response.Content))
{
DebugConsole.ThrowError("Error while connecting to master server (" + response.Content + ")");
return;
}
registeredToMaster = true;
refreshMasterTimer = DateTime.Now + refreshMasterInterval;
registeredToMaster = true;
refreshMasterTimer = DateTime.Now + refreshMasterInterval;
});
}
private IEnumerable<object> RefreshMaster()