fixed railgun, fixed repairtools radar ping & improved rendering, waypoint bugfixes, inventory bugfixes, syncing wires between clients

This commit is contained in:
Regalis
2015-07-15 23:34:13 +03:00
parent 44b9a63c94
commit 237df18765
39 changed files with 461 additions and 405 deletions
+6 -8
View File
@@ -265,20 +265,18 @@ namespace Subsurface
public static void Draw(float deltaTime, SpriteBatch spriteBatch, Camera cam)
{
spriteBatch.DrawString(font,
"FPS: " + (int)Game1.frameCounter.AverageFramesPerSecond,
"FPS: " + (int)Game1.frameCounter.AverageFramesPerSecond
+ " - Physics: " + Game1.World.UpdateTime
+ " - bodies: " + Game1.World.BodyList.Count,
new Vector2(10, 10), Color.White);
spriteBatch.DrawString(font,
"Physics: " + Game1.World.UpdateTime
+ " - bodies: " + Game1.World.BodyList.Count,
new Vector2(10, 30), Color.White);
spriteBatch.DrawString(font,
"Camera pos: " + Game1.GameScreen.Cam.Position,
new Vector2(10, 50), Color.White);
new Vector2(10, 30), Color.White);
if (Character.Controlled != null && cam!=null) Character.Controlled.DrawHud(spriteBatch, cam);
if (Game1.NetworkMember != null) Game1.NetworkMember.Draw(spriteBatch);
DrawMessages(spriteBatch, (float)deltaTime);
+19 -6
View File
@@ -44,6 +44,17 @@ namespace Subsurface
}
}
public float BarScroll
{
get { return scrollBar.BarScroll; }
set { scrollBar.BarScroll = value; }
}
public float BarSize
{
get { return scrollBar.BarSize; }
}
public int Spacing
{
get { return spacing; }
@@ -173,14 +184,16 @@ namespace Subsurface
{
base.AddChild(child);
float oldScroll = scrollBar.BarScroll;
float oldSize = scrollBar.BarSize;
//float oldScroll = scrollBar.BarScroll;
//float oldSize = scrollBar.BarSize;
UpdateScrollBarSize();
if (scrollBar.BarSize < 1.0f && oldScroll == 1.0f)
{
scrollBar.BarScroll = 1.0f;
}
//if (oldSize == 1.0f && scrollBar.BarScroll == 0.0f) scrollBar.BarScroll = 1.0f;
//if (scrollBar.BarSize < 1.0f && oldScroll == 1.0f)
//{
// scrollBar.BarScroll = 1.0f;
//}
}
+3 -2
View File
@@ -107,9 +107,10 @@ namespace Subsurface
private void UpdateRect()
{
bar.Rect = new Rectangle(
frame.Rect.X,
frame.Rect.Y,
bar.Rect.X,
bar.Rect.Y,
isHorizontal ? (int)(frame.Rect.Width * barSize) : frame.Rect.Width,
isHorizontal ? frame.Rect.Height : (int)(frame.Rect.Height * barSize));