Merge branch 'master' of https://bitbucket.org/Regalis11/barotrauma into multisub

Conflicts:
	Subsurface/Source/GUI/GUI.cs
This commit is contained in:
Regalis11
2016-06-09 18:39:54 +03:00
28 changed files with 346 additions and 66 deletions

View File

@@ -769,6 +769,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>
</Content>
<Content Include="Content\Map\structures2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Map\waypointIcons.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

View File

@@ -1,19 +1,25 @@
Albertine
Alexia
Alfredia
Alice
Alita
Alla
Alta
Althea
Alyce
Amee
Amira
Annette
Ara
Arcelia
Arie
Armanda
Aryanna
Ashley
Ashly
Astrid
Avril
Azul
Barbra
Beaulah
Bell
@@ -22,13 +28,17 @@ Bettyann
Beverley
Bridgett
Candace
Cara
Carie
Carla
Carmen
Cathleen
Cathy
Cecille
Christiana
Christine
Cinda
Claire
Cleopatra
Codi
Corinne
@@ -46,19 +56,26 @@ Doria
Dorthy
Eleanor
Elinor
Eliza
Elliana
Emerald
Emilee
Erica
Erline
Ethel
Eugenia
Fanny
Fernanda
Fiona
Glenda
Gloria
Hortensia
Ilene
Ina
Inga
Iris
Jacquline
Jaida
Janee
Janessa
Janie
@@ -75,30 +92,37 @@ Karyn
Katerina
Katherina
Kathy
Katrina
Kellie
Kenna
Keri
Kizzie
Kristeen
Kristie
Larissa
Larita
Lauren
Laurie
Laurinda
Lavinia
Leanne
Leila
Lelah
Lena
Leola
Lily
Lindy
Liza
Lola
Lora
Lorriane
Lorrie
Macey
Mafalda
Maira
Majorie
Marcy
Margaret
Margeret
Mariela
Marin
@@ -110,19 +134,25 @@ Masako
Maudie
Maybell
Mechelle
Megan
Melany
Melba
Michele
Mikaela
Mila
Miranda
Muoi
Natalia
Natashia
Nicole
Nola
Noriko
Page
Pamela
Paula
Peggie
Phoenix
Priscilla
Randi
Reatha
Renata
@@ -146,9 +176,13 @@ Sherita
Sherry
Shin
Shirlee
Siena
Socorro
Sophie
Stefany
Stella
Stephane
Summer
Susy
Synthia
Tania
@@ -168,4 +202,5 @@ Vanessa
Velma
Yahaira
Zandra
Zoe
Zoe
Zoey

View File

@@ -1,17 +1,20 @@
Abe
Adam
Adan
Ahmed
Alan
Aldo
Allan
Alonso
Alton
Alvaro
Alvin
Andres
Anton
Antony
Arkadi
Arron
Arthur
Arturo
Austin
Avery
@@ -22,6 +25,7 @@ Ben
Bennie
Bertram
Bill
Bo
Boyce
Boyd
Brady
@@ -41,14 +45,15 @@ Christoper
Chuck
Claude
Coleman
Cuck
Dan
Darius
Darrin
Darwin
David
Delbert
Devin
Dewey
Devin
Dewitt
Dimitry
Dominick
@@ -61,6 +66,7 @@ Elmer
Erich
Erik
Ernie
Esteban
Everette
Ezequiel
Filiberto
@@ -70,6 +76,8 @@ Freeman
Fritz
Garrett
Gerard
Glenn
Gregor
Hal
Harlan
Harris
@@ -77,6 +85,7 @@ Harry
Hector
Herman
Hobert
Igor
Irwin
Ivan
Jackie
@@ -94,12 +103,15 @@ Jerrell
Jerrod
Jess
Joe
Joel
John
Johny
Jonathan
Josef
Joseph
Joshua
Jude
Julius
Keith
Kendall
Keneth
@@ -114,7 +126,9 @@ Lanny
Lee
Len
Lenny
Leo
Lionel
Lucas
Lynn
Lynwood
Malcom
@@ -131,6 +145,7 @@ Mauricio
Mckinley
Mechislav
Merrill
Messiah
Micheal
Milton
Minh
@@ -143,11 +158,14 @@ Mose
Murray
Neal
Neil
Nick
Nolan
Norman
Omari
Orval
Oscar
Owen
Pedro
Pete
Peter
Quincy
@@ -165,6 +183,7 @@ Rob
Roderick
Roland
Romeo
Ronnie
Rosendo
Roy
Rupert
@@ -176,14 +195,17 @@ Sergei
Seth
Shelby
Sidney
Simon
Son
Sonny
Steve
Stevie
Sylvester
Tad
Tate
Terrance
Terrell
The
Timur
Tod
Todd
@@ -193,14 +215,16 @@ Travis
Tyler
Tyson
Ulof
Virgil
Virgilio
Waldo
Walker
Warner
Vasili
Wilford
Will
Williams
Willie
Willy
Winston
Virgil
Virgilio
Zachary

