1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 14:46:29 +09:00

Release build fixed for NetPeerSettingsWindow

ManyClients project excluded missing app.config file
Reduced number of calls to NetTime.Now when receiving multiple messages
Moved magic numbers to constants in NetConnection
This commit is contained in:
lidgren
2012-11-05 13:39:57 +00:00
parent 2cdb29a768
commit b6d2111380
5 changed files with 30 additions and 9 deletions

View File

@@ -96,7 +96,6 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>

View File

@@ -45,6 +45,7 @@ namespace SamplesCommon
{
var pc = Peer.Configuration;
#if DEBUG
var loss = (pc.SimulatedLoss * 100.0f).ToString();
label5.Text = loss + " %";
LossTextBox.Text = loss;
@@ -55,7 +56,12 @@ namespace SamplesCommon
var minLat = (pc.SimulatedMinimumLatency * 1000.0f).ToString();
var maxLat = ((pc.SimulatedMinimumLatency + pc.SimulatedRandomLatency) * 1000.0f).ToString();
#else
var loss = 0;
var dupes = 0;
var minLat = "";
var maxLat = "";
#endif
label4.Text = minLat + " to " + maxLat + " ms";
MinLatencyTextBox.Text = minLat;
MaxLatencyTextBox.Text = maxLat;
@@ -84,6 +90,7 @@ namespace SamplesCommon
{
Peer.Configuration.SetMessageTypeEnabled(NetIncomingMessageType.DebugMessage, DebugCheckBox.Checked);
Peer.Configuration.SetMessageTypeEnabled(NetIncomingMessageType.VerboseDebugMessage, VerboseCheckBox.Checked);
#if DEBUG
float f;
if (Single.TryParse(LossTextBox.Text, out f))
Peer.Configuration.SimulatedLoss = (float)((double)f / 100.0);
@@ -105,6 +112,7 @@ namespace SamplesCommon
MaxLatencyTextBox.Text = ((int)(max * 1000)).ToString();
}
}
#endif
}