]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_cmds.c
changed most COM_ParseToken calls to COM_ParseTokenConsole, this fixed the kills...
[xonotic/darkplaces.git] / prvm_cmds.c
index 8533991a62ac01d2c343093174a72f30824258d0..c8c178498a758cb31a1f26b001808cc559369eb1 100644 (file)
@@ -749,13 +749,20 @@ void VM_remove (void)
        VM_SAFEPARMCOUNT(1, VM_remove);
 
        ed = PRVM_G_EDICT(OFS_PARM0);
-       if( PRVM_NUM_FOR_EDICT(ed) <= prog->reserved_edicts ) {
+       if( PRVM_NUM_FOR_EDICT(ed) <= prog->reserved_edicts )
+       {
                Con_DPrint( "VM_remove: tried to remove the null entity or a reserved entity!\n" );
-       } else if( ed->priv.required->free ) {
+               if (developer.integer >= 1)
+                       PRVM_PrintState();
+       }
+       else if( ed->priv.required->free )
+       {
                Con_DPrint( "VM_remove: tried to remove an already freed entity!\n" );
-       } else {
-               PRVM_ED_Free (ed);
+               if (developer.integer >= 1)
+                       PRVM_PrintState();
        }
+       else
+               PRVM_ED_Free (ed);
 //     if (ed == prog->edicts)
 //             PRVM_ERROR ("remove: tried to remove world");
 //     if (PRVM_NUM_FOR_EDICT(ed) <= sv.maxclients)
@@ -2007,9 +2014,9 @@ void VM_getostype(void)
        OS_MAC - not supported
        */
 
-#ifdef _WIN32
+#ifdef WIN32
        PRVM_G_FLOAT(OFS_RETURN) = 0;
-#elif defined _MAC
+#elif defined(MACOSX)
        PRVM_G_FLOAT(OFS_RETURN) = 2;
 #else
        PRVM_G_FLOAT(OFS_RETURN) = 1;
@@ -2083,7 +2090,7 @@ void VM_parseentitydata(void)
        data = PRVM_G_STRING(OFS_PARM1);
 
     // parse the opening brace
-       if (!COM_ParseToken(&data, false) || com_token[0] != '{' )
+       if (!COM_ParseTokenConsole(&data) || com_token[0] != '{' )
                PRVM_ERROR ("VM_parseentitydata: %s: Couldn't parse entity data:\n%s", PRVM_NAME, data );
 
        PRVM_ED_ParseEdict (data, ent);