- wget -O data/maps/g-23.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints.cache
- wget -O data/maps/g-23.waypoints.hardwired https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints.hardwired
- make
- - EXPECT=93decd0a82cf911f02fb5572197db7f3
+ - EXPECT=04d63df6a5d73bd335612543efd944d6
- HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
| tee /dev/stderr
| grep '^:'
seta hud_panel_infomessages_group_fadetime 0.4 "group message fade in/out time"
seta hud_panel_scoreboard_namesize 15 "size limit of player names and relative column (multiplied by fontsize)"
-seta hud_panel_scoreboard_maxheight 0.5 "max height of the scoreboard; a few players that wouldn't fit into the scoreboard are listed in the last row"
+seta hud_panel_scoreboard_maxheight 0.6 "max height of the scoreboard; a few players that wouldn't fit into the scoreboard are listed in the last row"
seta hud_panel_scoreboard_others_showscore 1 "show scores of players listed in the last row when the scoreboard reaches the max height"
seta hud_panel_scoreboard_spectators_showping 1 "show ping of spectators"
seta hud_panel_scoreboard_spectators_aligned 0 "align spectators in columns"
set g_balance_vaporizer_weaponreplace ""
set g_balance_vaporizer_weaponstart 0
set g_balance_vaporizer_weaponstartoverride -1
-set g_balance_vaporizer_weaponthrowable 0
+set g_balance_vaporizer_weaponthrowable 1
// }}}
// {{{ #13: Grappling Hook
set g_balance_hook_primary_ammo 5
set g_balance_vaporizer_weaponreplace ""
set g_balance_vaporizer_weaponstart 0
set g_balance_vaporizer_weaponstartoverride -1
-set g_balance_vaporizer_weaponthrowable 0
+set g_balance_vaporizer_weaponthrowable 1
// }}}
// {{{ #13: Grappling Hook
set g_balance_hook_primary_ammo 5
bool autocvar_hud_panel_scoreboard_dynamichud = false;
-float autocvar_hud_panel_scoreboard_maxheight = 0.5;
+float autocvar_hud_panel_scoreboard_maxheight = 0.6;
bool autocvar_hud_panel_scoreboard_others_showscore = true;
bool autocvar_hud_panel_scoreboard_spectators_showping = true;
bool autocvar_hud_panel_scoreboard_spectators_aligned = false;
case SP_DMG: case SP_DMGTAKEN:
return sprintf("%.1f k", pl.(scores(field)) / 1000);
- default:
+ default: case SP_SCORE:
tmp = pl.(scores(field));
f = scores_flags(field);
if(field == ps_primary)
field = Scoreboard_GetField(pl, SP_PING);
}
else if(autocvar_hud_panel_scoreboard_others_showscore)
- field = ftos(pl.(scores(ps_primary)));
+ field = Scoreboard_GetField(pl, SP_SCORE);
string str = textShortenToWidth(entcs_GetName(pl.sv_entnum), namesize, hud_fontsize, stringwidth_colors);
float column_width = stringwidth(str, true, hud_fontsize);
int max_players = 999;
if(autocvar_hud_panel_scoreboard_maxheight > 0)
{
- max_players = autocvar_hud_panel_scoreboard_maxheight * vid_conheight;
+ float height = autocvar_hud_panel_scoreboard_maxheight * vid_conheight;
if(teamplay)
- max_players = (max_players - hud_fontsize.y * 1.25 - panel_bg_padding * 2) / 2;
- max_players = floor(max_players / (hud_fontsize.y * 1.25));
+ {
+ height -= (panel_bg_padding * 2 + hud_fontsize.y * 1.25) * team_count; // - padding and header
+ height -= hud_fontsize.y * (team_count - 1); // - spacing between tables
+ height /= team_count;
+ }
+ else
+ height -= panel_bg_padding * 2; // - padding
+ max_players = floor(height / (hud_fontsize.y * 1.25));
if(max_players <= 1)
max_players = 1;
if(max_players == tm.team_size)
const int FRAGS_PLAYER = 0;
const int FRAGS_SPECTATOR = -666;
const int FRAGS_LMS_LOSER = -616;
-const int FRAGS_PLAYER_NONSOLID = -616;
+const int FRAGS_PLAYER_NONSOLID = FRAGS_LMS_LOSER;
// we can use this frags value for both
// water levels
REGISTER_MUTATOR(nades, cvar("g_nades"));
.float nade_time_primed;
+.float nade_lifetime;
.entity nade_spawnloc;
+
void nade_timer_think(entity this)
{
- this.skin = 8 - (this.owner.wait - time) / (autocvar_g_nades_nade_lifetime / 10);
+ this.skin = 8 - (this.owner.wait - time) / (this.owner.nade_lifetime / 10);
this.nextthink = time;
if(!this.owner || wasfreed(this.owner))
delete(this);
if(this.health == this.max_health)
{
sound(this, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, 0.5 *(ATTEN_LARGE + ATTEN_MAX));
- this.nextthink = max(time + autocvar_g_nades_nade_lifetime, time);
+ this.nextthink = max(time + this.nade_lifetime, time);
setthink(this, nade_beep);
}
setthink(n, nade_beep);
n.nextthink = max(n.wait - 3, time);
n.projectiledeathtype = DEATH_NADE.m_id;
+ n.nade_lifetime = ntime;
setmodel(fn, MDL_NADE_VIEW);
.entity weaponentity = weaponentities[0]; // TODO: unhardcode
entity held_nade = player.nade;
if (held_nade)
{
- player.nade_timer = bound(0, (time - held_nade.nade_time_primed) / autocvar_g_nades_nade_lifetime, 1);
+ player.nade_timer = bound(0, (time - held_nade.nade_time_primed) / held_nade.nade_lifetime, 1);
// LOG_TRACEF("%d %d", player.nade_timer, time - held_nade.nade_time_primed);
makevectors(player.angles);
held_nade.velocity = player.velocity;
InterpolateOrigin_Do(this);
- float t = entcs_GetTeam(player_localnum) + 1;
string spriteimage = "";
// choose the sprite
switch (this.rule)
{
case SPRITERULE_SPECTATOR:
+ float t = entcs_GetTeam(player_localnum) + 1;
if (!(
(autocvar_g_waypointsprite_itemstime == 1 && t == NUM_SPECTATOR + 1)
|| (autocvar_g_waypointsprite_itemstime == 2 && (t == NUM_SPECTATOR + 1 || warmup_stage || STAT(ITEMSTIME) == 2))
case SPRITERULE_DEFAULT:
if (this.team)
{
- if (this.team == t)
+ if (this.team == myteam + 1)
spriteimage = this.netname;
else
spriteimage = "";
spriteimage = this.netname;
break;
case SPRITERULE_TEAMPLAY:
- if (t == NUM_SPECTATOR + 1)
+ if (myteam == NUM_SPECTATOR)
spriteimage = this.netname3;
- else if (this.team == t)
+ else if (this.team == myteam + 1)
spriteimage = this.netname2;
else
spriteimage = this.netname;
float crosshairdistance = sqrt( pow(o.x - vid_conwidth/2, 2) + pow(o.y - vid_conheight/2, 2) );
- t = waypointsprite_scale;
+ float t = waypointsprite_scale;
a *= waypointsprite_alpha;
{
return ret * angle_mult;
}
+#ifdef SVQC
string specialcommand = "xwxwxsxsxaxdxaxdx1x ";
.float specialcommand_pos;
void SpecialCommand(entity this)
{
-#ifdef SVQC
if (!CheatImpulse(this, CHIMPULSE_GIVE_ALL.impulse))
LOG_INFO("A hollow voice says \"Plugh\".\n");
-#endif
}
+#endif
bool PM_check_specialcommand(entity this, int buttons)
{
return;
float dist = vlen(this.origin - view_origin);
- float t = (entcs_GetTeam(player_localnum) + 1);
vector o;
string txt;
if(autocvar_cl_vehicles_hud_tactical)
- if(dist < 10240 && t != this.team)
+ if(dist < 10240 && (myteam + 1 != this.team))
{
// TODO: Vehicle tactical hud
o = project_3d_to_2d(this.origin + '0 0 32');
else
txt = spritelookuptext(this, spriteimage);
- if(time - floor(time) > 0.5 && t == this.team)
+ if(time - floor(time) > 0.5 && (myteam + 1 == this.team))
{
if(this.helpme && time < this.helpme)
{
float crosshairdistance = sqrt( pow(o.x - vid_conwidth/2, 2) + pow(o.y - vid_conheight/2, 2) );
- t = waypointsprite_scale;
+ float t = waypointsprite_scale;
a *= waypointsprite_alpha;
{
*/
#define SYSTEM(sys, frameLimit, minfps) \
void sys_##sys##_update(entity this, float dt); \
- float autocvar_xon_sys_##sys##_dt = ((frameLimit) ? (1 / (frameLimit)) : 0); \
- float autocvar_xon_sys_##sys##_minfps = (1 / (1 / (minfps)))
+ noref float autocvar_xon_sys_##sys##_dt = ((frameLimit) ? (1 / (frameLimit)) : 0); \
+ noref float autocvar_xon_sys_##sys##_minfps = (1 / (1 / (minfps)))
#define SYSTEM_UPDATE(sys) \
MACRO_BEGIN \