Limb collisions can damage hull again, new UI for steering, sonar & reactor, fabricators can require more than one of each ingredient, timer for character imploding, AICharacter position syncing changes, watcher, commands can also be given to controlled character
This commit is contained in:
@@ -32,10 +32,23 @@ namespace Barotrauma
|
||||
set { controlled = value; }
|
||||
}
|
||||
|
||||
private bool enabled;
|
||||
|
||||
public bool Enabled
|
||||
{
|
||||
get;
|
||||
set;
|
||||
get
|
||||
{
|
||||
return enabled;
|
||||
}
|
||||
set
|
||||
{
|
||||
enabled = value;
|
||||
|
||||
foreach (Limb limb in AnimController.Limbs)
|
||||
{
|
||||
limb.body.Enabled = enabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public readonly bool IsNetworkPlayer;
|
||||
@@ -239,6 +252,13 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public float PressureTimer
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public float SpeedMultiplier
|
||||
{
|
||||
get;
|
||||
@@ -652,6 +672,9 @@ namespace Barotrauma
|
||||
private Item FindClosestItem(Vector2 mouseSimPos)
|
||||
{
|
||||
Limb torso = AnimController.GetLimb(LimbType.Torso);
|
||||
|
||||
if (torso == null) return null;
|
||||
|
||||
Vector2 pos = (torso.body.TargetPosition != Vector2.Zero) ? torso.body.TargetPosition : torso.SimPosition;
|
||||
|
||||
return Item.FindPickable(pos, selectedConstruction == null ? mouseSimPos : selectedConstruction.SimPosition, AnimController.CurrentHull, selectedItems);
|
||||
@@ -885,8 +908,19 @@ namespace Barotrauma
|
||||
if (!protectedFromPressure &&
|
||||
(AnimController.CurrentHull == null || AnimController.CurrentHull.LethalPressure >= 100.0f))
|
||||
{
|
||||
Implode();
|
||||
return;
|
||||
|
||||
PressureTimer += ((AnimController.CurrentHull == null) ?
|
||||
100.0f : AnimController.CurrentHull.LethalPressure) * deltaTime;
|
||||
|
||||
if (PressureTimer >= 100.0f)
|
||||
{
|
||||
Implode();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PressureTimer = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1503,10 +1537,12 @@ namespace Barotrauma
|
||||
else
|
||||
{
|
||||
cursorPosition = Position + new Vector2(1000.0f, 0.0f) * dir;
|
||||
|
||||
AnimController.TargetDir = dir < 0 ? Direction.Left : Direction.Right;
|
||||
}
|
||||
|
||||
AnimController.RefLimb.body.TargetPosition =
|
||||
AnimController.EstimateCurrPosition(pos, (float)(NetTime.Now + message.SenderConnection.RemoteTimeOffset) - sendingTime);
|
||||
AnimController.EstimateCurrPosition(pos, (float)(NetTime.Now) - sendingTime);
|
||||
|
||||
LastNetworkUpdate = sendingTime;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user