if (autocvar_con_chat != floor(mySize.y / autocvar_con_chatsize - 0.5))
cvar_set("con_chat", ftos(floor(mySize.y / autocvar_con_chatsize - 0.5)));
+ vector chatsize = '1 1 0' * autocvar_con_chatsize;
if(autocvar__hud_configure)
{
- cvar_set("con_chatrect_x", "9001"); // over 9000, we'll fake it instead for more control over alpha and such
+ vector chatsize = '1 1 0' * autocvar_con_chatsize;
+ if (cvar_string("con_chatrect_x") != "9001")
+ cvar_set("con_chatrect_x", "9001"); // over 9000, we'll fake it instead for more control over alpha and such
string str = textShortenToWidth(_("^3Player^7: This is the chat area."), mySize.x, chatsize, stringwidth_colors);
for(int i = 0; i < autocvar_con_chat; ++i)
{
panel_size.x += panel_bg_padding * 2; // restore initial width
return end_pos;
}
+*/
+
+
+ int rankings_rows = 0;
+ int rankings_columns = 0;
+ int rankings_cnt = 0;
vector Scoreboard_Rankings_Draw(vector pos, string ranktitle, entity pl, vector rgb, vector bg_size)
{
int i;
pos = Scoreboard_MakeTable(pos, tm, panel_bg_color, bg_size);
}
+ pos = Scoreboard_MedalStats_Draw(pos);
+
// draw scoreboard spectators before accuracy and item stats
if (autocvar_hud_panel_scoreboard_spectators_position == 0) {
- pos = Scoreboard_Spectators_Draw(pos, tm, str, hud_fontsize);
+ pos = Scoreboard_Spectators_Draw(pos);
}
- // draw accuracy and item stats
+ // draw accuracy and item stats
if (Scoreboard_AccuracyStats_WouldDraw(pos.y))
pos = Scoreboard_AccuracyStats_Draw(pos, panel_bg_color, bg_size);
if (Scoreboard_ItemStats_WouldDraw(pos.y))
pos.y += 1.25 * hud_fontsize.y;
}
if(race_speedaward_alltimebest) {
- drawcolorcodedstring(pos, sprintf(_("All-time fastest: %d%s ^7(%s^7)"), race_speedaward_alltimebest, race_speedaward_alltimebest_unit, ColorTranslateRGB(race_speedaward_alltimebest_holder)), hud_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawcolorcodedstring(pos, sprintf(_("All-time fastest: %d%s ^7(%s^7)"), race_speedaward_alltimebest, unit, ColorTranslateRGB(race_speedaward_alltimebest_holder)), hud_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
pos.y += 1.25 * hud_fontsize.y;
}
+ if (race_speedaward || race_speedaward_alltimebest)
+ pos.y += 0.25 * hud_fontsize.y;
pos = Scoreboard_Rankings_Draw(pos, ranktitle, playerslots[player_localnum], panel_bg_color, bg_size);
}
+ else
+ rankings_cnt = 0;
+ // List spectators
+ for(pl = players.sort_next; pl; pl = pl.sort_next)
+ {
+ if(pl.team == NUM_SPECTATOR)
+ {
+ for(tm = teams.sort_next; tm; tm = tm.sort_next)
+ if(tm.team == NUM_SPECTATOR)
+ break;
+ str = sprintf("%s (%d)", _("Spectators"), tm.team_size);
+ draw_beginBoldFont();
+ drawstring(pos, str, hud_fontsize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ draw_endBoldFont();
+ pos.y += 1.25 * hud_fontsize.y;
+
+ break;
+ }
+ }
+
// draw scoreboard spectators after rankings
if (autocvar_hud_panel_scoreboard_spectators_position == 2) {
- pos = Scoreboard_Spectators_Draw(pos, tm, str, hud_fontsize);
+ pos = Scoreboard_Spectators_Draw(pos);
}
- pos = Scoreboard_MapStats_Draw(pos, panel_bg_color, bg_size);
+ //pos = Scoreboard_MapStats_Draw(pos, panel_bg_color, bg_size);
// draw scoreboard spectators after mapstats
if (autocvar_hud_panel_scoreboard_spectators_position == 3) {
WaypointSprite_UpdateBuildFinished(this.buff_waypoint, time + this.buff_activetime - frametime);
}
- this.oldbuffs = STAT(BUFFS, this);
+ this.oldbuffs = this.buffdef;
}
- if(!game_stopped)
+ if(!game_stopped && !game_timeout)
if((round_handler_IsActive() && round_handler_IsRoundStarted()) || time >= game_starttime)
if(!this.buff_activetime_updated)
{
MUTATOR_HOOKFUNCTION(buffs, ForbidThrowCurrentWeapon)
{
- if(MUTATOR_RETURNVALUE || game_stopped) return;
+ if(MUTATOR_RETURNVALUE || game_stopped || game_timeout) return;
entity player = M_ARGV(0, entity);
- if(STAT(BUFFS, player) & BUFF_SWAPPER.m_itemid)
+ if(StatusEffects_active(BUFF_SWAPPER, player))
{
float best_distance = autocvar_g_buffs_swapper_range;
entity closest = NULL;
this.fake_nade = NULL;
int ntype;
+ int tntype = this.tandemnade_type;
string pntype = this.pokenade_type;
- if((this.items & ITEM_Strength.m_itemid) && autocvar_g_nades_bonus_onstrength)
+ if(StatusEffects_active(STATUSEFFECT_Strength, this) && autocvar_g_nades_bonus_onstrength)
ntype = STAT(NADE_BONUS_TYPE, this);
else if (STAT(NADE_BONUS, this) >= 1)
{
float game_stopped;
float game_starttime; //point in time when the countdown to game start is over
float round_starttime; //point in time when the countdown to round start is over
- bool autocvar_g_allow_oldvortexbeam;
+float overtime_starttime; // z411 point in time where first overtime started
+
+float checkrules_overtimesadded; // z411 add
+float timeout_last;
+float timeout_total_time;
+bool game_timeout;
+
int autocvar_leadlimit;
// TODO: world.qh can't be included here due to circular includes!
#define autocvar_fraglimit cvar("fraglimit")
#endif
REGISTER_STAT(WEAPONRATEFACTOR, float, W_WeaponRateFactor(this))
REGISTER_STAT(GAME_STOPPED, int, game_stopped)
+
+REGISTER_STAT(TIMEOUT_LAST, float, timeout_last)
+
REGISTER_STAT(GAMESTARTTIME, float, game_starttime)
- REGISTER_STAT(STRENGTH_FINISHED, float)
- REGISTER_STAT(INVINCIBLE_FINISHED, float)
/** arc heat in [0,1] */
REGISTER_STAT(PRESSED_KEYS, int)
- /** this stat could later contain some other bits of info, like, more server-side particle config */
- REGISTER_STAT(ALLOW_OLDVORTEXBEAM, bool, autocvar_g_allow_oldvortexbeam)
REGISTER_STAT(FUEL, int)
REGISTER_STAT(NB_METERSTART, float)
/** compressShotOrigin */
REGISTER_STAT(VEHICLESTAT_RELOAD2, int)
REGISTER_STAT(VEHICLESTAT_W2MODE, int)
REGISTER_STAT(NADE_TIMER, float)
-REGISTER_STAT(SECRETS_TOTAL, int, secrets_total)
-REGISTER_STAT(SECRETS_FOUND, int, secrets_found)
+//REGISTER_STAT(SECRETS_TOTAL, int, secrets_total)
+//REGISTER_STAT(SECRETS_FOUND, int, secrets_found)
REGISTER_STAT(RESPAWN_TIME, float)
REGISTER_STAT(ROUNDSTARTTIME, float, round_starttime)
+REGISTER_STAT(OVERTIMESTARTTIME, float, overtime_starttime)
+REGISTER_STAT(OVERTIMESADDED, float, checkrules_overtimesadded)
REGISTER_STAT(MONSTERS_TOTAL, int)
REGISTER_STAT(MONSTERS_KILLED, int)
- REGISTER_STAT(BUFFS, int)
REGISTER_STAT(NADE_BONUS, float)
REGISTER_STAT(NADE_BONUS_TYPE, int)
REGISTER_STAT(NADE_BONUS_SCORE, float)
modifications = strcat(modifications, ", Weapons stay");
if(autocvar_g_jetpack)
modifications = strcat(modifications, ", Jet pack");
- if(autocvar_g_powerups == 0)
- modifications = strcat(modifications, ", No powerups");
- if(autocvar_g_powerups > 0)
- modifications = strcat(modifications, ", Powerups");
modifications = substring(modifications, 2, strlen(modifications) - 2);
- string versionmessage = GetClientVersionMessage(this);
- string s = strcat(versionmessage, "^8\n^8\nserver is ^9", autocvar_hostname, "^8\n");
+ //string versionmessage = GetClientVersionMessage(this);
+ //string s = strcat(versionmessage, "^8\n^9", (autocvar_hostname_full ? autocvar_hostname_full : autocvar_hostname));
+ //string s = strcat(versionmessage, "^8\n^8\nserver is ^9", autocvar_hostname, "^8\n");
+ string s = (autocvar_hostname_full != "" ? autocvar_hostname_full : autocvar_hostname);
- s = strcat(s, "^8\nmatch type is ^1", gamemode_name, "^8\n");
+ s = strcat(s, "^8\n^7", gamemode_name);
if(modifications != "")
- s = strcat(s, "^8\nactive modifications: ^3", modifications, "^8\n");
+ s = strcat(s, "^7 | ^3", modifications);
if(cache_lastmutatormsg != autocvar_g_mutatormsg)
{
CLIENT_COMMAND("say_team", ClientCommand_say_team(ent, request, arguments, command), "Print a message to chat to all team mates") \
CLIENT_COMMAND("selectteam", ClientCommand_selectteam(ent, request, arguments), "Attempt to choose a team to join into") \
CLIENT_COMMAND("selfstuff", ClientCommand_selfstuff(ent, request, command), "Stuffcmd a command to your own client") \
- CLIENT_COMMAND("sentcvar", ClientCommand_sentcvar(ent, request, arguments, command), "New system for sending a client cvar to the server") \
+ CLIENT_COMMAND("sentcvar", ClientCommand_sentcvar(ent, request, arguments), "New system for sending a client cvar to the server") \
CLIENT_COMMAND("spectate", ClientCommand_spectate(ent, request), "Become an observer") \
+ CLIENT_COMMAND("sounds", ClientCommand_sounds(ent, request), "Get list of commsnds") \
CLIENT_COMMAND("suggestmap", ClientCommand_suggestmap(ent, request, arguments), "Suggest a map to the mapvote at match end") \
CLIENT_COMMAND("tell", ClientCommand_tell(ent, request, arguments, command), "Send a message directly to a player") \
CLIENT_COMMAND("voice", ClientCommand_voice(ent, request, arguments, command), "Send voice message via sound") \
int f3 = 0;
if(deathtype == DEATH_BUFF.m_id)
- f3 = buff_FirstFromFlags(STAT(BUFFS, attacker)).m_id;
+ f3 = buff_FirstFromFlags(attacker).m_id;
- if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker_name, deathlocation, CS(targ).killcount, kill_count_to_attacker))
- Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker_name, deathlocation, CS(targ).killcount, kill_count_to_attacker, f3);
+ if (!Obituary_WeaponDeath(targ, attacker, true, deathtype, playername(targ.netname, targ.team, true), playername(attacker_name, attacker.team, true), deathlocation, CS(targ).killcount, kill_count_to_attacker))
+ Obituary_SpecialDeath(targ, attacker, true, deathtype, playername(targ.netname, targ.team, true), playername(attacker_name, attacker.team, true), deathlocation, CS(targ).killcount, kill_count_to_attacker, f3);
}
}