Linux damageshader, fixed keyhits being registered multiple times, added LevelGenerationParams.xml to the vanilla content package
This commit is contained in:
Binary file not shown.
@@ -46,6 +46,7 @@
|
|||||||
<BackgroundSpritePrefabs file="Content/BackgroundSprites/BackgroundSpritePrefabs.xml" />
|
<BackgroundSpritePrefabs file="Content/BackgroundSprites/BackgroundSpritePrefabs.xml" />
|
||||||
<RandomEvents file="Content/randomevents.xml" />
|
<RandomEvents file="Content/randomevents.xml" />
|
||||||
<LocationTypes file="Content/Map/locationTypes.xml" />
|
<LocationTypes file="Content/Map/locationTypes.xml" />
|
||||||
|
<LevelGenerationParameters file="Content/Map/LevelGenerationParameters.xml" />
|
||||||
<Missions file="Content/Missions.xml" />
|
<Missions file="Content/Missions.xml" />
|
||||||
<Jobs file="Content/Jobs.xml" />
|
<Jobs file="Content/Jobs.xml" />
|
||||||
<Executable file="Barotrauma.exe" />
|
<Executable file="Barotrauma.exe" />
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Barotrauma
|
|||||||
Structure,
|
Structure,
|
||||||
Executable,
|
Executable,
|
||||||
LocationTypes,
|
LocationTypes,
|
||||||
LevelGenerationPresets,
|
LevelGenerationParameters,
|
||||||
RandomEvents,
|
RandomEvents,
|
||||||
Missions,
|
Missions,
|
||||||
BackgroundCreaturePrefabs, BackgroundSpritePrefabs
|
BackgroundCreaturePrefabs, BackgroundSpritePrefabs
|
||||||
|
|||||||
@@ -133,33 +133,7 @@ namespace Barotrauma
|
|||||||
get { return bottomHoleProbability; }
|
get { return bottomHoleProbability; }
|
||||||
set { bottomHoleProbability = MathHelper.Clamp(value, 0.0f, 1.0f); }
|
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)
|
public static LevelGenerationParams GetRandom(string seed)
|
||||||
{
|
{
|
||||||
Rand.SetSyncedSeed(ToolBox.StringToInt(seed));
|
Rand.SetSyncedSeed(ToolBox.StringToInt(seed));
|
||||||
@@ -194,7 +168,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
presets = new List<LevelGenerationParams>();
|
presets = new List<LevelGenerationParams>();
|
||||||
|
|
||||||
var files = GameMain.SelectedPackage.GetFilesOfType(ContentType.LevelGenerationPresets);
|
var files = GameMain.SelectedPackage.GetFilesOfType(ContentType.LevelGenerationParameters);
|
||||||
if (!files.Any())
|
if (!files.Any())
|
||||||
{
|
{
|
||||||
files.Add("Content/Map/LevelGenerationParameters.xml");
|
files.Add("Content/Map/LevelGenerationParameters.xml");
|
||||||
@@ -202,7 +176,6 @@ namespace Barotrauma
|
|||||||
|
|
||||||
foreach (string file in files)
|
foreach (string file in files)
|
||||||
{
|
{
|
||||||
|
|
||||||
XDocument doc = ToolBox.TryLoadXml(file);
|
XDocument doc = ToolBox.TryLoadXml(file);
|
||||||
if (doc == null || doc.Root == null) return;
|
if (doc == null || doc.Root == null) return;
|
||||||
|
|
||||||
|
|||||||
@@ -46,13 +46,13 @@ namespace Barotrauma
|
|||||||
|
|
||||||
#if LINUX
|
#if LINUX
|
||||||
var blurEffect = content.Load<Effect>("blurshader_opengl");
|
var blurEffect = content.Load<Effect>("blurshader_opengl");
|
||||||
|
damageEffect = content.Load<Effect>("damageshader_opengl");
|
||||||
#else
|
#else
|
||||||
var blurEffect = content.Load<Effect>("blurshader");
|
var blurEffect = content.Load<Effect>("blurshader");
|
||||||
|
damageEffect = content.Load<Effect>("damageshader");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
damageStencil = TextureLoader.FromFile("Content/Map/walldamage.png");
|
damageStencil = TextureLoader.FromFile("Content/Map/walldamage.png");
|
||||||
|
|
||||||
damageEffect = content.Load<Effect>("damageshader");
|
|
||||||
damageEffect.Parameters["xStencil"].SetValue(damageStencil);
|
damageEffect.Parameters["xStencil"].SetValue(damageStencil);
|
||||||
damageEffect.Parameters["aMultiplier"].SetValue(50.0f);
|
damageEffect.Parameters["aMultiplier"].SetValue(50.0f);
|
||||||
damageEffect.Parameters["cMultiplier"].SetValue(200.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);
|
GameMain.GameSession.Submarine.ApplyForce(targetMovement * GameMain.GameSession.Submarine.SubBody.Body.Mass * 100.0f);
|
||||||
}
|
}
|
||||||
#endif
|
#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 = Math.Min(Physics.accumulator, Physics.step * 6);
|
||||||
//Physics.accumulator = Physics.step;
|
//Physics.accumulator = Physics.step;
|
||||||
while (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);
|
BackgroundCreatureManager.Update(cam, (float)Physics.step);
|
||||||
|
|
||||||
GameMain.ParticleManager.Update((float)Physics.step);
|
GameMain.ParticleManager.Update((float)Physics.step);
|
||||||
|
|||||||
Reference in New Issue
Block a user