git-svn-id: https://svn.eduke32.com/eduke32@814 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-06-29 12:53:18 +00:00
parent ef183706e6
commit b60e2a57dc
3 changed files with 12 additions and 1 deletions

View file

@ -1140,6 +1140,12 @@ int OSD_Dispatch(const char *cmd)
continue;
}
if (wp[0] == '/' && wp[1] == '/') // cheap hack
{
free(workbuf);
return -1;
}
symb = findexactsymbol(wp);
if (!symb)
{

View file

@ -7814,10 +7814,13 @@ int load_script(const char *szScript)
if (fp != NULL)
{
char line[255];
extern int cmdfromscript;
OSD_Printf("Executing \"%s\"\n", szScript);
cmdfromscript = 1;
while (fgets(line ,sizeof(line)-1, fp) != NULL)
OSD_Dispatch(strtok(line,"\r\n"));
cmdfromscript = 0;
fclose(fp);
return 0;
}

View file

@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern int voting;
struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat;
int cmdfromscript = 0;
static inline int osdcmd_quit(const osdfuncparm_t *parm)
{
@ -999,7 +1000,8 @@ static int osdcmd_bind(const osdfuncparm_t *parm)
else boundkeys[keynames[i].id].repeat = 1;
Bstrncpy(boundkeys[keynames[i].id].name,parm->parms[j], MAXBINDSTRINGLENGTH-1);
boundkeys[keynames[i].id].key=keynames[i].name;
OSD_Printf("%s\n",parm->raw);
if (!cmdfromscript)
OSD_Printf("%s\n",parm->raw);
return OSDCMD_OK;
}