SpiritQuaddicted / reQuiem

reQuiem is a custom OpenGL Quake engine for Windows and Linux. It's designed for maximum compatibility with all things Quake - past, present and future. It's fast, reliable, and easy to configure. In short: it fixes what was broken, improves what needed improving, and leaves the rest alone. It was developed by jdhack.
GNU General Public License v2.0
17 stars 2 forks source link

PF_objerror shouldn't be fatal? #23

Closed neogeographica closed 10 years ago

neogeographica commented 10 years ago

I noticed this when playing impdm1 on a listen server (using the scoreboard fix from https://github.com/SpiritQuaddicted/reQuiem/issues/8 ).

This happens when the level ends, either through timelimit or fraglimit, either using frikbots or "vanilla" QuakeC. The console prints the following error and the listen server shuts down (kicks me back to fullscreen console):

======OBJECT ERROR in FindIntermission:
FindIntermission: no spot
edict 55:
  think           execute_changelevel()
  map             start

I assume this is because impdm1 doesn't have an intermission entity. However I thought it was a little odd that the server would shut down, as opposed to (for example) falling back to some other view for intermission.

I tested the same level in super8 and in QuakeSpasm. In those cases, the same error is printed, but the listen server doesn't shut down... it just gives me an intermission view from some goofy embedded-in-the-floor perspective (map origin?) and then continues normally with the next map.

The error message is being printed from PF_objerror in pr_cmds.c:

/*
=================
PF_objerror

Dumps out self, then an error message.  The program is aborted and self is
removed, but the level can continue.

objerror(value)
=================
*/
void PF_objerror (void)
{
    char    *s;
    edict_t *ed;

    s = PF_VarString (0);
    Con_Printf ("======OBJECT ERROR in %s:\n%s\n", /*pr_strings +*/ pr_xfunction->s_name, s);
    ed = PROG_TO_EDICT(PR_GLOBAL(self));
    ED_Print (ed);
    ED_Free (ed);

    Host_Error ("Program error");
}

Note that the comment says "the level can continue", but then it calls Host_Error which definitely does shut things down.

In the QuakeSpasm source, the call to HostError is commented out like so:

    //Host_Error ("Program error"); //johnfitz -- by design, this should not be fatal

So maybe that's the way to go.