X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=prvm_cmds.c;h=6490bf18a5d51513505b54db1f48735a46d3541c;hb=c64899c50bbe92c4f85528170b6802395fe3dffa;hp=f362d36cd9ab0beb2f560204481f0091f4b39552;hpb=9b11444784a52e3d91b41bda74aa0bfa5cdb6127;p=xonotic%2Fdarkplaces.git diff --git a/prvm_cmds.c b/prvm_cmds.c index f362d36c..6490bf18 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -3911,9 +3911,16 @@ void VM_getimagesize(prvm_prog_t *prog) VM_CheckEmptyString(prog, p); pic = Draw_CachePic_Flags (p, CACHEPICFLAG_NOTPERSISTENT); - - PRVM_G_VECTOR(OFS_RETURN)[0] = pic->width; - PRVM_G_VECTOR(OFS_RETURN)[1] = pic->height; + if( Draw_CachePic_Flags(s, 0)->tex == r_texture_notexture ) + { + PRVM_G_VECTOR(OFS_RETURN)[0] = 0; + PRVM_G_VECTOR(OFS_RETURN)[1] = 0; + } + else + { + PRVM_G_VECTOR(OFS_RETURN)[0] = pic->width; + PRVM_G_VECTOR(OFS_RETURN)[1] = pic->height; + } PRVM_G_VECTOR(OFS_RETURN)[2] = 0; }