]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix some warnings in HUD code
authorRudolf Polzer <divverent@alientrap.org>
Tue, 26 Oct 2010 18:36:43 +0000 (20:36 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 26 Oct 2010 18:36:43 +0000 (20:36 +0200)
Makefile
qcsrc/client/View.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/scoreboard.qc

index 66e8f737fc0ec9cd6349be60932f2778ce2487e3..6c9b39c890585d5ec8da8e0628f2893d2586e9b3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ ZIPEXCLUDE ?= -x\!*.pk3 -xr\!\.svn -x\!qcsrc
 DIFF ?= diff
 
 FTEQCCFLAGS_WATERMARK ?= -DWATERMARK='"^1$(shell git describe) TEST BUILD"'
 DIFF ?= diff
 
 FTEQCCFLAGS_WATERMARK ?= -DWATERMARK='"^1$(shell git describe) TEST BUILD"'
-FTEQCCFLAGS ?= -Werror -Wno-Q302 -O3 -Ono-c -Ono-cs -flo $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
+FTEQCCFLAGS ?= -Werror -Wno-Q205 -Wno-Q302 -O3 -Ono-c -Ono-cs -flo $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
 FTEQCCFLAGS_PROGS ?=
 FTEQCCFLAGS_MENU ?=
 
 FTEQCCFLAGS_PROGS ?=
 FTEQCCFLAGS_MENU ?=
 
index 5ac1f965e3a1d8714da30cd5ebdea66916917257..25bde8975cfe3bfb3ab00cd218156337b3b52448 100644 (file)
@@ -825,7 +825,6 @@ void CSQC_UpdateView(float w, float h)
 
                                ring_scale = cvar("crosshair_ring_size");
 
 
                                ring_scale = cvar("crosshair_ring_size");
 
-                               float f, a;
                                wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
 
                                float nex_charge;
                                wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
 
                                float nex_charge;
index 049368c1636b07944ae7de43de10008dfbbd9da2..0978f362d73b2c8d74253074437ac0d92416657b 100644 (file)
@@ -460,21 +460,21 @@ void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color,
 }
 
 // drawpic wrapper to draw an image as large as possible with preserved aspect ratio into a box
 }
 
 // drawpic wrapper to draw an image as large as possible with preserved aspect ratio into a box
-var float imgaspect;
-var float aspect;
+var float _drawpic_imgaspect;
+var float _drawpic_aspect;
 #define drawpic_aspect(pos,pic,mySize,color,alpha,drawflag)\
        do {\
                vector imgsize;\
                imgsize = drawgetimagesize(pic);\
 #define drawpic_aspect(pos,pic,mySize,color,alpha,drawflag)\
        do {\
                vector imgsize;\
                imgsize = drawgetimagesize(pic);\
-               imgaspect = imgsize_x/imgsize_y;\
+               _drawpic_imgaspect = imgsize_x/imgsize_y;\
                vector oldsz, sz;\
                oldsz = sz = mySize;\
                vector oldsz, sz;\
                oldsz = sz = mySize;\
-               aspect = sz_x/sz_y;\
-               if(aspect > imgaspect) {\
-                       sz_x = sz_y * imgaspect;\
+               _drawpic_aspect = sz_x/sz_y;\
+               if(_drawpic_aspect > _drawpic_imgaspect) {\
+                       sz_x = sz_y * _drawpic_imgaspect;\
                        drawpic(pos + eX * (oldsz_x - sz_x) * 0.5, pic, sz, color, alpha, drawflag);\
                } else {\
                        drawpic(pos + eX * (oldsz_x - sz_x) * 0.5, pic, sz, color, alpha, drawflag);\
                } else {\
-                       sz_y = sz_x / imgaspect;\
+                       sz_y = sz_x / _drawpic_imgaspect;\
                        drawpic(pos + eY * (oldsz_y - sz_y) * 0.5, pic, sz, color, alpha, drawflag);\
                }\
        } while(0)
                        drawpic(pos + eY * (oldsz_y - sz_y) * 0.5, pic, sz, color, alpha, drawflag);\
                }\
        } while(0)
index 4000f30a70e00e8ec5792b7994a7746a2eea2b5e..2fdf0d22034b2cd9f9f285db4686c9acbda31531 100644 (file)
@@ -976,7 +976,6 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                        float padding;
                        padding = (weapon_width - stringwidth(s, FALSE, '1 0 0' * fontsize)) / 2; // center the accuracy value
 
                        float padding;
                        padding = (weapon_width - stringwidth(s, FALSE, '1 0 0' * fontsize)) / 2; // center the accuracy value
 
-                       float weapon_hit, weapon_damage;
                        weapon_damage = weapon_fired[self.weapon-WEP_FIRST];
                        if(weapon_damage)
                        {
                        weapon_damage = weapon_fired[self.weapon-WEP_FIRST];
                        if(weapon_damage)
                        {