View File

@@ -1,9 +1,15 @@
Aguilar
Aker
Angles
Ashley
Atterbury
Avery
Bailey
Banks
Bartolomeo
Basnett
Baumgardner
Beltran
Bergman
Berlin
Berner
@@ -13,121 +19,207 @@ Boman
Bonham
Books
Box
Bradley
Brady
Breeki
Buckley
Burke
Bushman
Callahan
Callanan
Carey
Carroll
Case
Castillo
Castro
Celina Ryder
Chandler
Chaney
Chaney
Chapman
Chiu
Clements
Clothier
Cluck
Cobble
Collins
Colpitts
Combs
Connors
Cork
Cortese
Craig
Cuevas
Danko
Day
Day
Delange
Deloney
Deras
Dews
Dimauro
Dollinger
Donovan
Dorado
Dudley
Duplantier
Dyer
Eastman
Elliott
Ellison
Escobar
Feinberg
Feinman
Fesler
Fleig
Flowers
Fonte
Freeman
Frye
Gadberry
Gallagher
Gallardo
Gay
Gears
Geist
Gomez
Gonzales
Goodin
Gordon
Gould
Graves
Graves
Green
Gregory
Gumbs
Hajek
Hallett
Hampton
Hardy
Harp
Hebert
Hedrick
Hefner
Hernandez
Heuer
Higgins
Hillard
Hines
Hinton
Hocker
Hoffman
Holter
House
Huber
Huber
Hurley
Hutchinson
Huynh
Jack
James
Jones
Keller
Kidd
Kinney
Klein
Knowles
Krall
Kramer
Lane
Larsen
Larsen
Lavey
Lawrence
Lawson
Lee
Leonard
Lester
Linares
Little
Lowe
Lozano
Lucas
Lyons
Malone
Mansfield
Marchi
Marquez
Mason
Maxwell
Maynard
Maynes
Mcclure
Mcdowell
McLeroy
McNeal
Mcneil
Mead
Meals
Meisner
Mell
Mendel
Mendez
Meza
Molina
Monroe
Mooney
Moran
Moses
Moses
Mosley
Mulford
Mungo
Navarro
Newton
Nicolosi
Nunez
Ordway
Ouellette
Palmieri
Parchman
Parker
Parks
Patel
Pearson
Petersen
Phillips
Phoenix
Pickett
Planck
Pollard
Pool
Poole
Preston
Price
Proctor
Quinn
Radebaugh
Radice
Ram
Ramos
Rangel
Reeves
Reynolds
Rhymer
Riddle
Riles
Rios
Rivera
Robertson
Rolfe
Roman
Rosewood
Rowe
Sacks
Santillan
Santistevan
Saunders
Sawyer
Schmitt
Serrano
Severance
Sexton
Shah
Simpson
Smith
Southworth
Sparks
@@ -135,6 +227,8 @@ Stalvey
Stanley
Stein
Stogner
Suarez
Summers
Summitt
Sunderland
Swanger
@@ -142,16 +236,21 @@ Swanson
Sykes
Tamashiro
Tate
Terry
Thompkins
Tootle
Tseng
Tyson
Ulrich
Walls
Vaughn
Vazquez
Veach
Weaver
Velazquez
Welden
Wheeling
Whitely
Wiley
Williams
Williams
Zhang

