]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_cmds.c
the merging of alias and bsp model rendering begins... purely cosmetic changes in...
[xonotic/darkplaces.git] / prvm_cmds.c
index e306d917908b56cf06a93d154d02d187f3b6bb7b..7c06b387ac3be12fc055e5f4ce492a0b187c8beb 100644 (file)
@@ -2160,9 +2160,9 @@ void PF_setattachment (void)
                                        if (!strcmp(tagname, model->data_overridetagnamesforskin[(unsigned int)tagentity->v->skin].data_overridetagnames[i].name))
                                                v->_float = i + 1;
                        // FIXME: use a model function to get tag info (need to handle skeletal)
-                       if (v->_float == 0 && model->alias.aliasnum_tags)
-                               for (i = 0;i < model->alias.aliasnum_tags;i++)
-                                       if (!strcmp(tagname, model->alias.aliasdata_tags[i].name))
+                       if (v->_float == 0 && model->num_tags)
+                               for (i = 0;i < model->num_tags;i++)
+                                       if (!strcmp(tagname, model->data_tags[i].name))
                                                v->_float = i + 1;
                        if (v->_float == 0)
                                Con_DPrintf("setattachment(edict %i, edict %i, string \"%s\"): tried to find tag named \"%s\" on entity %i (model \"%s\") but could not find it\n", NUM_FOR_EDICT(e), NUM_FOR_EDICT(tagentity), tagname, tagname, NUM_FOR_EDICT(tagentity), model->name);
@@ -2252,8 +2252,8 @@ void VM_getmousepos(void)
 
        VM_SAFEPARMCOUNT(0,VM_getmousepos);
 
-       PRVM_G_VECTOR(OFS_RETURN)[0] = in_mouse_x;
-       PRVM_G_VECTOR(OFS_RETURN)[1] = in_mouse_y;
+       PRVM_G_VECTOR(OFS_RETURN)[0] = in_mouse_x * vid.conwidth / vid.realwidth;
+       PRVM_G_VECTOR(OFS_RETURN)[1] = in_mouse_y * vid.conheight / vid.realheight;
        PRVM_G_VECTOR(OFS_RETURN)[2] = 0;
 }
 
@@ -2576,7 +2576,7 @@ void VM_precache_pic(void)
 
        VM_CheckEmptyString (s);
 
-       if(!Draw_CachePic(s))
+       if(!Draw_CachePic(s, false))
                PRVM_G_INT(OFS_RETURN) = PRVM_SetString("");
 }
 
@@ -2842,7 +2842,7 @@ void VM_getimagesize(void)
 
        VM_CheckEmptyString (p);
 
-       pic = Draw_CachePic (p);
+       pic = Draw_CachePic (p, false);
 
        PRVM_G_VECTOR(OFS_RETURN)[0] = pic->width;
        PRVM_G_VECTOR(OFS_RETURN)[1] = pic->height;
@@ -3145,8 +3145,8 @@ void VM_altstr_ins(void)
        in = instr = PRVM_G_STRING( OFS_PARM0 );
        num = PRVM_G_FLOAT( OFS_PARM1 );
        set = setstr = PRVM_G_STRING( OFS_PARM2 );
-       
-       out = outstr = VM_GetTempString();      
+
+       out = outstr = VM_GetTempString();
        for( num = num * 2 + 2 ; *in && num > 0 ; *out++ = *in++ )
                if( *in == '\\' && !*++in )
                        break;