- fixed: Failure to open bots.cfg would throw an exception that prevented the level from starting. Catch it in FCajunMaster::LoadBots instead and handle it non-disruptively.

This commit is contained in:
Christoph Oelckers 2016-03-03 11:11:25 +01:00
parent 74c326e9b2
commit ede07f93b2

View file

@ -60,6 +60,7 @@ Everything that is changed is marked (maybe commented) with "Added by MC"
#include "d_net.h"
#include "d_netinf.h"
#include "d_player.h"
#include "doomerrors.h"
static FRandom pr_botspawn ("BotSpawn");
@ -496,7 +497,15 @@ bool FCajunMaster::LoadBots ()
DPrintf ("No " BOTFILENAME ", so no bots\n");
return false;
}
sc.OpenFile(tmp);
try
{
sc.OpenFile(tmp);
}
catch (CRecoverableError &err)
{
Printf("%s. So no bots\n", err.GetMessage());
return false;
}
while (sc.GetString ())
{