View File

@@ -220,7 +220,9 @@
<Sprite texture="signalcomp.png" depth="0.8" sourcerect="48,16,16,16"/>
<RelayComponent canbeselected = "true"/>
<RelayComponent canbeselected = "true">
<GuiFrame rect="0,0,200,160" alignment="Center" color="0.0,0.0,0.0,0.6"/>
</RelayComponent>
<fixrequirement name="Reset fuse">
<skill name="Electrical Engineering" level="30"/>

View File

@@ -148,7 +148,7 @@
</ItemComponent>
<Holdable slots="Any,RightHand,LeftHand">
<StatusEffect type="OnUse" target="Character" Health="2.0" duration="5.0">
<StatusEffect type="OnUse" target="Character" Health="3.0" duration="5.0">
<RequiredItem name="Medical Syringe" type="Container"/>
</StatusEffect>
</Holdable>

View File

@@ -49,7 +49,7 @@
<RequiredSkill name="Weapons" level="30"/>
</RangedWeapon>
<ItemContainer itempos="27,10" iteminterval="0,-8" hideitems="false">
<ItemContainer itempos="27,10" iteminterval="0,-4" hideitems="false">
<Containable name="Spear"/>
</ItemContainer>
</Item>

View File

@@ -119,7 +119,12 @@
<PipesBackground sprite="Content/Map/testroom.png" sourcerect="381,795,192,192" depth = "1.0"
width="64" height="64" resizehorizontal="true" resizevertical="true"/>
<SlopeForward sprite="Content/Map/structures2.png" sourcerect="0,0,224,64"
width="16" height="16" resizehorizontal="true" resizevertical="true" depth = "0.95"/>
<SlopeBack sprite="Content/Map/structures2.png" sourcerect="0,64,224,64"
width="16" height="16" resizehorizontal="true" resizevertical="true" depth = "0.95"/>
<stairsright sprite="Content/Map/testroom.png" sourcerect="100,667,256,320"
width="256" height="320" depth = "0.1" stairdirection="Right"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.4.1.3")]
[assembly: AssemblyFileVersion("0.4.1.3")]
[assembly: AssemblyVersion("0.4.1.6")]
[assembly: AssemblyFileVersion("0.4.1.6")]

View File

@@ -156,6 +156,13 @@ namespace Barotrauma
}
strongestImpact = 0.0f;
if (stunTimer > 0)
{
stunTimer -= deltaTime;
return;
}
if (character.LockHands)
{
var leftHand = GetLimb(LimbType.LeftHand);
@@ -185,15 +192,13 @@ namespace Barotrauma
//rightHand.pullJoint.Enabled = true;
//rightHand.pullJoint.WorldAnchorB = midPos;
}
if (stunTimer > 0)
else
{
stunTimer -= deltaTime;
return;
}
if (Anim != Animation.UsingConstruction) ResetPullJoints();
if (Anim != Animation.UsingConstruction) ResetPullJoints();
}
if (SimplePhysicsEnabled)
{
UpdateStandingSimple();
@@ -287,7 +292,7 @@ namespace Barotrauma
float slowdownFactor = (float)limbsInWater / (float)Limbs.Count();
float maxSpeed = Math.Max(TargetMovement.Length() - slowdownFactor, 1.0f);
if (character.SelectedCharacter!=null) maxSpeed = Math.Min(maxSpeed, 1.0f);
// if (character.SelectedCharacter!=null) maxSpeed = Math.Min(maxSpeed, 1.0f);
TargetMovement = Vector2.Normalize(TargetMovement) * maxSpeed;
}
@@ -933,10 +938,11 @@ namespace Barotrauma
{
pullLimb.pullJoint.Enabled = true;
pullLimb.pullJoint.WorldAnchorB = targetLimb.SimPosition;
pullLimb.pullJoint.MaxForce = 100.0f;
pullLimb.pullJoint.MaxForce = 10000.0f;
targetLimb.pullJoint.Enabled = true;
targetLimb.pullJoint.WorldAnchorB = pullLimb.SimPosition;
targetLimb.pullJoint.MaxForce = 10000.0f;
}
}

