]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_cmds.c
major cleanup of input code - CL_Move replaces most of IN_Move, IN_Commands, many...
[xonotic/darkplaces.git] / prvm_cmds.c
index e306d917908b56cf06a93d154d02d187f3b6bb7b..a326cd46eb13d8af342adf586f02929550b4b839 100644 (file)
@@ -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;