set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_balance_health_start 150
+set g_balance_health_start 100
set g_balance_armor_start 0
set g_start_ammo_shells 15
set g_start_ammo_nails 0
set g_balance_nex_charge 1
set g_balance_nex_charge_mindmg 40
-set g_balance_nex_charge_start 0
+set g_balance_nex_charge_start 0.5
set g_balance_nex_charge_rate 0.3
set g_balance_nex_charge_animlimit 0.5
set g_balance_nex_charge_limit 1
set g_balance_rocketlauncher_speedaccel 1500
set g_balance_rocketlauncher_speedstart 800
set g_balance_rocketlauncher_lifetime 30
-set g_balance_rocketlauncher_refire 1.2
+set g_balance_rocketlauncher_refire 1.1
set g_balance_rocketlauncher_animtime 0.3
set g_balance_rocketlauncher_ammo 3
set g_balance_rocketlauncher_health 30 // 5 hitpoints above maximum laser value -- this way lasers can't blow it up, but grenadelauncher still can most the time.
set g_balance_rocketlauncher_damageforcescale 4
set g_balance_rocketlauncher_detonatedelay 0.05 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 140 // max degrees per second
+set g_balance_rocketlauncher_guiderate 130 // max degrees per second
set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
exec effects-normal.cfg
exec physicsX0.cfg
exec turrets.cfg
-exec font-xolonium.cfg
// hud cvar descriptions
exec _hud_descriptions.cfg
seta hud_panel_notify_bg_border ""
seta hud_panel_notify_bg_padding ""
seta hud_panel_notify_flip "0"
+seta hud_panel_notify_fontsize "0.8"
seta hud_panel_notify_print "1"
seta hud_panel_timer 1
seta hud_panel_timer_bg_border ""
seta hud_panel_timer_bg_padding "0"
-seta hud_panel_radar 1
+seta hud_panel_radar 2 // enabled for keepaway and to make the HUD consistent throughout game modes
seta hud_panel_radar_pos "0.030000 0.020000"
seta hud_panel_radar_size "0.170000 0.220000"
seta hud_panel_radar_bg ""
seta hud_panel_notify_bg_border ""
seta hud_panel_notify_bg_padding ""
seta hud_panel_notify_flip "1"
+seta hud_panel_notify_fontsize "0.8"
seta hud_panel_notify_print "0"
seta hud_panel_timer 1
seta hud_panel_notify_bg_border ""
seta hud_panel_notify_bg_padding ""
seta hud_panel_notify_flip "1"
+seta hud_panel_notify_fontsize "0.8"
seta hud_panel_notify_print "0"
seta hud_panel_timer 1
seta hud_panel_notify_bg_border ""
seta hud_panel_notify_bg_padding ""
seta hud_panel_notify_flip "0"
+seta hud_panel_notify_fontsize "1"
seta hud_panel_notify_print "1"
seta hud_panel_timer 1
float autocvar_hud_panel_notify;
float autocvar_hud_panel_notify_fadetime;
float autocvar_hud_panel_notify_flip;
+float autocvar_hud_panel_notify_fontsize;
float autocvar_hud_panel_notify_print;
float autocvar_hud_panel_notify_time;
float autocvar_hud_panel_powerups;
height = mySize_y/entries;
vector fontsize;
- fontsize = '0.5 0.5 0' * height;
+ float fontheight = height * autocvar_hud_panel_notify_fontsize;
+ fontsize = '0.5 0.5 0' * fontheight;
float a;
float when;
}
attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
- pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
+ pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
if(s != "")
victim = textShortenToWidth(killnotify_victims[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
:hud_config_notifyprint
width_attacker = stringwidth(attacker, TRUE, fontsize);
- pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * (0.5 * fontsize_y + i * height);
- pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
+ pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
+ pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
if(s != "")
METHOD(Button, mousePress, float(entity, vector))
METHOD(Button, mouseDrag, float(entity, vector))
METHOD(Button, mouseRelease, float(entity, vector))
+ METHOD(Button, focusEnter, void(entity))
ATTRIB(Button, onClick, void(entity, entity), SUB_Null)
ATTRIB(Button, onClickEntity, entity, NULL)
ATTRIB(Button, src, string, string_null)
float Button_mousePress(entity me, vector pos)
{
me.mouseDrag(me, pos); // verify coordinates
- if(cvar("menu_sounds"))
- localsound("sound/misc/menu2.wav");
return 1;
}
float Button_mouseRelease(entity me, vector pos)
{
+ if(cvar("menu_sounds"))
+ localsound("sound/misc/menu2.wav");
me.mouseDrag(me, pos); // verify coordinates
if(me.pressed)
{
{
me.focusable = !me.disabled;
}
-.float playedfocus;
+void Button_focusEnter(entity me)
+{
+ if(cvar("menu_sounds") > 1)
+ localsound("sound/misc/menu1.wav");
+ SUPER(Button).focusEnter(me);
+}
void Button_draw(entity me)
{
vector bOrigin, bSize;
me.onClick(me, me.onClickEntity);
}
me.clickTime -= frametime;
-
- if(cvar("menu_sounds") > 1)
- if(me.focused && !me.playedfocus)
- {
- localsound("sound/misc/menu1.wav");
- me.playedfocus = 1;
- }
- else if(!me.focused && me.playedfocus)
- me.playedfocus = 0;
}
#endif
METHOD(Slider, mousePress, float(entity, vector))
METHOD(Slider, mouseDrag, float(entity, vector))
METHOD(Slider, mouseRelease, float(entity, vector))
+ METHOD(Slider, focusEnter, void(entity))
METHOD(Slider, valueToText, string(entity, float))
METHOD(Slider, toString, string(entity))
METHOD(Slider, setValue, void(entity, float))
//me.mouseDrag(me, pos);
}
}
- if(cvar("menu_sounds"))
- localsound("sound/misc/menu2.wav");
return 1;
}
float Slider_mouseRelease(entity me, vector pos)
{
+ if(cvar("menu_sounds"))
+ localsound("sound/misc/menu2.wav");
me.pressed = 0;
if(me.disabled)
return 0;
{
me.focusable = !me.disabled;
}
+void Slider_focusEnter(entity me)
+{
+ if(cvar("menu_sounds") > 1)
+ localsound("sound/misc/menu1.wav");
+ SUPER(Slider).focusEnter(me);
+}
void Slider_draw(entity me)
{
float controlLeft;
me.TD(me, 1, 2.9, e = makeXonoticInputBox(0, string_null));
e.onEnter = ServerList_Connect_Click;
e.onEnterEntity = slist;
+ e.onChange = ServerList_Update_favoriteButton;
+ e.onChangeEntity = slist;
slist.ipAddressBox = e;
me.TD(me, 1, 1.5, e = makeXonoticButton("", '0 0 0'));
e.onClick = ServerList_Favorite_Click;
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair color:"));
- me.TD(me, 1, 0.9, e = makeXonoticCheckBox(0, "crosshair_color_per_weapon", _("Per weapon")));
- me.TD(me, 1, 0.9, e = makeXonoticCheckBox(0, "crosshair_color_by_health", _("By health")));
- setDependent(e, "crosshair_color_per_weapon", 0, 0);
+ me.TD(me, 1, 0.9, e = makeXonoticRadioButton(4, "crosshair_color_per_weapon", string_null, _("Per weapon")));
+ me.TD(me, 1, 0.9, e = makeXonoticRadioButton(4, "crosshair_color_by_health", string_null, _("By health")));
me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 2, 2.6, e = makeXonoticColorpickerString("crosshair_color", "crosshair_color"));
- setDependentAND(e, "crosshair_color_per_weapon", 0, 0, "crosshair_color_by_health", 0, 0);
+ me.TDempty(me, 0.3);
+ me.TD(me, 1, 0.9, e = makeXonoticRadioButton(4, string_null, string_null, _("Custom")));
+ me.TD(me, 2, 1.8, e = makeXonoticColorpickerString("crosshair_color", "crosshair_color"));
+ setDependentAND(e, "crosshair_color_per_weapon", 0, 0, "crosshair_color_by_health", 0, 0);
me.TR(me);
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", _("Enable center dot")));
me.TD(me, 1, 2.2, e = makeXonoticButton(_("Waypoints setup..."), '0 0 0'));
e.onClick = DialogOpenButton_Click;
e.onClickEntity = main.waypointDialog;
- me.TDempty(me, 0.5);
me.TR(me);
me.TDempty(me, 0.4);
me.TD(me, 1, 2.2, e = makeXonoticButton(_("Enter HUD editor"), '0 0 0'));
e.onClick = HUDSetup_Join_Click;
e.onClickEntity = me;
- me.TDempty(me, 0.5);
- me.TR(me);
me.TR(me);
#ifdef ALLOW_FORCEMODELS
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Force models:")));
void ServerList_Filter_Change(entity box, entity me);
void ServerList_Favorite_Click(entity btn, entity me);
void ServerList_Info_Click(entity btn, entity me);
+void ServerList_Update_favoriteButton(entity btn, entity me);
#endif
#ifdef IMPLEMENTATION
resorthostcache();
}
+void ServerList_Update_favoriteButton(entity btn, entity me)
+{
+ if(IsFavorite(me.ipAddressBox.text))
+ me.favoriteButton.setText(me.favoriteButton, _("Remove"));
+ else
+ me.favoriteButton.setText(me.favoriteButton, _("Bookmark"));
+}
+
entity makeXonoticServerList()
{
entity me;
if(me.ipAddressBoxFocused != me.ipAddressBox.focused)
{
if(me.ipAddressBox.focused || me.ipAddressBoxFocused < 0)
- {
- if(IsFavorite(me.ipAddressBox.text))
- me.favoriteButton.setText(me.favoriteButton, _("Remove"));
- else
- me.favoriteButton.setText(me.favoriteButton, _("Bookmark"));
- }
+ ServerList_Update_favoriteButton(NULL, me);
me.ipAddressBoxFocused = me.ipAddressBox.focused;
}
.vector pos1, pos2;
.vector mangle;
-.float cvar_cl_hitsound;
-
.float pain_finished; //Added by Supajoe
.float pain_frame; //"
.float statdraintime; // record the one-second intervals between draining health and armour when they're over 100
.float speedrunning;
// Q3 support
-.float notteam;
-.float notsingle;
-.float notfree;
-.float notq3a;
float q3acompat_machineshotgunswap;
// database
{
if(self.enemy.typehitsound)
self.typehit_time = time;
- else if(self.enemy.hitsound && self.cvar_cl_hitsound)
+ else if(self.enemy.hitsound)
self.hit_time = time;
}
else
{
if(self.typehitsound)
self.typehit_time = time;
- else if(self.hitsound && self.cvar_cl_hitsound)
+ else if(self.hitsound)
self.hit_time = time;
}
}
GetCvars_handleFloat(s, f, cvar_cl_noantilag, "cl_noantilag");
GetCvars_handleFloat(s, f, cvar_cl_voice_directional, "cl_voice_directional");
GetCvars_handleFloat(s, f, cvar_cl_voice_directional_taunt_attenuation, "cl_voice_directional_taunt_attenuation");
- GetCvars_handleFloat(s, f, cvar_cl_hitsound, "cl_hitsound");
GetCvars_handleFloat(s, f, cvar_cl_accuracy_data_share, "cl_accuracy_data_share");
GetCvars_handleFloat(s, f, cvar_cl_accuracy_data_receive, "cl_accuracy_data_receive");
.float anglejitter;
.string gametypefilter;
.string cvarfilter;
+float DoesQ3ARemoveThisEntity();
void SV_OnEntityPreSpawnFunction()
{
if(self.gametypefilter != "")
}
}
+ if(DoesQ3ARemoveThisEntity())
+ {
+ remove(self);
+ return;
+ }
+
// support special -1 and -2 angle from radiant
if (self.angles == '0 -1 0')
self.angles = '-90 0 0';
waypoint_spawnforitem(self);
}
- if(teams_matter)
- {
- if(self.notteam)
- {
- print("removed non-teamplay ", self.classname, "\n");
- startitem_failed = TRUE;
- remove (self);
- return;
- }
- }
- else
- {
- if(self.notfree)
- {
- print("removed non-FFA ", self.classname, "\n");
- startitem_failed = TRUE;
- remove (self);
- return;
- }
- }
-
- if(self.notq3a)
- {
- // We aren't TA or something like that, so we keep the Q3A entities
- print("removed non-Q3A ", self.classname, "\n");
- startitem_failed = TRUE;
- remove (self);
- return;
- }
-
/*
* can't do it that way, as it would break maps
* TODO make a target_give like entity another way, that perhaps has
void spawnfunc_team_CTF_bluespawn() { spawnfunc_info_player_team2(); }
void spawnfunc_item_flight() { spawnfunc_item_jetpack(); }
+
+.float notteam;
+.float notsingle;
+.float notfree;
+.float notq3a;
+.float notta;
+.string gametype;
+float DoesQ3ARemoveThisEntity()
+{
+ // Q3 style filters (DO NOT USE, THIS IS COMPAT ONLY)
+
+ if(self.notq3a)
+ if(!teams_matter || g_tdm || g_ctf)
+ return 1;
+
+ if(self.notta)
+ if not(!teams_matter || g_tdm || g_ctf)
+ return 1;
+
+ if(self.notsingle)
+ if(maxclients == 1)
+ return 1;
+
+ if(self.notteam)
+ if(teams_matter)
+ return 1;
+
+ if(self.notfree)
+ if(!teams_matter)
+ return 1;
+
+ if(self.gametype)
+ {
+ string gametypename;
+ // static char *gametypeNames[] = {"ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester", "teamtournament"};
+ gametypename = "ffa";
+ if(teams_matter)
+ gametypename = "team";
+ if(g_arena)
+ gametypename = "tournament";
+ if(g_ctf)
+ gametypename = "ctf";
+ if(maxclients == 1)
+ gametypename = "single";
+ // we do not have the other types (oneflag, obelisk, harvester, teamtournament)
+ if(strstrofs(self.gametype, gametypename, 0) < 0)
+ return 1;
+ }
+
+ return 0;
+}
maxplayers $menu_maxplayers
exec data/campaign.cfg
exec config_update.cfg
+exec font-xolonium.cfg
exec autoexec.cfg
stuffcmds
//startdemos demos/demo1 demos/demo2 demos/demo3