View File

@@ -1030,6 +1030,12 @@ namespace Barotrauma
PressureTimer = 0.0f;
}
}
if (controlled == this)
{
Lights.LightManager.ViewTarget = this;
CharacterHUD.Update(deltaTime, this);
}
if (IsUnconscious)
{
@@ -1039,8 +1045,6 @@ namespace Barotrauma
if (controlled == this)
{
Lights.LightManager.ViewTarget = this;
CharacterHUD.Update(deltaTime,this);
ControlLocalPlayer(deltaTime, cam);
}

View File

@@ -82,7 +82,7 @@ namespace Barotrauma
DrawStatusIcons(spriteBatch, character);
if (!character.IsUnconscious)
if (!character.IsUnconscious && character.Stun <= 0.0f)
{
if (character.Inventory != null && !character.LockHands &&
character.Stun >= -0.1f) character.Inventory.DrawOwn(spriteBatch, Vector2.Zero);
@@ -193,7 +193,10 @@ namespace Barotrauma
suicideButton.OnClicked = (button, userData) =>
{
character.Kill(character.CauseOfDeath);
if (Character.Controlled != null)
{
Character.Controlled.Kill(Character.Controlled.CauseOfDeath);
}
return true;
};
}

View File

@@ -398,27 +398,27 @@ namespace Barotrauma
if (GameMain.DebugDraw)
{
spriteBatch.DrawString(Font,
spriteBatch.DrawString(SmallFont,
"FPS: " + (int)GameMain.FrameCounter.AverageFramesPerSecond,
new Vector2(10, 10), Color.White);
spriteBatch.DrawString(Font,
spriteBatch.DrawString(SmallFont,
"Physics: " + GameMain.World.UpdateTime,
new Vector2(10, 20), Color.White);
spriteBatch.DrawString(SmallFont,
"Bodies: " + GameMain.World.BodyList.Count + " (" + GameMain.World.BodyList.FindAll(b => b.Awake && b.Enabled).Count + " awake)",
new Vector2(10, 30), Color.White);
spriteBatch.DrawString(Font,
"Bodies: " + GameMain.World.BodyList.Count + " (" + GameMain.World.BodyList.FindAll(b => b.Awake && b.Enabled).Count + " awake)",
new Vector2(10, 50), Color.White);
spriteBatch.DrawString(Font,
"Camera pos: " + GameMain.GameScreen.Cam.Position,
new Vector2(10, 70), Color.White);
spriteBatch.DrawString(SmallFont,
"Camera pos: " + GameMain.GameScreen.Cam.Position.ToPoint(),
new Vector2(10, 40), Color.White);
if (Submarine.MainSub != null)
{
spriteBatch.DrawString(Font,
"Sub pos: " + Submarine.MainSub.Position,
new Vector2(10, 90), Color.White);
spriteBatch.DrawString(SmallFont,
"Sub pos: " + Submarine.MainSub.Position.ToPoint(),
new Vector2(10, 50), Color.White);
}
}

View File

@@ -36,6 +36,13 @@ namespace Barotrauma.Items.Components
get { return maxOutput; }
}
[HasDefaultValue(10.0f, true), Editable]
public float Capacity
{
get { return capacity; }
set { capacity = Math.Max(value, 1.0f); }
}
[Editable, HasDefaultValue(0.0f, true)]
public float Charge
{
@@ -47,13 +54,6 @@ namespace Barotrauma.Items.Components
}
}
[HasDefaultValue(10.0f, true), Editable]
public float Capacity
{
get { return capacity; }
set { capacity = Math.Max(value, 1.0f); }
}
[HasDefaultValue(10.0f, true), Editable]
public float RechargeSpeed
{

View File

@@ -67,6 +67,8 @@ namespace Barotrauma.Items.Components
Vector2 vector = ToolBox.ParseToVector2(value);
minRotation = MathHelper.ToRadians(vector.X);
maxRotation = MathHelper.ToRadians(vector.Y);
rotation = (minRotation + maxRotation) / 2;
}
}

View File

