void M_Restart(void)
{
+ key_dest = key_game;
}
//============================================================================
// fall back to the normal menu
// say it
- Con_Printf("Falling back to normal menu.\n Error :");
+ Con_Printf("Falling back to normal menu\n");
// init the normal menu now -> this will also correct the menu router pointers
MR_SetRouting (TRUE);
void MP_Restart(void)
{
+ key_dest = key_game;
MP_Init();
}
return;
}
- data = FS_LoadFile(va("data/%s", filename), false);
+ // not conform with VM_fopen
+ data = FS_LoadFile(filename, false);
if (data == NULL)
PRVM_G_FLOAT(OFS_RETURN) = -1;
PRVM_ED_LoadFromFile(data);
- Mem_Free(data);
+ if(data)
+ Mem_Free(data);
}
def = PRVM_ED_FindField(s);
if (!def)
{
- Con_DPrintf("PRVM_ED_ParseEpair: Can't find field %s on %s\n", s, PRVM_NAME);
+ Con_DPrintf("PRVM_ED_ParseEpair: Can't find field %s in %s\n", s, PRVM_NAME);
return false;
}
val->_int = PRVM_G_INT(def->ofs);
func = PRVM_ED_FindFunction(s);
if (!func)
{
- Con_Printf ("PRVM_ED_ParseEpair: Can't find function %s on %s\n", s, PRVM_NAME);
+ Con_Printf ("PRVM_ED_ParseEpair: Can't find function %s in %s\n", s, PRVM_NAME);
return false;
}
val->function = func - prog->functions;
void PRVM_CrashAll()
{
int i;
- PRVM_Begin;
+ prvm_prog_t *oldprog = prog;
+
for(i = 0; i < PRVM_MAXPROGS; i++)
{
if(!PRVM_ProgLoaded(i))
PRVM_SetProg(i);
PRVM_Crash();
}
- PRVM_End;
+
+ prog = oldprog;
}
void PRVM_Crash()