Linux damageshader, fixed keyhits being registered multiple times, added LevelGenerationParams.xml to the vanilla content package
This commit is contained in:
BIN
Subsurface/Content/damageshader_opengl.xnb
Normal file
BIN
Subsurface/Content/damageshader_opengl.xnb
Normal file
Binary file not shown.
@@ -46,6 +46,7 @@
|
||||
<BackgroundSpritePrefabs file="Content/BackgroundSprites/BackgroundSpritePrefabs.xml" />
|
||||
<RandomEvents file="Content/randomevents.xml" />
|
||||
<LocationTypes file="Content/Map/locationTypes.xml" />
|
||||
<LevelGenerationParameters file="Content/Map/LevelGenerationParameters.xml" />
|
||||
<Missions file="Content/Missions.xml" />
|
||||
<Jobs file="Content/Jobs.xml" />
|
||||
<Executable file="Barotrauma.exe" />
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Barotrauma
|
||||
Structure,
|
||||
Executable,
|
||||
LocationTypes,
|
||||
LevelGenerationPresets,
|
||||
LevelGenerationParameters,
|
||||
RandomEvents,
|
||||
Missions,
|
||||
BackgroundCreaturePrefabs, BackgroundSpritePrefabs
|
||||
|
||||
@@ -133,33 +133,7 @@ namespace Barotrauma
|
||||
get { return bottomHoleProbability; }
|
||||
set { bottomHoleProbability = MathHelper.Clamp(value, 0.0f, 1.0f); }
|
||||
}
|
||||
|
||||
//public LevelGenerationParams()
|
||||
//{
|
||||
// Rand.SetSyncedSeed(ToolBox.StringToInt(seed));
|
||||
|
||||
// width = 100000.0f;
|
||||
// height = 50000.0f;
|
||||
|
||||
// voronoiSiteInterval = 2000.0f;
|
||||
// voronoiSiteVariance = new Vector2(voronoiSiteInterval, voronoiSiteInterval) * 0.4f;
|
||||
|
||||
// mainPathNodeIntervalRange = new Vector2(5000.0f, 10000.0f);
|
||||
|
||||
// float brightness = Rand.Range(1.0f, 1.3f, false);
|
||||
// BackgroundColor = Color.Lerp(new Color(11, 18, 26), new Color(50, 46, 20), Rand.Range(0.0f, 1.0f, false)) * brightness;
|
||||
// BackgroundColor = new Color(BackgroundColor, 1.0f);
|
||||
|
||||
// smallTunnelCount = 5;
|
||||
// smallTunnelLengthRange = new Vector2(5000.0f, 10000.0f);
|
||||
|
||||
// ruinCount = 1;
|
||||
|
||||
// bottomHoleProbability = Rand.Range(0.1f, 0.8f, false);
|
||||
|
||||
// BackgroundSpriteAmount = (int)((new Vector2(width, height)).Length() / 100);
|
||||
//}
|
||||
|
||||
|
||||
public static LevelGenerationParams GetRandom(string seed)
|
||||
{
|
||||
Rand.SetSyncedSeed(ToolBox.StringToInt(seed));
|
||||
@@ -194,7 +168,7 @@ namespace Barotrauma
|
||||
{
|
||||
presets = new List<LevelGenerationParams>();
|
||||
|
||||
var files = GameMain.SelectedPackage.GetFilesOfType(ContentType.LevelGenerationPresets);
|
||||
var files = GameMain.SelectedPackage.GetFilesOfType(ContentType.LevelGenerationParameters);
|
||||
if (!files.Any())
|
||||
{
|
||||
files.Add("Content/Map/LevelGenerationParameters.xml");
|
||||
@@ -202,7 +176,6 @@ namespace Barotrauma
|
||||
|
||||
foreach (string file in files)
|
||||
{
|
||||
|
||||
XDocument doc = ToolBox.TryLoadXml(file);
|
||||
if (doc == null || doc.Root == null) return;
|
||||
|
||||
|
||||
@@ -46,13 +46,13 @@ namespace Barotrauma
|
||||
|
||||
#if LINUX
|
||||
var blurEffect = content.Load<Effect>("blurshader_opengl");
|
||||
damageEffect = content.Load<Effect>("damageshader_opengl");
|
||||
#else
|
||||
var blurEffect = content.Load<Effect>("blurshader");
|
||||
damageEffect = content.Load<Effect>("damageshader");
|
||||
#endif
|
||||
|
||||
damageStencil = TextureLoader.FromFile("Content/Map/walldamage.png");
|
||||
|
||||
damageEffect = content.Load<Effect>("damageshader");
|
||||
damageEffect.Parameters["xStencil"].SetValue(damageStencil);
|
||||
damageEffect.Parameters["aMultiplier"].SetValue(50.0f);
|
||||
damageEffect.Parameters["cMultiplier"].SetValue(200.0f);
|
||||
@@ -108,19 +108,16 @@ namespace Barotrauma
|
||||
GameMain.GameSession.Submarine.ApplyForce(targetMovement * GameMain.GameSession.Submarine.SubBody.Body.Mass * 100.0f);
|
||||
}
|
||||
#endif
|
||||
if (GameMain.GameSession != null) GameMain.GameSession.Update((float)deltaTime);
|
||||
|
||||
if (Level.Loaded != null) Level.Loaded.Update((float)deltaTime);
|
||||
|
||||
Character.UpdateAll(cam, (float)deltaTime);
|
||||
|
||||
Physics.accumulator = Math.Min(Physics.accumulator, Physics.step * 6);
|
||||
//Physics.accumulator = Physics.step;
|
||||
while (Physics.accumulator >= Physics.step)
|
||||
{
|
||||
|
||||
if (GameMain.GameSession != null) GameMain.GameSession.Update((float)Physics.step);
|
||||
//EventManager.Update(gameTime);
|
||||
|
||||
if (Level.Loaded != null) Level.Loaded.Update((float)Physics.step);
|
||||
|
||||
Character.UpdateAll(cam, (float)Physics.step);
|
||||
|
||||
BackgroundCreatureManager.Update(cam, (float)Physics.step);
|
||||
|
||||
GameMain.ParticleManager.Update((float)Physics.step);
|
||||
|
||||
Reference in New Issue
Block a user