Improved map rendering, shops, light bugfix, junction boxes wont break as easily
This commit is contained in:
@@ -175,20 +175,13 @@ namespace Subsurface
|
||||
public float Bleeding
|
||||
{
|
||||
get { return bleeding; }
|
||||
set { bleeding = value; }
|
||||
set
|
||||
{
|
||||
if (float.IsNaN(value) || float.IsInfinity(value)) return;
|
||||
bleeding = Math.Max(value, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//public float Blood
|
||||
//{
|
||||
// get { return blood; }
|
||||
// set
|
||||
// {
|
||||
// blood = MathHelper.Clamp(value, 0.0f, 100.0f);
|
||||
// if (blood == 0.0f) Kill();
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
public Item[] SelectedItems
|
||||
{
|
||||
get { return selectedItems; }
|
||||
@@ -716,7 +709,14 @@ namespace Subsurface
|
||||
public void Draw(SpriteBatch spriteBatch)
|
||||
{
|
||||
AnimController.Draw(spriteBatch);
|
||||
|
||||
//GUI.DrawLine(spriteBatch, ConvertUnits.ToDisplayUnits(animController.limbs[0].SimPosition.X, animController.limbs[0].SimPosition.Y),
|
||||
// ConvertUnits.ToDisplayUnits(animController.limbs[0].SimPosition.X, animController.limbs[0].SimPosition.Y) +
|
||||
// ConvertUnits.ToDisplayUnits(animController.targetMovement.X, animController.targetMovement.Y), Color.Green);
|
||||
}
|
||||
|
||||
public void DrawFront(SpriteBatch spriteBatch)
|
||||
{
|
||||
if (IsNetworkPlayer)
|
||||
{
|
||||
Vector2 namePos = new Vector2(Position.X, -Position.Y - 80.0f) - GUI.Font.MeasureString(Info.Name) * 0.5f;
|
||||
@@ -731,13 +731,12 @@ namespace Subsurface
|
||||
|
||||
Vector2 pos = ConvertUnits.ToDisplayUnits(AnimController.limbs[0].SimPosition);
|
||||
pos.Y = -pos.Y;
|
||||
|
||||
|
||||
|
||||
if (this == Character.controlled) return;
|
||||
|
||||
Vector2 healthBarPos = new Vector2(Position.X - 50, -Position.Y - 50.0f);
|
||||
GUI.DrawRectangle(spriteBatch, new Rectangle((int)healthBarPos.X-2, (int)healthBarPos.Y-2, 100+4, 15+4), Color.Black, false);
|
||||
GUI.DrawRectangle(spriteBatch, new Rectangle((int)healthBarPos.X, (int)healthBarPos.Y, (int)(100.0f*(health/maxHealth)), 15), Color.Red, true);
|
||||
GUI.DrawRectangle(spriteBatch, new Rectangle((int)healthBarPos.X - 2, (int)healthBarPos.Y - 2, 100 + 4, 15 + 4), Color.Black, false);
|
||||
GUI.DrawRectangle(spriteBatch, new Rectangle((int)healthBarPos.X, (int)healthBarPos.Y, (int)(100.0f * (health / maxHealth)), 15), Color.Red, true);
|
||||
|
||||
|
||||
//GUI.DrawLine(spriteBatch, ConvertUnits.ToDisplayUnits(animController.limbs[0].SimPosition.X, animController.limbs[0].SimPosition.Y),
|
||||
|
||||
Reference in New Issue
Block a user