Lighting optimization (caching shadow vertices & only checking hulls in range if the position or range of the light changes), ragdoll optimization, itemcomponent optimization, dragging stunned/dead characters

This commit is contained in:
Regalis11
2015-10-11 21:04:42 +03:00
parent 0a96254696
commit 8df9133e84
25 changed files with 377 additions and 201 deletions
+10 -3
View File
@@ -50,6 +50,14 @@ namespace Subsurface
float lastSentVolume;
public override string Name
{
get
{
return "Hull";
}
}
public override bool IsLinkable
{
get { return true; }
@@ -202,7 +210,7 @@ namespace Subsurface
waveY[(int)(position.X - rect.X) / WaveWidth] = 100.0f;
Volume = Volume + 1500.0f;
}
else if (PlayerInput.GetMouseState.RightButton == Microsoft.Xna.Framework.Input.ButtonState.Pressed)
else if (PlayerInput.RightButtonDown())
{
Volume = Volume - 1500.0f;
}
@@ -210,12 +218,11 @@ namespace Subsurface
}
//update client hulls if the amount of water has changed by >10%
if (Math.Abs(lastSentVolume-volume)>FullVolume*0.1f)
if (Math.Abs(lastSentVolume - volume) > FullVolume * 0.1f)
{
new Networking.NetworkEvent(ID, false);
lastSentVolume = volume;
}
if (!update) return;
float surfaceY = rect.Y - rect.Height + Volume / rect.Width;