From 23d3efcee11b2a9949c33a512c7843cbc924234e Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 15 Jan 2012 15:48:45 +0100 Subject: [PATCH] If the size in input to drawpic_aspect is 0 do not draw the image --- qcsrc/client/miscfunctions.qc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index f4eaf927f..ff5dd07ff 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -284,11 +284,13 @@ var string _drawpic_picpath; if(_drawpic_sz_x/_drawpic_sz_y > _drawpic_imgaspect) {\ _drawpic_oldsz = _drawpic_sz_x;\ _drawpic_sz_x = _drawpic_sz_y * _drawpic_imgaspect;\ - drawpic(pos + eX * (_drawpic_oldsz - _drawpic_sz_x) * 0.5, pic, _drawpic_sz, color, theAlpha, drawflag);\ + if(_drawpic_sz_x)\ + drawpic(pos + eX * (_drawpic_oldsz - _drawpic_sz_x) * 0.5, pic, _drawpic_sz, color, theAlpha, drawflag);\ } else {\ _drawpic_oldsz = _drawpic_sz_y;\ _drawpic_sz_y = _drawpic_sz_x / _drawpic_imgaspect;\ - drawpic(pos + eY * (_drawpic_oldsz - _drawpic_sz_y) * 0.5, pic, _drawpic_sz, color, theAlpha, drawflag);\ + if(_drawpic_sz_y)\ + drawpic(pos + eY * (_drawpic_oldsz - _drawpic_sz_y) * 0.5, pic, _drawpic_sz, color, theAlpha, drawflag);\ }\ } while(0) -- 2.39.2