]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - mvm_cmds.c
remove a piece of breakpoint code I forgot to remove before
[xonotic/darkplaces.git] / mvm_cmds.c
index 401b33d6065ba223f176c95df8809cc0e10f59b1..47976cfbfe4afa6e0f923178afc3d32f430a4137 100644 (file)
@@ -74,7 +74,7 @@ void VM_M_setmousetarget(void)
                in_client_mouse = true;
                break;
        default:
-               PRVM_ERROR("VM_M_setmousetarget: wrong destination %i !\n",PRVM_G_FLOAT(OFS_PARM0));
+               PRVM_ERROR("VM_M_setmousetarget: wrong destination %f !",PRVM_G_FLOAT(OFS_PARM0));
        }
 }
 
@@ -123,7 +123,7 @@ void VM_M_setkeydest(void)
                // key_dest = key_message
                // break;
        default:
-               PRVM_ERROR("VM_M_setkeydest: wrong destination %i !\n",prog->globals.generic[OFS_PARM0]);
+               PRVM_ERROR("VM_M_setkeydest: wrong destination %f !", PRVM_G_FLOAT(OFS_PARM0));
        }
 }
 
@@ -171,19 +171,19 @@ void VM_M_callfunction(void)
        const char *s;
 
        if(prog->argc == 0)
-               PRVM_ERROR("VM_M_callfunction: 1 parameter is required !\n");
+               PRVM_ERROR("VM_M_callfunction: 1 parameter is required !");
 
        s = PRVM_G_STRING(OFS_PARM0 + (prog->argc - 1));
 
        if(!s)
-               PRVM_ERROR("VM_M_callfunction: null string !\n");
+               PRVM_ERROR("VM_M_callfunction: null string !");
 
        VM_CheckEmptyString(s);
 
        func = PRVM_ED_FindFunction(s);
 
        if(!func)
-               PRVM_ERROR("VM_M_callfunciton: function %s not found !\n", s);
+               PRVM_ERROR("VM_M_callfunciton: function %s not found !", s);
        else if (func->first_statement < 0)
        {
                // negative statements are built in functions
@@ -220,7 +220,7 @@ void VM_M_isfunction(void)
        s = PRVM_G_STRING(OFS_PARM0);
 
        if(!s)
-               PRVM_ERROR("VM_M_isfunction: null string !\n");
+               PRVM_ERROR("VM_M_isfunction: null string !");
 
        VM_CheckEmptyString(s);
 
@@ -250,7 +250,7 @@ void VM_M_writetofile(void)
        if( !file ) {
                return;
        }
-       
+
        ent = PRVM_G_EDICT(OFS_PARM1);
        if(ent->priv.required->free)
        {
@@ -442,7 +442,7 @@ void VM_M_setserverlistmaskstring( void )
        int field;
 
        VM_SAFEPARMCOUNT( 4, VM_M_setserverlistmaskstring );
-       str = PRVM_G_STRING( OFS_PARM1 );
+       str = PRVM_G_STRING( OFS_PARM2 );
        if( !str )
                PRVM_ERROR( "VM_M_setserverlistmaskstring: null string passed!" );
 
@@ -480,7 +480,7 @@ void VM_M_setserverlistmaskstring( void )
        }
 
        mask->active = true;
-       mask->tests[field] = (int) PRVM_G_FLOAT( OFS_PARM3 );
+       mask->tests[field] = (serverlist_maskop_t)((int)PRVM_G_FLOAT( OFS_PARM3 ));
 }
 
 /*
@@ -533,7 +533,7 @@ void VM_M_setserverlistmasknumber( void )
        }
 
        mask->active = true;
-       mask->tests[field] = (int) PRVM_G_FLOAT( OFS_PARM3 );
+       mask->tests[field] = (serverlist_maskop_t)((int)PRVM_G_FLOAT( OFS_PARM3 ));
 }
 
 
@@ -654,7 +654,7 @@ void VM_M_setserverlistsort( void )
 {
        VM_SAFEPARMCOUNT( 2, VM_M_setserverlistsort );
 
-       serverlist_sortbyfield = (int) PRVM_G_FLOAT( OFS_PARM0 );
+       serverlist_sortbyfield = (serverlist_infofield_t)((int)PRVM_G_FLOAT( OFS_PARM0 ));
        serverlist_sortdescending = (qboolean) PRVM_G_FLOAT( OFS_PARM1 );
 }
 
@@ -743,7 +743,7 @@ sizebuf_t *VM_WriteDest (void)
        int             destclient;
 
        if(!sv.active)
-               PRVM_ERROR("VM_WriteDest: game is not server (%s)\n", PRVM_NAME);
+               PRVM_ERROR("VM_WriteDest: game is not server (%s)", PRVM_NAME);
 
        dest = PRVM_G_FLOAT(OFS_PARM1);
        switch (dest)
@@ -754,7 +754,7 @@ sizebuf_t *VM_WriteDest (void)
        case MSG_ONE:
                destclient = (int) PRVM_G_FLOAT(OFS_PARM2);
                if (destclient < 0 || destclient >= svs.maxclients || !svs.clients[destclient].active)
-                       PRVM_ERROR("VM_clientcommand: %s: invalid client !\n", PRVM_NAME);
+                       PRVM_ERROR("VM_clientcommand: %s: invalid client !", PRVM_NAME);
 
                return &svs.clients[destclient].message;
 
@@ -900,8 +900,11 @@ prvm_builtin_t vm_m_builtins[] = {
        VM_altstr_prepare,
        VM_altstr_get,
        VM_altstr_set,
-       VM_altstr_ins,  // 86
-       0,0,0,0,        // 90
+       VM_altstr_ins,
+       VM_findflags,
+       VM_findchainflags,
+       VM_cvar_defstring, // 89
+       0, // 90
        e10,                    // 100
        e100,                   // 200
        e100,                   // 300