]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into samual/notification_rewrite
authorSamual Lenks <samual@xonotic.org>
Mon, 28 Jan 2013 22:43:46 +0000 (17:43 -0500)
committerSamual Lenks <samual@xonotic.org>
Mon, 28 Jan 2013 22:43:46 +0000 (17:43 -0500)
qcsrc/Makefile
qcsrc/server/bot/waypoints.qc
qcsrc/server/playerstats.qc
qcsrc/server/playerstats.qh
qcsrc/server/vehicles/vehicles_def.qh

index 3983966c48c327324331064c145c5da0c6e7f38b..3e98265a9521945ec5049ac54d552d2d2dc62e40 100644 (file)
@@ -1,7 +1,7 @@
 SCM := $(shell if [ -d .svn ]; then echo svn; elif [ -d ../.git ]; then echo git; fi)
 PERL ?= perl
 QCCFLAGS_WATERMARK ?= -DWATERMARK='"$(shell git describe)"' -DCVAR_POPCON=1
-QCC ?= fteqcc
+QCC ?= gmqcc
 
 VERSION_MESSAGE = $(shell cd server && $(QCC) --version --help)
 ifneq (,$(findstring GMQCC,$(VERSION_MESSAGE)))
index 0766ab0466dbe24fc9ae2bed9ecb2ce529eeef5d..8e9ae6b911e745cfb58bf6acb7132792f3d898eb 100644 (file)
@@ -390,7 +390,7 @@ float waypoint_load_links()
                wp_to_pos       = stov(argv(1));
 
                // Search "from" waypoint
-               if(wp_from && wp_from.origin!=wp_from_pos)
+               if(!wp_from || wp_from.origin!=wp_from_pos)
                {
                        wp_from = findradius(wp_from_pos, 1);
                        found = FALSE;
@@ -486,7 +486,7 @@ void waypoint_load_links_hardwired()
                wp_to_pos       = stov(argv(1));
 
                // Search "from" waypoint
-               if(wp_from && wp_from.origin!=wp_from_pos)
+               if(!wp_from || wp_from.origin!=wp_from_pos)
                {
                        wp_from = findradius(wp_from_pos, 5);
                        found = FALSE;
index f18c81e0a501f46bed2fb178c91cf70f703165b0..e6c69ad49ad07252deade0bbd98e410a6dc64634 100644 (file)
@@ -366,18 +366,18 @@ void PlayerStats_AddGlobalInfo(entity p)
        p.playerstats_id = string_null;
 }
 
-.float visual_rank;
+.float scoreboard_pos;
 void PlayerStats_EndMatch(float finished)
 {
        entity p;
        PlayerScore_Sort(score_dummyfield, 0);
-       PlayerScore_Sort(visual_rank, 1);
-       FOR_EACH_CLIENT(p) // spectators intentionally not included
+       PlayerScore_Sort(scoreboard_pos, 1);
+       FOR_EACH_CLIENT(p)
        {
                //PlayerStats_Accuracy(p); // stats are already written with PlayerStats_AddGlobalInfo(entity), don't double them up.
-               
-               if((g_arena || g_lms || g_ca) && (p.alivetime <= 0)) { continue; }
-               else if(p.classname != "player") { continue; }
+
+               if(p.frags == FRAGS_SPECTATOR)
+                       continue;
 
                if(clienttype(p) == CLIENTTYPE_REAL)
                {
@@ -395,7 +395,7 @@ void PlayerStats_EndMatch(float finished)
                        PlayerStats_Event(p, PLAYERSTATS_WINS, p.winning);
                        PlayerStats_Event(p, PLAYERSTATS_MATCHES, 1);
                        PlayerStats_Event(p, PLAYERSTATS_RANK, p.score_dummyfield);
-                       PlayerStats_Event(p, PLAYERSTATS_VISUAL_RANK, p.visual_rank);
+                       PlayerStats_Event(p, PLAYERSTATS_SCOREBOARD_POS, p.scoreboard_pos);
                }
        }
 }
index 3702deba50d20686fc1928005ed3cb61e6f2d130..f3806d50df917fe39a165663fd62fa3f0937578c 100644 (file)
@@ -6,7 +6,7 @@ string PLAYERSTATS_MATCHES = "matches";
 string PLAYERSTATS_JOINS = "joins";
 string PLAYERSTATS_SCOREBOARD_VALID = "scoreboardvalid";
 string PLAYERSTATS_RANK = "rank";
-string PLAYERSTATS_VISUAL_RANK = "visual-rank";
+string PLAYERSTATS_SCOREBOARD_POS = "scoreboardpos";
 
 string PLAYERSTATS_TOTAL = "total-";
 string PLAYERSTATS_SCOREBOARD = "scoreboard-";
index f1d3890447140399b4206ac232694483aa42c1b1..7d5a787d0061d914ca9159d1ebe6a42108057690 100644 (file)
@@ -48,7 +48,7 @@ float VHF_PLAYERSLOT    = 16384;    /// This ent is a player slot on a multi-per
 //.void() vehicle_spawn;
 
 void vehicles_exit(float eject);
-var .void(float exit_flags) vehicle_exit;
+.void(float exit_flags) vehicle_exit;
 float VHEF_NORMAL = 0;  /// User pressed exit key
 float VHEF_EJECT  = 1;  /// User pressed exit key 3 times fast (not implemented) or vehile is dying
 float VHEF_RELESE = 2;  /// Release ownership, client possibly allready dissconnected / went spec / changed team / used "kill" (not implemented)
@@ -57,15 +57,15 @@ float SVC_SETVIEWPORT   = 5;   // Net.Protocol 0x05
 float SVC_SETVIEWANGLES = 10;  // Net.Protocol 0x0A
 float SVC_UPDATEENTITY  = 128; // Net.Protocol 0x80
 
-var .void() vehicle_enter;  /// Vehicles custom funciton to be executed when owner exit it
-var .void() vehicle_die;    /// Vehicles custom function to be executed when vehile die
+.void() vehicle_enter;  /// Vehicles custom funciton to be executed when owner exit it
+.void() vehicle_die;    /// Vehicles custom function to be executed when vehile die
 #define VHSF_NORMAL 0
 #define VHSF_FACTORY 2
-var .void(float _spawnflag) vehicle_spawn;  /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
-var .float(float _imp) vehicles_impusle;
+.void(float _spawnflag) vehicle_spawn;  /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
+.float(float _imp) vehicles_impusle;
 .float vehicle_weapon2mode = volly_counter;
 
-//§ var .void() vehicle_factory()
+//§ .void() vehicle_factory()
 
 #ifdef VEHICLES_USE_ODE
 void(entity e, float physics_enabled) physics_enable = #540; // enable or disable physics on object