@@ -813,6 +813,9 @@ namespace Barotrauma
if (prefab.sprite != null)
{
float depth = Sprite.Depth;
depth += (ID % 255) * 0.000001f;
if (body == null)
{
if (prefab.ResizeHorizontal || prefab.ResizeVertical)
@@ -821,7 +824,7 @@ namespace Barotrauma
}
else
{
prefab.sprite.Draw(spriteBatch, new Vector2(DrawPosition.X, -DrawPosition.Y), color);
prefab.sprite.Draw(spriteBatch, new Vector2(DrawPosition.X, -DrawPosition.Y), color, 0.0f, 1.0f, SpriteEffects.None, depth);
}
}
@@ -830,7 +833,6 @@ namespace Barotrauma
var holdable = GetComponent<Holdable>();
if (holdable!=null && holdable.Picker !=null)
{
float depth = Sprite.Depth;
if (holdable.Picker.SelectedItems[0]==this)
{
depth = holdable.Picker.AnimController.GetLimb(LimbType.RightHand).sprite.Depth + 0.000001f;
@@ -844,7 +846,7 @@ namespace Barotrauma
}
else
{
body.Draw(spriteBatch, prefab.sprite, color);
body.Draw(spriteBatch, prefab.sprite, color, depth);
}
}
}

View File

