void M_Shutdown(void)
{
+ // reset key_dest
+ key_dest = key_game;
}
void M_Restart(void)
{
- key_dest = key_game;
}
//============================================================================
// say it
Con_Printf("Falling back to normal menu\n");
+ key_dest = key_game;
+
+ //PRVM_ResetProg();
+
// init the normal menu now -> this will also correct the menu router pointers
MR_SetRouting (TRUE);
}
key_dest = key_game;
// AK not using this cause Im not sure whether this is useful at all instead :
-/* // free mempools
- Mem_FreePool(prog->edicts_mempool);
- Mem_FreePool(prog->edictstring_mempool);
- Mem_FreePool(prog->progs_mempool);*/
PRVM_ResetProg();
PRVM_End;
void MP_Restart(void)
{
- key_dest = key_game;
+
MP_Init();
}
{
char *s;
- if(prog->argc <= 2)
+ if(prog->argc < 2)
PRVM_ERROR("VM_strcat wrong parameter count (min. 2 expected ) !\n");
s = VM_GetTempString();
void VM_Cmd_Reset(void)
{
- Mem_EmptyPool(VM_STRINGS_MEMPOOL);
+ //Mem_EmptyPool(VM_STRINGS_MEMPOOL);
+ Mem_FreePool(&VM_STRINGS_MEMPOOL);
VM_Files_CloseAll();
}
void VM_M_Cmd_Reset(void)
{
- VM_Cmd_Init();
+ //VM_Cmd_Init();
+ VM_Cmd_Reset();
}
void PRVM_ResetProg()
{
- mempool_t *t1, *t2, *t3;
+ /*mempool_t *t1, *t2, *t3;
t1 = prog->progs_mempool;
t2 = prog->edictstring_mempool;
Mem_EmptyPool(prog->progs_mempool);
Mem_EmptyPool(prog->edictstring_mempool);
- Mem_EmptyPool(prog->edicts_mempool);
+ Mem_EmptyPool(prog->edicts_mempool);*/
+ Mem_FreePool(&prog->progs_mempool);
+ Mem_FreePool(&prog->edictstring_mempool);
+ Mem_FreePool(&prog->edicts_mempool);
memset(prog,0,sizeof(prvm_prog_t));
- prog->time = &prog->_time;
+ /*prog->time = &prog->_time;
prog->progs_mempool = t1;
prog->edictstring_mempool = t2;
- prog->edicts_mempool = t3;
+ prog->edicts_mempool = t3;*/
PRVM_GCALL(reset_cmd)();
}
prog = &prog_list[prognr];
+ if(prog->loaded)
+ PRVM_ResetProg();
+
memset(prog, 0, sizeof(prvm_prog_t));
prog->time = &prog->_time;