mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +00:00
- 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:
parent
74c326e9b2
commit
ede07f93b2
1 changed files with 10 additions and 1 deletions
|
@ -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 ())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue