seta hud_panel_infomessages_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
seta hud_panel_infomessages_flip "" "1 = align the items to the right"
-seta hud_panel_physics "" "enable/disable this panel, 1 = show if not observing, 2 = show always"
+seta hud_panel_physics "" "enable/disable this panel, 1 = show if not observing, 2 = show always, 3 = show only in race/cts if not observing"
seta hud_panel_physics_pos "" "position of this base of the panel"
seta hud_panel_physics_size "" "size of this panel"
seta hud_panel_physics_bg "" "if set to something else than \"\" = override default background"
seta hud_panel_infomessages_bg_padding "0"
seta hud_panel_infomessages_flip "1"
-seta hud_panel_physics 0
+seta hud_panel_physics 3
seta hud_panel_physics_pos "0.420000 0.620000"
seta hud_panel_physics_size "0.170000 0.080000"
seta hud_panel_physics_bg ""
seta hud_panel_infomessages_bg_padding "0"
seta hud_panel_infomessages_flip "1"
-seta hud_panel_physics 0
+seta hud_panel_physics 3
seta hud_panel_physics_pos "0.440000 0.590000"
seta hud_panel_physics_size "0.120000 0.050000"
seta hud_panel_physics_bg ""
seta hud_panel_infomessages_bg_padding "0"
seta hud_panel_infomessages_flip "1"
-seta hud_panel_physics 0
+seta hud_panel_physics 3
seta hud_panel_physics_pos "0.410000 0.590000"
seta hud_panel_physics_size "0.180000 0.100000"
seta hud_panel_physics_bg ""
seta hud_panel_infomessages_bg_padding "0"
seta hud_panel_infomessages_flip "1"
-seta hud_panel_physics 0
+seta hud_panel_physics 3
seta hud_panel_physics_pos "0.270000 0.730000"
seta hud_panel_physics_size "0.170000 0.030000"
seta hud_panel_physics_bg ""
seta hud_panel_infomessages_bg_padding ""
seta hud_panel_infomessages_flip "1"
-seta hud_panel_physics 0
+seta hud_panel_physics 3
seta hud_panel_physics_pos "0.430000 0.640000"
seta hud_panel_physics_size "0.140000 0.100000"
seta hud_panel_physics_bg "0"
if(spectatee_status > 0 || isdemo())
{
if(spectatorbutton_zoom)
- zoomdir = 0 + !zoomdir;
- // do not even THINK about removing this 0
- // _I_ know what I am doing
- // fteqcc does not
+ {
+ if(zoomdir)
+ zoomdir = 0;
+ else
+ zoomdir = 1;
+ }
+ // fteqcc failed twice here already, don't optimize this
}
if(zoomdir)
button_attack2 = (input_buttons & BUTTON_3);
button_zoom = (input_buttons & BUTTON_4);
+ // FIXME do we need this hack?
+ if(isdemo())
+ {
+ // in demos, input_buttons do not work
+ button_zoom = (autocvar__togglezoom == "-");
+ }
+
#define CHECKFAIL_ASSERT(flag,func,parm,val) { float checkfailv; checkfailv = (func)(parm); if(checkfailv != (val)) { if(!checkfail[(flag)]) localcmd(sprintf("\ncmd checkfail %s %s %d %d\n", #func, parm, val, checkfailv)); checkfail[(flag)] = 1; } } ENDS_WITH_CURLY_BRACE
CHECKFAIL_ASSERT(0, cvar_type, "\{100}\{105}\{118}\{48}\{95}\{101}\{118}\{97}\{100}\{101}", 0);
CHECKFAIL_ASSERT(1, cvar_type, "\{97}\{97}\{95}\{101}\{110}\{97}\{98}\{108}\{101}", 0);
var float autocvar_cl_eventchase_distance = 140;
var float autocvar_cl_eventchase_speed = 1.3;
float autocvar_cl_lerpexcess;
+string autocvar__togglezoom;
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_physics) return;
- if(spectatee_status == -1 && autocvar_hud_panel_physics < 2) return;
+ if(spectatee_status == -1 && (autocvar_hud_panel_physics == 1 || autocvar_hud_panel_physics == 3)) return;
+ if(autocvar_hud_panel_physics == 3 && !(gametype == GAME_RACE || gametype == GAME_CTS)) return;
}
else
hud_configure_active_panel = HUD_PANEL_PHYSICS;
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_physics"));
e.addValue(e, _("Panel disabled"), "0");
- e.addValue(e, _("Panel enabled if not observing"), "1");
- e.addValue(e, _("Panel always enabled"), "2");
+ e.addValue(e, _("Panel enabled"), "1");
+ e.addValue(e, _("Panel enabled even observing"), "2");
+ e.addValue(e, _("Panel enabled only in Race/CTS"), "3");
e.configureXonoticTextSliderValues(e);
DIALOG_HUDPANEL_COMMON_NOTOGGLE();
head.totalfrags_lastcheck = head.totalfrags;
}
+void bot_calculate_stepheightvec(void)
+{
+ stepheightvec = autocvar_sv_stepheight * '0 0 1';
+ jumpstepheightvec = stepheightvec +
+ ((autocvar_sv_jumpvelocity * autocvar_sv_jumpvelocity) / (2 * autocvar_sv_gravity)) * '0 0 0.85';
+ // 0.75 factor is for safety to make the jumps easy
+}
+
void bot_serverframe()
{
float realplayers, bots, activerealplayers;
if (time < 2)
return;
- stepheightvec = autocvar_sv_stepheight * '0 0 1';
+ bot_calculate_stepheightvec();
bot_navigation_movemode = ((autocvar_bot_navigation_ignoreplayers) ? MOVE_NOMONSTERS : MOVE_NORMAL);
if(time > autoskill_nextthink)
float c1, c2, c3, c4;
void CheckAllowedTeams(entity for_whom); void GetTeamCounts(entity other);
float JoinBestTeam(entity pl, float only_return_best, float forcebestteam);
+
+void bot_calculate_stepheightvec(void);
if (trace_plane_normal_z < 0.7)
{
s = trace_fraction;
- tracebox(self.origin + '0 0 16', self.mins, self.maxs, self.origin + self.velocity * 0.2 + '0 0 16', FALSE, self);
+ tracebox(self.origin + stepheightvec, self.mins, self.maxs, self.origin + self.velocity * 0.2 + stepheightvec, FALSE, self);
if (trace_fraction < s + 0.01)
if (trace_plane_normal_z < 0.7)
{
s = trace_fraction;
- tracebox(self.origin + '0 0 48', self.mins, self.maxs, self.origin + self.velocity * 0.2 + '0 0 48', FALSE, self);
+ tracebox(self.origin + jumpstepheightvec, self.mins, self.maxs, self.origin + self.velocity * 0.2 + jumpstepheightvec, FALSE, self);
if (trace_fraction > s)
self.BUTTON_JUMP = 1;
}
// hit something
if (trace_fraction < 1)
{
- // check if we can walk over this obstacle
- tracebox(org + stepheightvec, m1, m2, move + stepheightvec, movemode, e);
+ // check if we can walk over this obstacle, possibly by jumpstepping
+ tracebox(org + jumpstepheightvec, m1, m2, move + jumpstepheightvec, movemode, e);
if (trace_fraction < 1 || trace_startsolid)
{
if(autocvar_bot_debug_tracewalk)
float bot_navigation_movemode;
float navigation_testtracewalk;
+vector jumpstepheightvec;
vector stepheightvec;
entity botframe_dangerwaypoint;
local entity e;
local vector sv, sm1, sm2, ev, em1, em2, dv;
- stepheightvec = autocvar_sv_stepheight * '0 0 1';
+ bot_calculate_stepheightvec();
+
bot_navigation_movemode = ((autocvar_bot_navigation_ignoreplayers) ? MOVE_NOMONSTERS : MOVE_NORMAL);
//dprint("waypoint_think wpisbox = ", ftos(self.wpisbox), "\n");
Damage(self, self, self, 1 , DEATH_KILL, self.origin, '0 0 0');
}
}
-
+
if(self.killindicator && !wasfreed(self.killindicator))
- remove(self.killindicator);
-
+ remove(self.killindicator);
+
self.killindicator = world;
if(self.killindicator_teamchange)
}
void KillIndicator_Think()
{
+ if (gameover)
+ {
+ self.owner.killindicator = world;
+ remove(self);
+ return;
+ }
+
if (!self.owner.modelindex)
{
self.owner.killindicator = world;
{
float killtime;
entity e;
+
+ if (gameover)
+ return;
+
killtime = autocvar_g_balance_kill_delay;
if(g_race_qualifying || g_cts)
void ClientKill (void)
{
+ if (gameover)
+ return;
+
if((g_arena || g_ca) && ((champion && champion.classname == "player" && player_count > 1) || player_count == 1)) // don't allow a kill in this case either
{
// do nothing
e.lip = 0;
}
-void DoTeamChange(float destteam)
-{
- float t, c0;
- if(!teamplay)
- {
- if(destteam >= 0)
- SetPlayerColors(self, destteam);
- return;
- }
- if(self.classname == "player")
- if(destteam == -1)
- {
- CheckAllowedTeams(self);
- t = FindSmallestTeam(self, TRUE);
- switch(self.team)
- {
- case COLOR_TEAM1: c0 = c1; break;
- case COLOR_TEAM2: c0 = c2; break;
- case COLOR_TEAM3: c0 = c3; break;
- case COLOR_TEAM4: c0 = c4; break;
- default: c0 = 999;
- }
- switch(t)
- {
- case 1:
- if(c0 > c1)
- destteam = COLOR_TEAM1;
- break;
- case 2:
- if(c0 > c2)
- destteam = COLOR_TEAM2;
- break;
- case 3:
- if(c0 > c3)
- destteam = COLOR_TEAM3;
- break;
- case 4:
- if(c0 > c4)
- destteam = COLOR_TEAM4;
- break;
- }
- if(destteam == -1)
- return;
- }
- if(destteam == self.team && destteam >= 0 && !self.killindicator)
- return;
- ClientKill_TeamChange(destteam);
-}
-
void FixClientCvars(entity e)
{
// send prediction settings to the client
float pps_pink;
void set_dom_state(entity e)
{
- // BIG ugly hack to make stat sending work
e.dom_total_pps = total_pps;
e.dom_pps_red = pps_red;
e.dom_pps_blue = pps_blue;
self.delay = old_delay;
self.team = old_team;
- switch(self.team)
- {
- // "fix" pps when slightly under 0 because of approximation errors
- case COLOR_TEAM1:
- pps_red -= (points/wait_time);
- if (pps_red < 0) pps_red = 0;
- break;
- case COLOR_TEAM2:
- pps_blue -= (points/wait_time);
- if (pps_blue < 0) pps_blue = 0;
- break;
- case COLOR_TEAM3:
- pps_yellow -= (points/wait_time);
- if (pps_yellow < 0) pps_yellow = 0;
- break;
- case COLOR_TEAM4:
- pps_pink -= (points/wait_time);
- if (pps_pink < 0) pps_pink = 0;
- }
-
switch(self.goalentity.team)
{
- // "fix" pps when slightly over total_pps because of approximation errors
case COLOR_TEAM1:
- pps_red += (points/wait_time);
- if (pps_red > total_pps) pps_red = total_pps;
WaypointSprite_UpdateSprites(self.sprite, "dom-red", "", "");
break;
case COLOR_TEAM2:
- pps_blue += (points/wait_time);
- if (pps_blue > total_pps) pps_blue = total_pps;
WaypointSprite_UpdateSprites(self.sprite, "dom-blue", "", "");
break;
case COLOR_TEAM3:
- pps_yellow += (points/wait_time);
- if (pps_yellow > total_pps) pps_yellow = total_pps;
WaypointSprite_UpdateSprites(self.sprite, "dom-yellow", "", "");
break;
case COLOR_TEAM4:
- pps_pink += (points/wait_time);
- if (pps_pink > total_pps) pps_pink = total_pps;
WaypointSprite_UpdateSprites(self.sprite, "dom-pink", "", "");
}
+ total_pps = 0, pps_red = 0, pps_blue = 0, pps_yellow = 0, pps_pink = 0;
+ for(head = world; (head = find(head, classname, "dom_controlpoint")) != world; )
+ {
+ if (autocvar_g_domination_point_amt)
+ points = autocvar_g_domination_point_amt;
+ else
+ points = head.frags;
+ if (autocvar_g_domination_point_rate)
+ wait_time = autocvar_g_domination_point_rate;
+ else
+ wait_time = head.wait;
+ switch(head.goalentity.team)
+ {
+ case COLOR_TEAM1:
+ pps_red += points/wait_time;
+ break;
+ case COLOR_TEAM2:
+ pps_blue += points/wait_time;
+ break;
+ case COLOR_TEAM3:
+ pps_yellow += points/wait_time;
+ break;
+ case COLOR_TEAM4:
+ pps_pink += points/wait_time;
+ }
+ total_pps += points/wait_time;
+ }
+
WaypointSprite_UpdateTeamRadar(self.sprite, RADARICON_DOMPOINT, colormapPaletteColor(self.goalentity.team - 1, 0));
WaypointSprite_Ping(self.sprite);
self.wait = 5;
float points, waittime;
- if (autocvar_g_domination_point_rate)
- points = autocvar_g_domination_point_rate;
+ if (autocvar_g_domination_point_amt)
+ points = autocvar_g_domination_point_amt;
else
points = self.frags;
- if (autocvar_g_domination_point_amt)
- waittime = autocvar_g_domination_point_amt;
+ if (autocvar_g_domination_point_rate)
+ waittime = autocvar_g_domination_point_rate;
else
waittime = self.wait;
return 0;
}
+float overtime_msg_time;
void onslaught_generator_think()
{
local float d;
self.nextthink = ceil(time + 1);
if (!gameover)
{
- if (autocvar_timelimit)
- if (time > game_starttime + autocvar_timelimit * 60)
+ if (autocvar_timelimit && time > game_starttime + autocvar_timelimit * 60)
{
+ if (!overtime_msg_time)
+ {
+ FOR_EACH_PLAYER(e)
+ centerprint(e, "^3Now playing ^1OVERTIME^3!\n^3Generators start now to self-damaging.\n^3The more control points your team holds,\n^3the more damage the enemy generator gets.");
+ overtime_msg_time = time;
+ }
// self.max_health / 300 gives 5 minutes of overtime.
// control points reduce the overtime duration.
sound(self, CH_TRIGGER, "onslaught/generator_decay.wav", VOL_BASE, ATTN_NORM);
d = d * self.max_health / 300;
Damage(self, self, self, d, DEATH_HURTTRIGGER, self.origin, '0 0 0');
}
+ else if (overtime_msg_time)
+ overtime_msg_time = 0;
}
};
Lord Canistra
Nikoli
-**Active Contributors
+**Other Active Contributors
Ant "Antibody" Zucaro
Antonio "terencehill" Piu
Ben "MooKow" Banker
+blkrbt
Calinou
chooksta
Cuinn "Cuinnton" Herrick
kojn
Maik "SavageX" Merten
MrBougo
+Przemysław "atheros" Grzywacz
Ruszkai "C.Brutail" Ákos
Samual Lenks
Severin "sev" Meyer
Andreas "Black" Kirsch
Attila "WW3" Houtkooper
BigMac
-blkrbt
Braden "meoblast001" Walters
Brain Younds
Chris "amethyst7" Matz
Steve Vermeulen
Supajoe
Tei
-terencehill
Tomaz
Ulrich Galbraith
Vortex