]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fixed a bug that caused some messages to not be logged to the disk (Con_Print calls...
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 28 Oct 2003 22:29:30 +0000 (22:29 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 28 Oct 2003 22:29:30 +0000 (22:29 +0000)
Changed the comment of Con_Print, so it isnt misleading any more.
Fixed a bug so dp wont crash when VM_strzone/VM_strunzone is used.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3614 d7cf8633-e32d-0410-b094-e92efae38249

console.c
prvm_cmds.c
prvm_edict.c
prvm_exec.c

index a991bad28fbe09ce50a3e758be9d082ea2f9d455..f3d1ebc735dd292ffe3c2e33ffc8bc0180afb507 100644 (file)
--- a/console.c
+++ b/console.c
@@ -267,7 +267,7 @@ void Con_Linefeed (void)
 Con_Print
 
 Handles cursor positioning, line wrapping, etc
-All console printing must go through this in order to be logged to disk
+All console printing must go through this in order to be displayed
 If no console is visible, the notify window will pop up.
 ================
 */
index 7e399492a4e40152fb1e32b09e214a1c400e2370..a9ce8ac9f6dcf27d9af7c0b87ec8a86f8b5840d9 100644 (file)
@@ -318,7 +318,7 @@ void VM_print (void)
        char string[VM_STRINGTEMP_LENGTH];
 
        VM_VarString(0, string, sizeof(string));
-       Con_Print(string);
+       Con_Printf(string);
 }
 
 /*
index c759fce1eeaf7594ba74c5fe732fc79169ad2659..5aa1d6af158f12d58511922791f5eb2dde98431d 100644 (file)
@@ -690,7 +690,7 @@ void PRVM_ED_PrintEdicts_f (void)
 
        if(Cmd_Argc() != 2)
        {
-               Con_Print("prvm_edicts <program name>\n");
+               Con_Printf("prvm_edicts <program name>\n");
                return;
        }
        
@@ -718,7 +718,7 @@ void PRVM_ED_PrintEdict_f (void)
 
        if(Cmd_Argc() != 3)
        {
-               Con_Print("prvm_edict <program name> <edict number>\n");
+               Con_Printf("prvm_edict <program name> <edict number>\n");
                return;
        }
 
@@ -755,7 +755,7 @@ void PRVM_ED_Count_f (void)
 
        if(Cmd_Argc() != 2)
        {
-               Con_Print("prvm_count <program name>\n");
+               Con_Printf("prvm_count <program name>\n");
                return;
        }
 
@@ -1465,6 +1465,7 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, char **required
                prog->flag |= PRVM_OP_STATE;
        
        PRVM_GCALL(reset_cmd)();
+       PRVM_GCALL(init_cmd)();
 
        // init mempools
        PRVM_MEM_Alloc();
@@ -1491,7 +1492,7 @@ void PRVM_Fields_f (void)
 
        if(Cmd_Argc() != 2)
        {
-               Con_Print("prvm_fields <program name>\n");
+               Con_Printf("prvm_fields <program name>\n");
                return;
        }
 
@@ -1604,7 +1605,7 @@ void PRVM_Globals_f (void)
        }*/
        if(Cmd_Argc () != 2)
        {
-               Con_Print ("prvm_globals <program name>\n");
+               Con_Printf("prvm_globals <program name>\n");
                return;
        }
 
@@ -1659,8 +1660,6 @@ void PRVM_InitProg(int prognr)
        memset(prog, 0, sizeof(prvm_prog_t));
 
        prog->time = &prog->_time;
-
-       PRVM_GCALL(init_cmd)();
 }
 
 int PRVM_GetProgNr()
index 7ba8a1b2d1446e651b449e8b3d1eb5f3908a48a5..f6401c03aad545a9d034fdf09d4bb254dc67836c 100644 (file)
@@ -195,7 +195,7 @@ void PRVM_Profile_f (void)
        //      howmany = atoi(Cmd_Argv(1));
        if(Cmd_Argc() != 2)
        {
-               Con_Print("prvm_profile <program name>\n");
+               Con_Printf("prvm_profile <program name>\n");
                return;
        }