(69f7a4d52) Fixed: Index out of range error in DoctorTutorial if proceeding too fast to the submarine. Added: Prevention of tooltip drawing when tutorial content is running

This commit is contained in:
Joonas Rikkonen
2019-05-18 17:19:02 +03:00
parent b2c37f4277
commit 62b690cd94
3 changed files with 4 additions and 1 deletions

View File

@@ -471,6 +471,8 @@ namespace Barotrauma
public static void DrawToolTip(SpriteBatch spriteBatch, string toolTip, Rectangle targetElement)
{
if (Tutorials.Tutorial.ContentRunning) return;
int width = (int)(400 * GUI.Scale);
int height = (int)(18 * GUI.Scale);
Point padding = new Point((int)(20 * GUI.Scale), (int)(7 * GUI.Scale));

View File

@@ -369,7 +369,7 @@ namespace Barotrauma.Tutorials
double subEnterTime = Timing.TotalTime;
bool[] patientCalledHelp = new bool[] { false, false, false };
bool[] patientCalledHelp = new bool[] { false, false, false, false, false, false };
while (subPatients.Any(p => p.Vitality < p.MaxVitality * 0.9f && !p.IsDead))
{
for (int i = 0; i < subPatients.Count; i++)

View File

@@ -405,6 +405,7 @@ namespace Barotrauma.Tutorials
private void ReplaySegmentVideo(TutorialSegment segment)
{
if (ContentRunning) return;
Inventory.draggingItem = null;
ContentRunning = true;
LoadVideo(segment);
//videoPlayer.LoadContent(playableContentPath, new VideoPlayer.VideoSettings(segment.VideoContent), new VideoPlayer.TextSettings(segment.VideoContent), segment.Id, true, callback: () => ContentRunning = false);