- File transfer improvements (switching the sub selection during transfer works, max transfer duration, waiting for transfers to finish before starting the round)

- Firesource changes (more particles with shorter lifetimes, combining bugfix)
- StatusEffects can target hulls and always be active
- Cyrillic character support
- Saving server settings
- Swapping items in inventory by dropping an item to a non-free slot
This commit is contained in:
Regalis
2016-02-27 21:01:10 +02:00
parent 7309201b11
commit cc4ada952f
31 changed files with 470 additions and 199 deletions
+17 -2
View File
@@ -53,6 +53,8 @@ namespace Barotrauma
public readonly bool IsNetworkPlayer;
private bool networkUpdateSent;
private CharacterInventory inventory;
public float LastNetworkUpdate;
@@ -955,6 +957,17 @@ namespace Barotrauma
if (isDead) return;
if (networkUpdateSent)
{
foreach (Key key in keys)
{
key.DequeueHit();
key.DequeueHeld();
}
networkUpdateSent = true;
}
if (needsAir)
{
bool protectedFromPressure = PressureProtection > 0.0f;
@@ -1421,9 +1434,9 @@ namespace Barotrauma
return true;
case NetworkEventType.EntityUpdate:
message.Write(keys[(int)InputType.Use].DequeueHeld);
message.Write(keys[(int)InputType.Use].GetHeldQueue);
bool secondaryHeld = keys[(int)InputType.Aim].DequeueHeld;
bool secondaryHeld = keys[(int)InputType.Aim].GetHeldQueue;
message.Write(secondaryHeld);
message.Write(keys[(int)InputType.Left].Held);
@@ -1469,6 +1482,8 @@ namespace Barotrauma
message.Write(SimPosition.X);
message.Write(SimPosition.Y);
networkUpdateSent = true;
return true;
default:
#if DEBUG
+10 -4
View File
@@ -273,20 +273,21 @@ namespace Barotrauma
if (disableDeltaTime) deltaTime = 1.0f;
Type type = value.GetType();
if (type == typeof(float))
if (type == typeof(float) ||
(type == typeof(int) && property.GetValue().GetType() == typeof(float)))
{
float floatValue = (float)value * deltaTime;
float floatValue = Convert.ToSingle(value) * deltaTime;
if (!setValue) floatValue += (float)property.GetValue();
property.TrySetValue(floatValue);
}
else if (type == typeof(int))
else if (type == typeof(int) && value.GetType()==typeof(int))
{
int intValue = (int)((int)value * deltaTime);
if (!setValue) intValue += (int)property.GetValue();
property.TrySetValue(intValue);
}
else if (type == typeof(bool))
else if (type == typeof(bool) && value.GetType() == typeof(bool))
{
property.TrySetValue((bool)value);
}
@@ -294,6 +295,11 @@ namespace Barotrauma
{
property.TrySetValue((string)value);
}
else
{
DebugConsole.ThrowError("Couldn't apply value "+value.ToString()+" ("+type+") to property ''"+property.Name+"'' ("+property.GetValue().GetType()+")! "
+"Make sure the type of the value set in the config files matches the type of the property.");
}
}
public static void UpdateAll(float deltaTime)