const float STAT_NEX_CHARGE = 49;
const float STAT_HUD = 50;
-const float STAT_DOM_TOTAL_PPS = 70;
-const float STAT_DOM_PPS_RED = 71;
-const float STAT_DOM_PPS_BLUE = 72;
-const float STAT_DOM_PPS_PINK = 73;
-const float STAT_DOM_PPS_YELLOW = 74;
-
// see DP source, quakedef.h
const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
const float STAT_MOVEVARS_AIRSTRAFEACCEL_QW = 223;
const float STAT_REDALIVE = 100;
const float STAT_BLUEALIVE = 101;
+const float STAT_DOM_TOTAL_PPS = 100;
+const float STAT_DOM_PPS_RED = 101;
+const float STAT_DOM_PPS_BLUE = 102;
+const float STAT_DOM_PPS_PINK = 103;
+const float STAT_DOM_PPS_YELLOW = 104;
+
//const float STAT_SPIDERBOT_AIM 53 // compressShotOrigin
//const float STAT_SPIDERBOT_TARGET 54 // compressShotOrigin
string ColoredTeamName(float t);
void DecodeLevelParms (void);
//void dom_player_join_team(entity pl);
-void set_dom_state(entity e, float connecting);
+void set_dom_state(void);
void ClientConnect (void)
{
float t;
send_CSQC_teamnagger();
if (g_domination)
- set_dom_state(self, TRUE);
+ set_dom_state();
send_CSQC_cr_maxbullets(self);
CheatInitClient();
float pps_blue;
float pps_yellow;
float pps_pink;
-void set_dom_state(entity e, float connecting)
+void set_dom_state(void)
{
- if(connecting) e.dom_total_pps = total_pps;
- e.dom_pps_red = pps_red;
- e.dom_pps_blue = pps_blue;
- if(c3 >= 0) e.dom_pps_yellow = pps_yellow;
- if(c4 >= 0) e.dom_pps_pink = pps_pink;
+ // BIG ugly hack to make stat sending work
+ self.dom_total_pps = total_pps;
+ self.dom_pps_red = pps_red;
+ self.dom_pps_blue = pps_blue;
+ if(c3 >= 0)
+ {
+ self.dom_pps_yellow = pps_yellow;
+ }
+ if(c4 >= 0)
+ {
+ self.dom_pps_pink = pps_pink;
+ }
}
void() dom_controlpoint_setup;
WaypointSprite_UpdateSprites(self.sprite, "dom-pink", "", "");
}
- FOR_EACH_CLIENT(head)
- set_dom_state(head, FALSE);
+ FOR_EACH_PLAYER(self)
+ set_dom_state();
WaypointSprite_UpdateTeamRadar(self.sprite, RADARICON_DOMPOINT, colormapPaletteColor(self.goalentity.team - 1, 0));
WaypointSprite_Ping(self.sprite);
float points, waittime;
if (g_domination_point_rate)
- points += g_domination_point_rate;
+ points = g_domination_point_rate;
else
- points += self.frags;
+ points = self.frags;
+ if(points == 0) // default
+ points = 1;
+
if (g_domination_point_amt)
- waittime += g_domination_point_amt;
+ waittime = g_domination_point_amt;
else
- waittime += self.wait;
+ waittime = self.wait;
+ if(waittime == 0) // default
+ waittime = 5;
total_pps += points/waittime;
};