int teamkills = PlayerScore_Get(attacker, SP_TEAMKILLS);
// use the players actual playtime
- float playtime = time - attacker.alivetime;
+ float playtime = time - CS(attacker).startplaytime;
// rate is in teamkills/minutes, playtime in seconds
if (teamkills >= autocvar_g_kick_teamkiller_lower_limit &&
teamkills >= autocvar_g_kick_teamkiller_rate*playtime/60.0)
PHYS_INPUT_BUTTON_ATCK(this) = PHYS_INPUT_BUTTON_JUMP(this) = PHYS_INPUT_BUTTON_ATCK2(this) = false;
+ // player was spectator
if (CS(this).killcount == FRAGS_SPECTATOR) {
PlayerScore_Clear(this);
CS(this).killcount = 0;
+ CS(this).startplaytime = time;
}
for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
ATTRIB(Client, motd_actived_time, float, this.motd_actived_time);
ATTRIB(Client, jointime, float, this.jointime);
ATTRIB(Client, spectatortime, float, this.spectatortime);
+ ATTRIB(Client, startplaytime, float, this.startplaytime);
ATTRIB(Client, version_nagtime, float, this.version_nagtime);
ATTRIB(Client, netname_previous, string, this.netname_previous);
ATTRIB(Client, allowed_timeouts, int, this.allowed_timeouts);
float game_completion_ratio; // 0 at start, 1 near end
.float winning;
-.float jointime; // time of joining
+.float jointime; // time of connecting
+.float startplaytime; // time of switching from spectator to player
.float alivetime; // time of being alive
.float motd_actived_time; // used for both motd and campaign_message