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)))
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;
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;
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)
{
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);
}
}
}
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-";
//.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)
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