@@ -40,9 +40,9 @@ namespace Barotrauma
return;
}
for (int x = Math.Max(indices.X, 0); x <= Math.Min(indices.Width, entities.GetLength(0)); x++)
for (int x = Math.Max(indices.X, 0); x <= Math.Min(indices.Width, entities.GetLength(0)-1); x++)
{
for (int y = Math.Max(indices.Y,0); y <= Math.Min(indices.Height, entities.GetLength(1)); y++)
for (int y = Math.Max(indices.Y,0); y <= Math.Min(indices.Height, entities.GetLength(1)-1); y++)
{
entities[x, y].Add(entity);
}

View File

@@ -128,7 +128,7 @@ namespace Barotrauma
if (limb.WorldPosition == worldPosition) continue;
c.AddDamage(limb.SimPosition, DamageType.None,
c.AddDamage(limb.WorldPosition, DamageType.None,
damage / c.AnimController.Limbs.Length * distFactor, 0.0f, stun * distFactor, false);
if (force > 0.0f)
{

View File

@@ -522,9 +522,13 @@ namespace Barotrauma
new Rectangle(drawRect.X, -drawRect.Y, rect.Width, rect.Height),
Color.Red*((100.0f-OxygenPercentage)/400.0f), true);
spriteBatch.DrawString(GUI.Font, "Pressure: " + ((int)pressure - rect.Y).ToString() +
" - Oxygen: " + ((int)OxygenPercentage), new Vector2(drawRect.X + 10, -drawRect.Y + 10), Color.Black);
spriteBatch.DrawString(GUI.Font, volume + " / " + FullVolume, new Vector2(drawRect.X + 10, -drawRect.Y + 30), Color.Black);
if (GameMain.DebugDraw)
{
spriteBatch.DrawString(GUI.SmallFont, "Pressure: " + ((int)pressure - rect.Y).ToString() +
" - Oxygen: " + ((int)OxygenPercentage), new Vector2(drawRect.X + 5, -drawRect.Y + 5), Color.White);
spriteBatch.DrawString(GUI.SmallFont, volume + " / " + FullVolume, new Vector2(drawRect.X + 5, -drawRect.Y + 20), Color.White);
}
if ((isSelected || isHighlighted) && editing)
{

View File

@@ -834,7 +834,7 @@ namespace Barotrauma.Networking
Character character = obj as Character;
if (character == null) return false;
if (character != myCharacter)
if (character != myCharacter && Voting.AllowVoteKick)
{
var client = GameMain.NetworkMember.ConnectedClients.Find(c => c.Character == character);
if (client != null)

View File

@@ -1725,8 +1725,9 @@ namespace Barotrauma.Networking
Client preferredClient = null;
foreach (Client c in clients)
{
int index = c.jobPreferences.FindIndex(jp => jp == job);
if (index == 0) index = 1000;
int index = c.jobPreferences.IndexOf(job);
if (index == -1) index = 1000;
if (preferredClient == null || index < bestPreference)
{
bestPreference = index;

View File

@@ -93,6 +93,12 @@ namespace Barotrauma.Networking
get { return allowSpectating; }
}
public bool AllowVoteKick
{
get;
private set;
}
public float EndVoteRequiredRatio = 0.5f;
public float KickVoteRequiredRatio = 0.5f;
@@ -159,10 +165,9 @@ namespace Barotrauma.Networking
private void CreateSettingsFrame()
{
settingsFrame = new GUIFrame(new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight), Color.Black * 0.5f);
settingsFrame = new GUIFrame(new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight), Color.Black * 0.5f);
GUIFrame innerFrame = new GUIFrame(new Rectangle(0, 0, 400, 400), null, Alignment.Center, GUI.Style, settingsFrame);
GUIFrame innerFrame = new GUIFrame(new Rectangle(0, 0, 400, 420), null, Alignment.Center, GUI.Style, settingsFrame);
innerFrame.Padding = new Vector4(20.0f, 20.0f, 20.0f, 20.0f);
new GUITextBlock(new Rectangle(0, -5, 0, 20), "Server settings", GUI.Style, innerFrame, GUI.LargeFont);
@@ -175,6 +180,7 @@ namespace Barotrauma.Networking
y += 30;
var endVoteBox = new GUITickBox(new Rectangle(0, y, 20, 20), "End round by voting", Alignment.Left, innerFrame);
endVoteBox.Selected = Voting.AllowEndVoting;
endVoteBox.OnSelected = (GUITickBox) =>
@@ -199,6 +205,33 @@ namespace Barotrauma.Networking
return true;
};
votesRequiredSlider.OnMoved(votesRequiredSlider, votesRequiredSlider.BarScroll);
y += 40;
var voteKickBox = new GUITickBox(new Rectangle(0, y, 20, 20), "Allow vote kicking", Alignment.Left, innerFrame);
voteKickBox.Selected = Voting.AllowVoteKick;
voteKickBox.OnSelected = (GUITickBox) =>
{
Voting.AllowVoteKick = !Voting.AllowVoteKick;
GameMain.Server.UpdateVoteStatus();
return true;
};
var kickVotesRequiredText = new GUITextBlock(new Rectangle(20, y + 20, 20, 20), "Votes required: 50 %", GUI.Style, innerFrame, GUI.SmallFont);
var kickVoteSlider = new GUIScrollBar(new Rectangle(150, y + 22, 100, 10), GUI.Style, 0.1f, innerFrame);
kickVoteSlider.UserData = kickVotesRequiredText;
kickVoteSlider.Step = 0.2f;
kickVoteSlider.BarScroll = (KickVoteRequiredRatio - 0.5f) * 2.0f;
kickVoteSlider.OnMoved = (GUIScrollBar scrollBar, float barScroll) =>
{
GUITextBlock voteText = scrollBar.UserData as GUITextBlock;
KickVoteRequiredRatio = barScroll / 2.0f + 0.5f;
voteText.Text = "Votes required: " + (int)MathUtils.Round(KickVoteRequiredRatio * 100.0f, 10.0f) + " %";
return true;
};
kickVoteSlider.OnMoved(kickVoteSlider, kickVoteSlider.BarScroll);
y += 40;

View File

@@ -306,8 +306,8 @@ namespace Barotrauma.Networking
{
if (gameStarted && Screen.Selected == GameMain.GameScreen)
{
//chatBox.Visible = Character.Controlled == null || !Character.Controlled.IsUnconscious;
chatMsgBox.Visible = Character.Controlled == null || !Character.Controlled.IsUnconscious;
chatMsgBox.Visible = Character.Controlled == null ||
(!Character.Controlled.IsUnconscious && Character.Controlled.Stun >= 0.0f);
inGameHUD.Update(deltaTime);

View File

@@ -354,6 +354,7 @@ namespace Barotrauma
if (IsServer && GameMain.Server != null)
{
int prevSelected = subList.SelectedIndex;
UpdateSubList(Submarine.SavedSubmarines);
modeList.OnSelected = VotableClicked;
@@ -377,8 +378,11 @@ namespace Barotrauma
var banListButton = new GUIButton(new Rectangle(0, 30, 100, 20), "Banned IPs", Alignment.BottomRight, GUI.Style, playerList.Parent);
banListButton.OnClicked = GameMain.Server.BanList.ToggleBanFrame;
banListButton.UserData = "banListButton";
if (subList.CountChildren > 0 && subList.Selected == null) subList.Select(0);
if (subList.CountChildren > 0 && subList.Selected == null)
{
subList.Select(Math.Max(0, prevSelected));
}
if (GameModePreset.list.Count > 0 && modeList.Selected == null) modeList.Select(0);
if (myPlayerFrame.children.Find(c => c.UserData as string == "playyourself") == null)

View File

@@ -12,6 +12,8 @@ namespace Barotrauma
{
private bool allowSubVoting, allowModeVoting;
public bool AllowVoteKick = true;
public bool AllowEndVoting = true;
public bool AllowSubVoting
@@ -243,8 +245,9 @@ namespace Barotrauma
{
msg.Write((byte)voters.Count(v => v.GetVote<bool>(VoteType.EndRound)));
msg.Write((byte)voters.Count);
}
}
msg.Write(AllowVoteKick);
}
public void ReadData(NetIncomingMessage msg)
@@ -286,6 +289,8 @@ namespace Barotrauma
GameMain.NetworkMember.EndVoteCount = msg.ReadByte();
GameMain.NetworkMember.EndVoteMax = msg.ReadByte();
}
AllowVoteKick = msg.ReadBoolean();
}
}
}

View File

@@ -7,6 +7,7 @@ using FarseerPhysics.Dynamics;
using Microsoft.Xna.Framework;
using Barotrauma.Sounds;
using System.Collections.Generic;
using System.IO;
namespace Barotrauma
{
@@ -249,7 +250,16 @@ namespace Barotrauma
if (currMusicVolume < 0.01f)
{
Sound.StopStream();
if (targetMusic != null) Sound.StartStream(targetMusic.file, currMusicVolume);
try
{
if (targetMusic != null) Sound.StartStream(targetMusic.file, currMusicVolume);
}
catch (FileNotFoundException e)
{
DebugConsole.ThrowError("Music clip " + targetMusic.file + " not found!");
}
currentMusic = targetMusic;
}
}

View File

@@ -1,3 +1,41 @@
---------------------------------------------------------------------------------------------------------
v0.4.1.6
---------------------------------------------------------------------------------------------------------
- vote kicking
- fixed reverting back to the first sub on the list after each round when using manual submarine selection
- fixed lights "bleeding" through walls
- fixed crashing if the submarine contains hulls far away from the rest of the submarine
- corricodone is slightly more effective
- battery charge can be set higher than the default capacity of 2000 (assuming the capacity is set higher)
- job assignment bugfixes
- head sprites can be given tags (e.g. customhead[tag].png) which will make the game select body sprites
with a matching tag (e.g. customtorso[tag].png) for the character
- some new head sprites
- pathfinding errors (which may be caused by missing or incorrectly placed waypoints in custom subs)
don't cause the debug console to pop up
- added missing music clips to the Linux build
---------------------------------------------------------------------------------------------------------
v0.4.1.5
---------------------------------------------------------------------------------------------------------
- fixed oxygen distribution through vents not being calculated correctly
- fixed another bug that caused ''object reference not set to an instance of object'' error messages
when starting a new round
- fulgurium batteries can be put in flashlights and sonars
- more powerful oxygen generators in vanilla subs (small rooms aren't deathtraps anymore)
Linux version:
- fixed ''unable to load coelanth.png'' error messages
- fixed non-matching content packages between the Linux and Windows versions
---------------------------------------------------------------------------------------------------------
v0.4.1.4
---------------------------------------------------------------------------------------------------------
- fixed clients failing to select submarines in their "Submarines/Downloaded" folder
---------------------------------------------------------------------------------------------------------
v0.4.1.3
---------------------------------------------------------------------------------------------------------