]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix some more uninitialized locals; disable a broken fteqcc optimization
authorRudolf Polzer <divverent@xonotic.org>
Thu, 26 Apr 2012 10:00:51 +0000 (12:00 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 26 Apr 2012 10:00:51 +0000 (12:00 +0200)
qcsrc/Makefile
qcsrc/server/cl_client.qc
qcsrc/server/command/sv_cmd.qc

index 618e3ad4e234fc465e927bd80493429d9d5bcc16..27f6fc993aa0c12c1e372a7b36c25922fcce7995 100644 (file)
@@ -3,7 +3,7 @@ FTEQCC ?= fteqcc
 PERL ?= perl
 
 FTEQCCFLAGS_WATERMARK ?= -DWATERMARK='"$(shell git describe)"' -DCVAR_POPCON
-FTEQCCFLAGS ?= -Werror -Wno-Q302 -O3 -fno-fastarrays $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
+FTEQCCFLAGS ?= -Werror -Wno-Q302 -O3 -Ono-return_only -fno-fastarrays $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
 FTEQCCFLAGS_PROGS ?=
 FTEQCCFLAGS_MENU ?=
 
index b68bce6949eb272048cd6594a6e9a7b81b9d2d18..e95e9332440c91e6989539256f0de9d82c72880b 100644 (file)
@@ -547,11 +547,11 @@ void FixPlayermodel()
        vector m1, m2;
 
        defaultmodel = "";
+       defaultskin = 0;
+       chmdl = FALSE;
 
        if(autocvar_sv_defaultcharacter == 1)
        {
-               defaultskin = 0;
-
                if(teamplay)
                {
                        string s;
index e70ce44ddbd06b3a7059d6fcc750d51ba0365895..045409b471d9d28d7215869d6067b1c4e4b96e5c 100644 (file)
@@ -81,6 +81,7 @@ void GameCommand_adminmsg(float request, float argc)
                        float infobartime = stof(argv(3));
                        
                        string successful, t;
+                       successful = string_null;
                        
                        if((targets) && (admin_message))
                        {
@@ -166,7 +167,7 @@ void GameCommand_allspec(float request, float argc)
                {
                        entity client;
                        string reason = argv(1);
-                       float i;
+                       float i = 0;
                        
                        FOR_EACH_REALPLAYER(client)
                        {
@@ -528,7 +529,7 @@ void GameCommand_defer_clear_all(float request)
                case CMD_REQUEST_COMMAND:
                {
                        entity client;
-                       float i;
+                       float i = 0;
                        float argc;
                        
                        FOR_EACH_CLIENT(client)
@@ -904,6 +905,7 @@ void GameCommand_moveplayer(float request, float argc)
                        string notify = argv(3);
                        
                        string successful, t;
+                       successful = string_null;
                        
                        // lets see if the target(s) even actually exist.
                        if((targets) && (destination))
@@ -1242,6 +1244,8 @@ void GameCommand_shuffleteams(float request)
                                float i, x, z, t_teams, t_players, team_color;
 
                                // count the total amount of players and total amount of teams
+                               t_players = 0;
+                               t_teams = 0;
                                FOR_EACH_PLAYER(tmp_player)
                                {
                                        CheckAllowedTeams(tmp_player);
@@ -1803,4 +1807,4 @@ void GameCommand(string command)
        print(((command != "") ? strcat("Unknown server command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try sv_cmd help.\n");
        
        return;
-}
\ No newline at end of file
+}